LCA File Systems & Storage Management 3 — Questions and Answers
Question 1: Which command checks and repairs an XFS filesystem that is NOT currently mounted?
- xfs_repair /dev/sdc1 (Correct answer)
- xfs_check /dev/sdc1
- fsck.xfs /dev/sdc1
- xfs_db -r /dev/sdc1
Correct answer: xfs_repair /dev/sdc1
xfs_repair is the correct tool to check and repair an unmounted XFS filesystem.
Question 2: What does 'pvmove /dev/sdb' accomplish in LVM?
- Migrates all LV data off /dev/sdb to other PVs in the VG (Correct answer)
- Removes /dev/sdb from the volume group
- Resizes the physical volume on /dev/sdb
- Creates a mirror of /dev/sdb
Correct answer: Migrates all LV data off /dev/sdb to other PVs in the VG
pvmove relocates physical extents from one PV to other available PVs within the same volume group.
Question 3: In a Btrfs filesystem, what is a 'subvolume'?
- An independently mountable POSIX file tree within a Btrfs volume (Correct answer)
- A partition within a Btrfs device
- A snapshot of a directory
- A Btrfs RAID member
Correct answer: An independently mountable POSIX file tree within a Btrfs volume
A Btrfs subvolume is an independently snapshotted and mountable file tree namespace within a single Btrfs volume.
Question 4: Which command shows real-time disk I/O statistics per device, including read/write throughput?
- iostat -xz 1 (Correct answer)
- vmstat 1
- iotop
- df -i
Correct answer: iostat -xz 1
iostat -xz 1 reports extended device statistics every second, showing throughput, utilization, and I/O wait.
Question 5: What does the 'discard' mount option enable for SSDs?
- Continuous TRIM support to inform the SSD of freed blocks (Correct answer)
- Discards the filesystem journal on mount
- Enables write caching on the device
- Skips block bad-sector scanning
Correct answer: Continuous TRIM support to inform the SSD of freed blocks
The discard option sends TRIM commands to the SSD whenever blocks are freed, maintaining SSD performance over time.
Question 6: Which field in /etc/fstab specifies the order in which fsck checks filesystems at boot?
- Sixth field (fs_passno) (Correct answer)
- Fifth field (fs_freq)
- Fourth field (fs_mntops)
- Third field (fs_vfstype)
Correct answer: Sixth field (fs_passno)
The sixth field (fs_passno) determines fsck check order; root is typically 1, other filesystems 2, and 0 means skip.
Question 7: What is the maximum single file size supported by a default FAT32 filesystem?
- 4 GB minus 1 byte (Correct answer)
- 2 GB
- 8 GB
- 16 TB
Correct answer: 4 GB minus 1 byte
FAT32 uses a 32-bit file size field, limiting individual files to 4 GB - 1 byte (4,294,967,295 bytes).
Which command checks and repairs an XFS filesystem that is NOT currently mounted?