name: linux-storage
description: Linux storage engineering skill for block devices, filesystems (ext4, Btrfs, XFS, F2FS), Device Mapper, LVM volume management, LUKS disk encryption, software RAID (mdadm), and data recovery. Covers blk-mq queue schedulers, NVMe and SMART health diagnostics, online volume expansion, TPM2 auto-unlocking, and strict data protection invariants (fsck safety, refusal of autonomous formatting). Use when investigating storage performance, configuring filesystems, setting up LUKS/LVM, or diagnosing mount failures.
license: Apache-2.0
compatibility: Requires Linux environment with storage userspace tooling (lsblk, blkid, cryptsetup, lvm2).
metadata:
author: Eshan Roy
version: "0.1.0"
claude_context: "fork"
claude_agent: "general"
Linux Storage Engineering
The linux-storage skill provides specialist capabilities for analyzing and managing Linux block devices, filesystems (ext4, Btrfs, XFS), LVM logical volumes, LUKS encryption containers, software RAID, and storage diagnostics.
1. Operating Principles & Strict Data Protection Invariants
- Protect User Data Above All Else: Storage operations carry irreversible destruction risks. Never execute destructive formatting commands (
mkfs, wipefs, dd to raw disks) autonomously.
- Never Run
fsck on a Mounted Filesystem: Running filesystem checkers on mounted read-write filesystems corrupts metadata. Always unmount or remount read-only first.
- Verify Device Identity Before Action: Never rely on transient device nodes (e.g.
/dev/sdb) which can shift across reboots. Always reference storage by persistent identifiers: UUID (/dev/disk/by-uuid/) or PARTUUID.
- Safety Tier Gating: All partition modifications, formatting, volume deletion, RAID rebuilding, and encryption re-keying are Tier 3 operations requiring explicit human authorization.
2. Intent Classification & Workflow Routing
flowchart TD
REQ["Storage Engineering Request"] --> CLASS{"Classify Storage Task"}
CLASS -->|Mount Failure / Corrupt Filesystem| DIAG["1. Storage Diagnostics\n(lsblk, findmnt, smartctl, mount logs, read-only checks)"]
CLASS -->|Filesystem Selection / Tuning| FS["2. Filesystem Engineering\n(ext4, Btrfs COW snapshots, XFS reflink, F2FS, trim)"]
CLASS -->|Volume Management (LVM)| LVM["3. Logical Volume Management\n(PV, VG, LV creation, thin pools, online lvextend)"]
CLASS -->|Disk Encryption (LUKS)| CRYPT["4. Encryption Engineering\n(cryptsetup, LUKS2, Argon2id, TPM2 auto-unlock)"]
CLASS -->|Redundant Arrays (RAID)| RAID["5. Software RAID\n(mdadm, RAID 1/5/6/10, sync status, Btrfs RAID)"]
DIAG --> EXEC["Execute Storage Workflow"]
FS --> EXEC
LVM --> EXEC
CRYPT --> EXEC
RAID --> EXEC
3. The 5-Step Storage Diagnostic Workflow
- Hierarchy Inspection: Run
lsblk -f to map the complete hierarchy from physical device to partitions, LUKS containers, LVM volumes, and mount points.
- Health Verification: Check controller health and error counters via
nvme smart-log or smartctl -a.
- Mount State Audit: Query
findmnt and journalctl -xb to isolate filesystem mount errors without modifying on-disk state.
- Read-Only Verification: Perform non-destructive read-only checks (
btrfs check --readonly, dumpe2fs).
- Human-Gated Remediation: Provide explicit, verified recovery commands requiring user confirmation before executing any state-mutating repairs.
4. Cross-Specialist Coordination
| Task |
Coordinating Specialists |
Interaction |
| Encrypted root volume boot |
linux-storage + boot-engineering |
linux-storage sets up LUKS/Btrfs; boot-engineering configures sd-encrypt and cmdline. |
| NVMe PCIe hardware failure |
linux-storage + driver-engineering |
linux-storage checks blk-mq/smart-log; driver-engineering checks PCIe link/BARs. |
| Daemon storage directories |
linux-storage + systemd-engineering |
linux-storage provisions volumes; systemd-engineering wires StateDirectory=. |
5. Authoritative References Directory
- Storage Architecture & Block Layer
- Filesystems Comparison & Selection
- Device Mapper & LVM Reference
- Storage Encryption & LUKS
- Software RAID & Multi-Device Storage
- Diagnostics & Troubleshooting
- Safety Policy
1---2name: linux-storage3description: Linux storage engineering skill for block devices, filesystems (ext4, Btrfs, XFS, F2FS), Device Mapper, LVM volume management, LUKS disk encryption, software RA4---5---6name: linux-storage7description: Linux storage engineering skill for block devices, filesystems (ext4, Btrfs, XFS, F2FS), Device Mapper, LVM volume management, LUKS disk encryption, software RAID (mdadm), and data recovery. Covers blk-mq queue schedulers, NVMe and SMART health diagnostics, online volume expansion, TPM2 auto-unlocking, and strict data protection invariants (fsck safety, refusal of autonomous formatting). Use when investigating storage performance, configuring filesystems, setting up LUKS/LVM, or diagnosing mount failures.8license: Apache-2.09compatibility: Requires Linux environment with storage userspace tooling (lsblk, blkid, cryptsetup, lvm2).10metadata:11 author: Eshan Roy12 version: "0.1.0"13 claude_context: "fork"14 claude_agent: "general"15---1617# Linux Storage Engineering1819The `linux-storage` skill provides specialist capabilities for analyzing and managing Linux block devices, filesystems (ext4, Btrfs, XFS), LVM logical volumes, LUKS encryption containers, software RAID, and storage diagnostics.2021---2223## 1. Operating Principles & Strict Data Protection Invariants24251. **Protect User Data Above All Else**: Storage operations carry irreversible destruction risks. Never execute destructive formatting commands (`mkfs`, `wipefs`, `dd` to raw disks) autonomously.262. **Never Run `fsck` on a Mounted Filesystem**: Running filesystem checkers on mounted read-write filesystems corrupts metadata. Always unmount or remount read-only first.273. **Verify Device Identity Before Action**: Never rely on transient device nodes (e.g. `/dev/sdb`) which can shift across reboots. Always reference storage by persistent identifiers: UUID (`/dev/disk/by-uuid/`) or PARTUUID.284. **Safety Tier Gating**: All partition modifications, formatting, volume deletion, RAID rebuilding, and encryption re-keying are Tier 3 operations requiring explicit human authorization.2930---3132## 2. Intent Classification & Workflow Routing3334```mermaid35flowchart TD36 REQ["Storage Engineering Request"] --> CLASS{"Classify Storage Task"}3738 CLASS -->|Mount Failure / Corrupt Filesystem| DIAG["1. Storage Diagnostics\n(lsblk, findmnt, smartctl, mount logs, read-only checks)"]39 CLASS -->|Filesystem Selection / Tuning| FS["2. Filesystem Engineering\n(ext4, Btrfs COW snapshots, XFS reflink, F2FS, trim)"]40 CLASS -->|Volume Management (LVM)| LVM["3. Logical Volume Management\n(PV, VG, LV creation, thin pools, online lvextend)"]41 CLASS -->|Disk Encryption (LUKS)| CRYPT["4. Encryption Engineering\n(cryptsetup, LUKS2, Argon2id, TPM2 auto-unlock)"]42 CLASS -->|Redundant Arrays (RAID)| RAID["5. Software RAID\n(mdadm, RAID 1/5/6/10, sync status, Btrfs RAID)"]4344 DIAG --> EXEC["Execute Storage Workflow"]45 FS --> EXEC46 LVM --> EXEC47 CRYPT --> EXEC48 RAID --> EXEC49```5051---5253## 3. The 5-Step Storage Diagnostic Workflow54551. **Hierarchy Inspection**: Run `lsblk -f` to map the complete hierarchy from physical device to partitions, LUKS containers, LVM volumes, and mount points.562. **Health Verification**: Check controller health and error counters via `nvme smart-log` or `smartctl -a`.573. **Mount State Audit**: Query `findmnt` and `journalctl -xb` to isolate filesystem mount errors without modifying on-disk state.584. **Read-Only Verification**: Perform non-destructive read-only checks (`btrfs check --readonly`, `dumpe2fs`).595. **Human-Gated Remediation**: Provide explicit, verified recovery commands requiring user confirmation before executing any state-mutating repairs.6061---6263## 4. Cross-Specialist Coordination6465| Task | Coordinating Specialists | Interaction |66|:---|:---|:---|67| Encrypted root volume boot | `linux-storage` + `boot-engineering` | `linux-storage` sets up LUKS/Btrfs; `boot-engineering` configures `sd-encrypt` and cmdline. |68| NVMe PCIe hardware failure | `linux-storage` + `driver-engineering` | `linux-storage` checks blk-mq/smart-log; `driver-engineering` checks PCIe link/BARs. |69| Daemon storage directories | `linux-storage` + `systemd-engineering` | `linux-storage` provisions volumes; `systemd-engineering` wires `StateDirectory=`. |7071---7273## 5. Authoritative References Directory7475- [Storage Architecture & Block Layer](references/storage-architecture.md)76- [Filesystems Comparison & Selection](references/filesystems.md)77- [Device Mapper & LVM Reference](references/device-mapper-lvm.md)78- [Storage Encryption & LUKS](references/encryption.md)79- [Software RAID & Multi-Device Storage](references/raid.md)80- [Diagnostics & Troubleshooting](references/troubleshooting-and-recovery.md)81- [Safety Policy](../../references/safety-policy.md)