Storage Management
What this domain covers
Storage tasks span the local stack (LVM, mdadm RAID, filesystem growth, encryption) and networked storage (NFS, iSCSI, multipath). The exam rewards knowing which resize operation is possible online and which export or target option actually grants the access asked for.
Core rules
- LVM is PV to VG to LV.
lvextend -r -L +5G /dev/vg0/lv_datagrows the LV and the filesystem in one step. ext4 grows online with resize2fs and can shrink offline; XFS only grows, viaxfs_growfson the mountpoint; btrfs usesbtrfs filesystem resize. - mdadm:
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc, then persist withmdadm --detail --scan >> /etc/mdadm.conf. - /etc/fstab should reference UUID= or LABEL=, never /dev/sdX. Validate with
mount -aand inspect withfindmnt. - NFS: /etc/exports entries such as
/srv/data 10.0.0.0/24(rw,sync,no_subtree_check), activated withexportfs -ra; NFSv4 uses only port 2049, NFSv3 also needs rpcbind and lockd. - iSCSI with targetcli: backstore, target IQN, LUN, then an ACL for the initiator IQN. The client runs iscsiadm discovery and login; device-mapper multipath adds redundant paths.
- LUKS:
cryptsetup luksFormat,cryptsetup luksOpen, an /etc/crypttab entry, and LVM on top of the mapper device.
Worked example
/var fills up. vgs shows free extents, lvs shows lv_var. Run lvextend -r -L +10G /dev/vg_sys/lv_var: -r triggers the correct filesystem grow (xfs_growfs or resize2fs). Verify with df -h /var and lvs. If the VG were full, you would add a PV with vgextend first.
Traps that cost marks
Attempting to shrink XFS; running resize2fs on an XFS volume; forgetting exportfs -ra so clients still see old exports; fstab entries by device name that reorder after adding disks; overprovisioning a thin pool until it fills.