[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F47393X1J4N6FDM8XNZFMS":3,"skill-same:01M6F47393X1J4N6FDM8XNZFMS":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":21,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":63,"install":64,"resources":77},"01M6F47393X1J4N6FDM8XNZFMS","block-storage",null,"Manage block storage volumes and LVM. Configure cloud block storage and local disks. Use when managing disk storage.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-block-storage\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"storage","block storage","block","main","2026","when","lvm","relevant","helper","scripts","critical","os","platform","local","github","community","manage","agent-skills","only","use","configure","access","disk","devops-security","license","security","2026-11-10 10:12:30",false,"---\nname: block-storage\ndescription: Manage block storage volumes and LVM. Configure cloud block storage and\n  local disks. Use when managing disk storage.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Block Storage\n\nManage block storage volumes including LVM, cloud-based EBS, filesystem creation, snapshots, and RAID configurations. Covers the full lifecycle from provisioning raw disks to extending volumes in production.\n\n## When to Use\n\n- Adding, partitioning, or formatting new disks on Linux servers\n- Managing LVM logical volumes for flexible storage allocation\n- Provisioning and attaching cloud block storage (AWS EBS)\n- Creating and restoring snapshots for backup or migration\n- Configuring software RAID for redundancy or performance\n- Extending existing volumes without downtime\n\n## Prerequisites\n\n- Root or sudo access on the target system\n- `lvm2` package installed for LVM operations\n- `mdadm` package installed for software RAID\n- AWS CLI configured for EBS operations\n- Understanding of the workload's I\u002FO characteristics (IOPS, throughput)\n\n## Destructive operation contract\n\nExamples are alternatives, not one sequential script. Identify devices by stable serial\u002FWWN and current filesystem\u002Fmounts, map cloud volume IDs to actual NVMe devices and confirm the exact target before mklabel\u002Fwipefs\u002Fmkfs\u002Fpvcreate\u002Fmdadm creation or shrink\u002Fremove. Verify an independent tested backup; RAID and snapshots alone are not backups. Quiesce databases\u002Ffilesystems for application-consistent snapshots and monitor snapshot COW capacity. Read-only mount can still replay a journal; use filesystem-specific no-recovery options when forensic immutability matters. Start filesystem repair with assessment\u002Fimage capture rather than unattended -y. Validate fstab without overwriting existing entries and test boot recovery. Extend the partition\u002Fcontainer before its filesystem; ext4 shrink requires correct units\u002Fspace and offline checks, XFS cannot shrink. Wait for EBS modification\u002Fsnapshot completion and verify encryption\u002FAZ\u002Fcosts before attach\u002Fdetach; never format restored data or force-detach mounted workloads.\n\n## Disk Discovery and Partitioning\n\n```bash\n# List all block devices\nlsblk\nlsblk -f    # Show filesystem types and mount points\n\n# Show detailed disk information\nfdisk -l \u002Fdev\u002Fsdb\n\n# Identify disk model and health (requires smartmontools)\nsmartctl -a \u002Fdev\u002Fsda\nsmartctl -H \u002Fdev\u002Fsda    # Quick health check\n\n# Create a GPT partition table and a single partition\nparted \u002Fdev\u002Fsdb mklabel gpt\nparted \u002Fdev\u002Fsdb mkpart primary ext4 0% 100%\n\n# Alternative: use fdisk for MBR partitioning\nfdisk \u002Fdev\u002Fsdb\n# n -> new partition, p -> primary, Enter defaults, w -> write\n\n# Inform the kernel of partition table changes\npartprobe \u002Fdev\u002Fsdb\n\n# Wipe filesystem signatures (prepare for LVM or RAID)\nwipefs -a \u002Fdev\u002Fsdb1\n```\n\n## Filesystem Creation and Management\n\n```bash\n# Create an ext4 filesystem\nmkfs.ext4 \u002Fdev\u002Fsdb1\n\n# Create an ext4 filesystem with label and reserved block tuning\nmkfs.ext4 -L appdata -m 1 \u002Fdev\u002Fsdb1    # 1% reserved blocks (default is 5%)\n\n# Create an XFS filesystem (recommended for large volumes)\nmkfs.xfs \u002Fdev\u002Fsdb1\n\n# Create an XFS filesystem with label\nmkfs.xfs -L appdata \u002Fdev\u002Fsdb1\n\n# Mount the filesystem\nmkdir -p \u002Fdata\nmount \u002Fdev\u002Fsdb1 \u002Fdata\n\n# Add persistent mount to fstab (use UUID for reliability)\nblkid \u002Fdev\u002Fsdb1    # Get the UUID\necho 'UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  \u002Fdata  ext4  defaults,noatime  0  2' >> \u002Fetc\u002Ffstab\n\n# Mount all entries in fstab\nmount -a\n\n# Check and repair a filesystem (unmount first)\numount \u002Fdata\nfsck.ext4 -y \u002Fdev\u002Fsdb1\nxfs_repair \u002Fdev\u002Fsdb1    # For XFS\n\n# Resize ext4 (can grow online while mounted)\nresize2fs \u002Fdev\u002Fsdb1\n\n# Resize XFS (must be mounted to grow)\nxfs_growfs \u002Fdata\n\n# Check filesystem usage\ndf -hT\n```\n\n## LVM Management\n\n### Creating an LVM Stack\n\n```bash\n# Step 1: Create physical volumes\npvcreate \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc\n\n# View physical volumes\npvs\npvdisplay \u002Fdev\u002Fsdb\n\n# Step 2: Create a volume group from physical volumes\nvgcreate data_vg \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc\n\n# View volume groups\nvgs\nvgdisplay data_vg\n\n# Step 3: Create logical volumes\n# Fixed size\nlvcreate -L 100G -n app_lv data_vg\n\n# Use percentage of free space\nlvcreate -l 50%FREE -n logs_lv data_vg\n\n# Use all remaining space\nlvcreate -l 100%FREE -n backup_lv data_vg\n\n# View logical volumes\nlvs\nlvdisplay \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Step 4: Create filesystem and mount\nmkfs.ext4 \u002Fdev\u002Fdata_vg\u002Fapp_lv\nmkdir -p \u002Fdata\u002Fapp\nmount \u002Fdev\u002Fdata_vg\u002Fapp_lv \u002Fdata\u002Fapp\n\n# Add to fstab\necho '\u002Fdev\u002Fdata_vg\u002Fapp_lv  \u002Fdata\u002Fapp  ext4  defaults,noatime  0  2' >> \u002Fetc\u002Ffstab\n```\n\n### Extending Volumes (Online)\n\n```bash\n# Extend a logical volume by 20 GB\nlvextend -L +20G \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Extend to fill all free space in the VG\nlvextend -l +100%FREE \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Grow the ext4 filesystem (online, no unmount needed)\nresize2fs \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Grow XFS filesystem (online)\nxfs_growfs \u002Fdata\u002Fapp\n\n# Combined: extend LV and resize filesystem in one command\nlvextend -L +20G --resizefs \u002Fdev\u002Fdata_vg\u002Fapp_lv\n```\n\n### Adding a New Disk to an Existing VG\n\n```bash\n# Add a new physical volume\npvcreate \u002Fdev\u002Fsdd\n\n# Extend the volume group\nvgextend data_vg \u002Fdev\u002Fsdd\n\n# Now extend any logical volume using the new space\nlvextend -l +100%FREE --resizefs \u002Fdev\u002Fdata_vg\u002Fapp_lv\n```\n\n### LVM Snapshots\n\n```bash\n# Create a snapshot (requires free space in VG)\nlvcreate -L 10G -s -n app_snap \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Mount the snapshot read-only for backup\nmkdir -p \u002Fmnt\u002Fsnapshot\nmount -o ro \u002Fdev\u002Fdata_vg\u002Fapp_snap \u002Fmnt\u002Fsnapshot\n\n# Perform backup from the snapshot\ntar czf \u002Fbackup\u002Fapp-$(date +%Y%m%d).tar.gz -C \u002Fmnt\u002Fsnapshot .\n\n# Backup completion path: unmount and remove the snapshot when no rollback is needed\numount \u002Fmnt\u002Fsnapshot\nlvremove -f \u002Fdev\u002Fdata_vg\u002Fapp_snap\n\n# Alternative restore path: retain the snapshot above; do not run lvremove first.\n# Reverts LV to snapshot point -- destructive\nlvconvert --merge \u002Fdev\u002Fdata_vg\u002Fapp_snap\n# Note: if the LV is mounted, merge happens at next activation (reboot)\n```\n\n### Reducing and Removing LVM Components\n\n```bash\n# Shrink a logical volume (ext4 only -- XFS cannot shrink)\n# MUST unmount first\numount \u002Fdata\u002Fapp\ne2fsck -f \u002Fdev\u002Fdata_vg\u002Fapp_lv\nresize2fs \u002Fdev\u002Fdata_vg\u002Fapp_lv 80G\nlvreduce -L 80G \u002Fdev\u002Fdata_vg\u002Fapp_lv\nmount \u002Fdata\u002Fapp\n\n# Remove a logical volume\numount \u002Fdata\u002Fapp\nlvremove \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Remove a disk from a volume group (migrate data off first)\npvmove \u002Fdev\u002Fsdc            # Migrate extents to other PVs\nvgreduce data_vg \u002Fdev\u002Fsdc  # Remove PV from VG\npvremove \u002Fdev\u002Fsdc           # Clean PV metadata\n```\n\n## AWS EBS Management\n\n```bash\n# Create a gp3 volume (general purpose SSD)\naws ec2 create-volume \\\n  --availability-zone us-east-1a \\\n  --size 100 \\\n  --volume-type gp3 \\\n  --iops 3000 \\\n  --throughput 125 \\\n  --tag-specifications 'ResourceType=volume,Tags=[{Key=Name,Value=app-data},{Key=Environment,Value=production}]'\n\n# Create an io2 volume (provisioned IOPS SSD for databases)\naws ec2 create-volume \\\n  --availability-zone us-east-1a \\\n  --size 500 \\\n  --volume-type io2 \\\n  --iops 10000\n\n# List volumes with filters\naws ec2 describe-volumes \\\n  --filters \"Name=tag:Environment,Values=production\" \\\n  --query 'Volumes[*].{ID:VolumeId,Size:Size,Type:VolumeType,State:State,AZ:AvailabilityZone}' \\\n  --output table\n\n# Attach a volume to an instance\naws ec2 attach-volume \\\n  --volume-id vol-0abc123def456789 \\\n  --instance-id i-0abc123def456789 \\\n  --device \u002Fdev\u002Fxvdf\n\n# After attaching, format and mount on the instance\nlsblk                               # Identify the new device (e.g., \u002Fdev\u002Fnvme1n1)\nmkfs.ext4 \u002Fdev\u002Fnvme1n1\nmkdir -p \u002Fdata\nmount \u002Fdev\u002Fnvme1n1 \u002Fdata\n\n# Modify a volume (resize without detaching -- gp3\u002Fio2)\naws ec2 modify-volume \\\n  --volume-id vol-0abc123def456789 \\\n  --size 200\n\n# After resize, grow the filesystem on the instance\ngrowpart \u002Fdev\u002Fnvme1n1 1              # If partitioned\nresize2fs \u002Fdev\u002Fnvme1n1p1            # ext4 when partitioned; use whole device only if filesystem is directly on it\n# xfs_growfs \u002Fdata                   # XFS\n\n# Create a snapshot\naws ec2 create-snapshot \\\n  --volume-id vol-0abc123def456789 \\\n  --description \"Pre-upgrade snapshot $(date +%Y-%m-%d)\" \\\n  --tag-specifications 'ResourceType=snapshot,Tags=[{Key=Name,Value=pre-upgrade}]'\n\n# List snapshots\naws ec2 describe-snapshots \\\n  --owner-ids self \\\n  --query 'Snapshots[*].{ID:SnapshotId,Vol:VolumeId,Size:VolumeSize,Date:StartTime,Desc:Description}' \\\n  --output table\n\n# Create a volume from a snapshot (for restore or migration)\naws ec2 create-volume \\\n  --snapshot-id snap-0abc123def456789 \\\n  --availability-zone us-east-1a \\\n  --volume-type gp3\n\n# Detach a volume\naws ec2 detach-volume --volume-id vol-0abc123def456789\n\n# Delete a volume (ensure it is detached first)\naws ec2 delete-volume --volume-id vol-0abc123def456789\n```\n\n## Software RAID (mdadm)\n\n```bash\n# Install mdadm\napt install -y mdadm    # Debian\u002FUbuntu\ndnf install -y mdadm    # RHEL\u002FCentOS\n\n# Create RAID 1 (mirror) with 2 disks\nmdadm --create \u002Fdev\u002Fmd0 --level=1 --raid-devices=2 \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc\n\n# Create RAID 5 (striped with parity) with 3 disks + 1 spare\nmdadm --create \u002Fdev\u002Fmd0 --level=5 --raid-devices=3 --spare-devices=1 \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc \u002Fdev\u002Fsdd \u002Fdev\u002Fsde\n\n# Create RAID 10 (striped mirrors) with 4 disks\nmdadm --create \u002Fdev\u002Fmd0 --level=10 --raid-devices=4 \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc \u002Fdev\u002Fsdd \u002Fdev\u002Fsde\n\n# Check RAID status\ncat \u002Fproc\u002Fmdstat\nmdadm --detail \u002Fdev\u002Fmd0\n\n# Save RAID configuration (persists across reboot)\nmdadm --detail --scan >> \u002Fetc\u002Fmdadm\u002Fmdadm.conf     # Debian\nmdadm --detail --scan >> \u002Fetc\u002Fmdadm.conf            # RHEL\nupdate-initramfs -u                                  # Debian\n\n# Create filesystem on RAID device\nmkfs.ext4 \u002Fdev\u002Fmd0\nmkdir -p \u002Fdata\nmount \u002Fdev\u002Fmd0 \u002Fdata\n\n# Replace a failed disk\nmdadm --manage \u002Fdev\u002Fmd0 --fail \u002Fdev\u002Fsdc\nmdadm --manage \u002Fdev\u002Fmd0 --remove \u002Fdev\u002Fsdc\n# Insert new disk, then:\nmdadm --manage \u002Fdev\u002Fmd0 --add \u002Fdev\u002Fsdf\n\n# Monitor rebuild progress\nwatch cat \u002Fproc\u002Fmdstat\n\n# RAID level recommendations:\n# RAID 1:  2+ disks, mirroring, good for OS \u002F boot drives\n# RAID 5:  3+ disks, single parity, good read performance\n# RAID 6:  4+ disks, double parity, survives 2 disk failures\n# RAID 10: 4+ disks, mirrored stripes, best I\u002FO performance\n```\n\n## Troubleshooting\n\n| Symptom | Diagnostic Command | Common Fix |\n|---|---|---|\n| Disk not showing up | `lsblk`, `dmesg \\| tail` | Check physical connection; rescan SCSI bus |\n| Filesystem read-only | `dmesg \\| grep error`, `mount` | Filesystem errors detected; run `fsck` after unmount |\n| LVM: no free space in VG | `vgs`, `pvs` | Add a new PV with `vgextend` |\n| EBS volume not visible | `lsblk` on instance | Check attach status in AWS console; NVMe naming differs |\n| RAID degraded | `cat \u002Fproc\u002Fmdstat` | Replace failed disk with `mdadm --manage --add` |\n| Cannot resize filesystem | `lvs`, `df -h` | Extend LV first, then resize FS; XFS needs to be mounted |\n| Slow I\u002FO on EBS | `iostat -x 2`, check volume type | Upgrade to gp3\u002Fio2, increase IOPS\u002Fthroughput |\n| Snapshot taking too long | AWS Console: snapshot progress | Snapshots are incremental; first one takes longest |\n\n## Related Skills\n\n- `linux-administration` -- Disk and filesystem basics\n- `performance-tuning` -- I\u002FO scheduler and benchmarking with fio\n- `nfs-storage` -- Network filesystems built on top of block storage\n- `backup-recovery` -- Snapshot-based and file-level backup strategies\n- `object-storage` -- Alternative storage model for unstructured data\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# Block Storage\n\nManage block storage volumes including LVM, cloud-based EBS, filesystem creation, snapshots, and RAID configurations. Covers the full lifecycle from provisioning raw disks to extending volumes in production.\n\n## When to Use\n\n- Adding, partitioning, or formatting new disks on Linux servers\n- Managing LVM logical volumes for flexible storage allocation\n- Provisioning and attaching cloud block storage (AWS EBS)\n- Creating and restoring snapshots for backup or migration\n- Configuring software RAID for redundancy or performance\n- Extending existing volumes without downtime\n\n## Prerequisites\n\n- Root or sudo access on the target system\n- `lvm2` package installed for LVM operations\n- `mdadm` package installed for software RAID\n- AWS CLI configured for EBS operations\n- Understanding of the workload's I\u002FO characteristics (IOPS, throughput)\n\n## Destructive operation contract\n\nExamples are alternatives, not one sequential script. Identify devices by stable serial\u002FWWN and current filesystem\u002Fmounts, map cloud volume IDs to actual NVMe devices and confirm the exact target before mklabel\u002Fwipefs\u002Fmkfs\u002Fpvcreate\u002Fmdadm creation or shrink\u002Fremove. Verify an independent tested backup; RAID and snapshots alone are not backups. Quiesce databases\u002Ffilesystems for application-consistent snapshots and monitor snapshot COW capacity. Read-only mount can still replay a journal; use filesystem-specific no-recovery options when forensic immutability matters. Start filesystem repair with assessment\u002Fimage capture rather than unattended -y. Validate fstab without overwriting existing entries and test boot recovery. Extend the partition\u002Fcontainer before its filesystem; ext4 shrink requires correct units\u002Fspace and offline checks, XFS cannot shrink. Wait for EBS modification\u002Fsnapshot completion and verify encryption\u002FAZ\u002Fcosts before attach\u002Fdetach; never format restored data or force-detach mounted workloads.\n\n## Disk Discovery and Partitioning\n\n```bash\n# List all block devices\nlsblk\nlsblk -f    # Show filesystem types and mount points\n\n# Show detailed disk information\nfdisk -l \u002Fdev\u002Fsdb\n\n# Identify disk model and health (requires smartmontools)\nsmartctl -a \u002Fdev\u002Fsda\nsmartctl -H \u002Fdev\u002Fsda    # Quick health check\n\n# Create a GPT partition table and a single partition\nparted \u002Fdev\u002Fsdb mklabel gpt\nparted \u002Fdev\u002Fsdb mkpart primary ext4 0% 100%\n\n# Alternative: use fdisk for MBR partitioning\nfdisk \u002Fdev\u002Fsdb\n# n -> new partition, p -> primary, Enter defaults, w -> write\n\n# Inform the kernel of partition table changes\npartprobe \u002Fdev\u002Fsdb\n\n# Wipe filesystem signatures (prepare for LVM or RAID)\nwipefs -a \u002Fdev\u002Fsdb1\n```\n\n## Filesystem Creation and Management\n\n```bash\n# Create an ext4 filesystem\nmkfs.ext4 \u002Fdev\u002Fsdb1\n\n# Create an ext4 filesystem with label and reserved block tuning\nmkfs.ext4 -L appdata -m 1 \u002Fdev\u002Fsdb1    # 1% reserved blocks (default is 5%)\n\n# Create an XFS filesystem (recommended for large volumes)\nmkfs.xfs \u002Fdev\u002Fsdb1\n\n# Create an XFS filesystem with label\nmkfs.xfs -L appdata \u002Fdev\u002Fsdb1\n\n# Mount the filesystem\nmkdir -p \u002Fdata\nmount \u002Fdev\u002Fsdb1 \u002Fdata\n\n# Add persistent mount to fstab (use UUID for reliability)\nblkid \u002Fdev\u002Fsdb1    # Get the UUID\necho 'UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  \u002Fdata  ext4  defaults,noatime  0  2' >> \u002Fetc\u002Ffstab\n\n# Mount all entries in fstab\nmount -a\n\n# Check and repair a filesystem (unmount first)\numount \u002Fdata\nfsck.ext4 -y \u002Fdev\u002Fsdb1\nxfs_repair \u002Fdev\u002Fsdb1    # For XFS\n\n# Resize ext4 (can grow online while mounted)\nresize2fs \u002Fdev\u002Fsdb1\n\n# Resize XFS (must be mounted to grow)\nxfs_growfs \u002Fdata\n\n# Check filesystem usage\ndf -hT\n```\n\n## LVM Management\n\n### Creating an LVM Stack\n\n```bash\n# Step 1: Create physical volumes\npvcreate \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc\n\n# View physical volumes\npvs\npvdisplay \u002Fdev\u002Fsdb\n\n# Step 2: Create a volume group from physical volumes\nvgcreate data_vg \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc\n\n# View volume groups\nvgs\nvgdisplay data_vg\n\n# Step 3: Create logical volumes\n# Fixed size\nlvcreate -L 100G -n app_lv data_vg\n\n# Use percentage of free space\nlvcreate -l 50%FREE -n logs_lv data_vg\n\n# Use all remaining space\nlvcreate -l 100%FREE -n backup_lv data_vg\n\n# View logical volumes\nlvs\nlvdisplay \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Step 4: Create filesystem and mount\nmkfs.ext4 \u002Fdev\u002Fdata_vg\u002Fapp_lv\nmkdir -p \u002Fdata\u002Fapp\nmount \u002Fdev\u002Fdata_vg\u002Fapp_lv \u002Fdata\u002Fapp\n\n# Add to fstab\necho '\u002Fdev\u002Fdata_vg\u002Fapp_lv  \u002Fdata\u002Fapp  ext4  defaults,noatime  0  2' >> \u002Fetc\u002Ffstab\n```\n\n### Extending Volumes (Online)\n\n```bash\n# Extend a logical volume by 20 GB\nlvextend -L +20G \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Extend to fill all free space in the VG\nlvextend -l +100%FREE \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Grow the ext4 filesystem (online, no unmount needed)\nresize2fs \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Grow XFS filesystem (online)\nxfs_growfs \u002Fdata\u002Fapp\n\n# Combined: extend LV and resize filesystem in one command\nlvextend -L +20G --resizefs \u002Fdev\u002Fdata_vg\u002Fapp_lv\n```\n\n### Adding a New Disk to an Existing VG\n\n```bash\n# Add a new physical volume\npvcreate \u002Fdev\u002Fsdd\n\n# Extend the volume group\nvgextend data_vg \u002Fdev\u002Fsdd\n\n# Now extend any logical volume using the new space\nlvextend -l +100%FREE --resizefs \u002Fdev\u002Fdata_vg\u002Fapp_lv\n```\n\n### LVM Snapshots\n\n```bash\n# Create a snapshot (requires free space in VG)\nlvcreate -L 10G -s -n app_snap \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Mount the snapshot read-only for backup\nmkdir -p \u002Fmnt\u002Fsnapshot\nmount -o ro \u002Fdev\u002Fdata_vg\u002Fapp_snap \u002Fmnt\u002Fsnapshot\n\n# Perform backup from the snapshot\ntar czf \u002Fbackup\u002Fapp-$(date +%Y%m%d).tar.gz -C \u002Fmnt\u002Fsnapshot .\n\n# Backup completion path: unmount and remove the snapshot when no rollback is needed\numount \u002Fmnt\u002Fsnapshot\nlvremove -f \u002Fdev\u002Fdata_vg\u002Fapp_snap\n\n# Alternative restore path: retain the snapshot above; do not run lvremove first.\n# Reverts LV to snapshot point -- destructive\nlvconvert --merge \u002Fdev\u002Fdata_vg\u002Fapp_snap\n# Note: if the LV is mounted, merge happens at next activation (reboot)\n```\n\n### Reducing and Removing LVM Components\n\n```bash\n# Shrink a logical volume (ext4 only -- XFS cannot shrink)\n# MUST unmount first\numount \u002Fdata\u002Fapp\ne2fsck -f \u002Fdev\u002Fdata_vg\u002Fapp_lv\nresize2fs \u002Fdev\u002Fdata_vg\u002Fapp_lv 80G\nlvreduce -L 80G \u002Fdev\u002Fdata_vg\u002Fapp_lv\nmount \u002Fdata\u002Fapp\n\n# Remove a logical volume\numount \u002Fdata\u002Fapp\nlvremove \u002Fdev\u002Fdata_vg\u002Fapp_lv\n\n# Remove a disk from a volume group (migrate data off first)\npvmove \u002Fdev\u002Fsdc            # Migrate extents to other PVs\nvgreduce data_vg \u002Fdev\u002Fsdc  # Remove PV from VG\npvremove \u002Fdev\u002Fsdc           # Clean PV metadata\n```\n\n## AWS EBS Management\n\n```bash\n# Create a gp3 volume (general purpose SSD)\naws ec2 create-volume \\\n  --availability-zone us-east-1a \\\n  --size 100 \\\n  --volume-type gp3 \\\n  --iops 3000 \\\n  --throughput 125 \\\n  --tag-specifications 'ResourceType=volume,Tags=[{Key=Name,Value=app-data},{Key=Environment,Value=production}]'\n\n# Create an io2 volume (provisioned IOPS SSD for databases)\naws ec2 create-volume \\\n  --availability-zone us-east-1a \\\n  --size 500 \\\n  --volume-type io2 \\\n  --iops 10000\n\n# List volumes with filters\naws ec2 describe-volumes \\\n  --filters \"Name=tag:Environment,Values=production\" \\\n  --query 'Volumes[*].{ID:VolumeId,Size:Size,Type:VolumeType,State:State,AZ:AvailabilityZone}' \\\n  --output table\n\n# Attach a volume to an instance\naws ec2 attach-volume \\\n  --volume-id vol-0abc123def456789 \\\n  --instance-id i-0abc123def456789 \\\n  --device \u002Fdev\u002Fxvdf\n\n# After attaching, format and mount on the instance\nlsblk                               # Identify the new device (e.g., \u002Fdev\u002Fnvme1n1)\nmkfs.ext4 \u002Fdev\u002Fnvme1n1\nmkdir -p \u002Fdata\nmount \u002Fdev\u002Fnvme1n1 \u002Fdata\n\n# Modify a volume (resize without detaching -- gp3\u002Fio2)\naws ec2 modify-volume \\\n  --volume-id vol-0abc123def456789 \\\n  --size 200\n\n# After resize, grow the filesystem on the instance\ngrowpart \u002Fdev\u002Fnvme1n1 1              # If partitioned\nresize2fs \u002Fdev\u002Fnvme1n1p1            # ext4 when partitioned; use whole device only if filesystem is directly on it\n# xfs_growfs \u002Fdata                   # XFS\n\n# Create a snapshot\naws ec2 create-snapshot \\\n  --volume-id vol-0abc123def456789 \\\n  --description \"Pre-upgrade snapshot $(date +%Y-%m-%d)\" \\\n  --tag-specifications 'ResourceType=snapshot,Tags=[{Key=Name,Value=pre-upgrade}]'\n\n# List snapshots\naws ec2 describe-snapshots \\\n  --owner-ids self \\\n  --query 'Snapshots[*].{ID:SnapshotId,Vol:VolumeId,Size:VolumeSize,Date:StartTime,Desc:Description}' \\\n  --output table\n\n# Create a volume from a snapshot (for restore or migration)\naws ec2 create-volume \\\n  --snapshot-id snap-0abc123def456789 \\\n  --availability-zone us-east-1a \\\n  --volume-type gp3\n\n# Detach a volume\naws ec2 detach-volume --volume-id vol-0abc123def456789\n\n# Delete a volume (ensure it is detached first)\naws ec2 delete-volume --volume-id vol-0abc123def456789\n```\n\n## Software RAID (mdadm)\n\n```bash\n# Install mdadm\napt install -y mdadm    # Debian\u002FUbuntu\ndnf install -y mdadm    # RHEL\u002FCentOS\n\n# Create RAID 1 (mirror) with 2 disks\nmdadm --create \u002Fdev\u002Fmd0 --level=1 --raid-devices=2 \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc\n\n# Create RAID 5 (striped with parity) with 3 disks + 1 spare\nmdadm --create \u002Fdev\u002Fmd0 --level=5 --raid-devices=3 --spare-devices=1 \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc \u002Fdev\u002Fsdd \u002Fdev\u002Fsde\n\n# Create RAID 10 (striped mirrors) with 4 disks\nmdadm --create \u002Fdev\u002Fmd0 --level=10 --raid-devices=4 \u002Fdev\u002Fsdb \u002Fdev\u002Fsdc \u002Fdev\u002Fsdd \u002Fdev\u002Fsde\n\n# Check RAID status\ncat \u002Fproc\u002Fmdstat\nmdadm --detail \u002Fdev\u002Fmd0\n\n# Save RAID configuration (persists across reboot)\nmdadm --detail --scan >> \u002Fetc\u002Fmdadm\u002Fmdadm.conf     # Debian\nmdadm --detail --scan >> \u002Fetc\u002Fmdadm.conf            # RHEL\nupdate-initramfs -u                                  # Debian\n\n# Create filesystem on RAID device\nmkfs.ext4 \u002Fdev\u002Fmd0\nmkdir -p \u002Fdata\nmount \u002Fdev\u002Fmd0 \u002Fdata\n\n# Replace a failed disk\nmdadm --manage \u002Fdev\u002Fmd0 --fail \u002Fdev\u002Fsdc\nmdadm --manage \u002Fdev\u002Fmd0 --remove \u002Fdev\u002Fsdc\n# Insert new disk, then:\nmdadm --manage \u002Fdev\u002Fmd0 --add \u002Fdev\u002Fsdf\n\n# Monitor rebuild progress\nwatch cat \u002Fproc\u002Fmdstat\n\n# RAID level recommendations:\n# RAID 1:  2+ disks, mirroring, good for OS \u002F boot drives\n# RAID 5:  3+ disks, single parity, good read performance\n# RAID 6:  4+ disks, double parity, survives 2 disk failures\n# RAID 10: 4+ disks, mirrored stripes, best I\u002FO performance\n```\n\n## Troubleshooting\n\n| Symptom | Diagnostic Command | Common Fix |\n|---|---|---|\n| Disk not showing up | `lsblk`, `dmesg \\| tail` | Check physical connection; rescan SCSI bus |\n| Filesystem read-only | `dmesg \\| grep error`, `mount` | Filesystem errors detected; run `fsck` after unmount |\n| LVM: no free space in VG | `vgs`, `pvs` | Add a new PV with `vgextend` |\n| EBS volume not visible | `lsblk` on instance | Check attach status in AWS console; NVMe naming differs |\n| RAID degraded | `cat \u002Fproc\u002Fmdstat` | Replace failed disk with `mdadm --manage --add` |\n| Cannot resize filesystem | `lvs`, `df -h` | Extend LV first, then resize FS; XFS needs to be mounted |\n| Slow I\u002FO on EBS | `iostat -x 2`, check volume type | Upgrade to gp3\u002Fio2, increase IOPS\u002Fthroughput |\n| Snapshot taking too long | AWS Console: snapshot progress | Snapshots are incremental; first one takes longest |\n\n## Related Skills\n\n- `linux-administration` -- Disk and filesystem basics\n- `performance-tuning` -- I\u002FO scheduler and benchmarking with fio\n- `nfs-storage` -- Network filesystems built on top of block storage\n- `backup-recovery` -- Snapshot-based and file-level backup strategies\n- `object-storage` -- Alternative storage model for unstructured data\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":28,"source":49,"license":14,"category":50,"metadata":51,"date_added":54,"description":7,"source_repo":55,"source_type":33,"compatibility":56,"license_source":57},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":52,"version":53},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-block-storage",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add boisenoise\u002Fskills-collections --skill block-storage",{"tool":70,"command":71},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill block-storage",{"tool":73,"command":74},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill block-storage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-block-storage\u002FSKILL.md",true,[],[79,88,96,105,113,121],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":83,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":87},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":87},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":100,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":104},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":104},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":104},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":104},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]