Skill 2 in course 3.2: Boot and Storage Recovery
Recovering File Systems and LVM
Repair damaged XFS and ext4, restore LVM metadata, recover LUKS headers and find hidden space exhaustion.
You will be able to
- Diagnose why a file system will not mount, and choose between log replay, xfs_repair and e2fsck.
- Restore a lost LVM physical volume label and volume group metadata from a backup, and handle a missing disk.
- Back up and restore a LUKS header, and manage key slots.
- Find the cause when a file system reports full: blocks, inodes or deleted-but-open files.
Lessons
- 01Repairing XFS and ext4 file systemsWork out why a file system will not mount, then repair it with xfs_repair or e2fsck, including from a backup superblock.
blkidlsblkmountdmesgxfs_repairxfs_repair -n0/3 exercises - 02Recovering LVM: labels, metadata and missing disksRestore a lost PV label and VG metadata from backup, handle a missing disk, and fix devices-file problems.
pvsvgslvspvs -o +pv_uuidvgcfgbackupvgcfgrestore0/3 exercises - 03LUKS headers, key slots and a file system that is 'full'Back up and restore a LUKS header, manage key slots, and find whether full means blocks, inodes or deleted-but-open files.
cryptsetupcryptsetup luksDumpcryptsetup luksHeaderBackupcryptsetup luksHeaderRestorecryptsetup luksAddKeycryptsetup luksRemoveKey0/3 exercises