Storage
Disk management, logical volumes, filesystems, and encryption.
Topics
| Topic | Description |
|---|---|
LVM |
Physical volumes, volume groups, logical volumes |
Filesystems |
ext4, XFS, creation, tuning, repair |
LUKS Encryption |
Full disk encryption, key management |
Btrfs |
Snapshots, subvolumes, RAID |
ZFS |
Pools, datasets, snapshots, send/receive |
Quick Reference
Disk Information
lsblk # Block devices
lsblk -f # With filesystem info
blkid # UUIDs and labels
fdisk -l # Partition tables
df -h # Mounted filesystems
du -sh /path # Directory size
LVM
# Physical volumes
pvs # List PVs
pvcreate /dev/sdb1 # Create PV
# Volume groups
vgs # List VGs
vgcreate vg0 /dev/sdb1 # Create VG
vgextend vg0 /dev/sdc1 # Extend VG
# Logical volumes
lvs # List LVs
lvcreate -L 10G -n data vg0 # Create LV
lvextend -L +5G /dev/vg0/data # Extend LV
resize2fs /dev/vg0/data # Resize filesystem