Linux Advanced File System and Storage 2 — Questions and Answers
Question 1: Which command displays the UUID of all block devices on a Linux system?
- blkid (Correct answer)
- fdisk -l
- lsblk -u
- udevadm info
Correct answer: blkid
blkid queries and displays attributes of block devices including their UUIDs, filesystem types, and labels.
Question 2: In LVM, what is a Physical Extent (PE)?
- The smallest allocatable unit in a Physical Volume (Correct answer)
- A partition on a physical disk
- A logical volume segment
- A snapshot of physical storage
Correct answer: The smallest allocatable unit in a Physical Volume
A Physical Extent is the smallest unit of disk space that can be allocated in LVM, typically 4MB by default.
Question 3: Which ext4 feature reduces fragmentation by pre-allocating contiguous blocks for growing files?
- Extents
- Journal checksums
- Delayed allocation (Correct answer)
- Sparse super blocks
Correct answer: Delayed allocation
Delayed allocation (also called allocate-on-flush) holds off block assignment until data is actually written, allowing the kernel to allocate contiguous blocks and reduce fragmentation.
Question 4: What does the 'noatime' mount option do?
- Prevents updating file access timestamps on reads (Correct answer)
- Disables all timestamp tracking
- Sets access time to creation time
- Only updates timestamps on writes
Correct answer: Prevents updating file access timestamps on reads
noatime prevents the kernel from updating the atime (access time) inode field on every file read, significantly reducing disk writes.
Question 5: Which RAID level requires a minimum of 4 disks and provides both striping and dual-parity?
- RAID 6 (Correct answer)
- RAID 10
- RAID 5
- RAID 50
Correct answer: RAID 6
RAID 6 uses dual distributed parity, can survive two simultaneous disk failures, and requires a minimum of 4 disks.
Question 6: What is the purpose of the 'tune2fs -c' command?
- Set the maximum mount count before fsck is forced (Correct answer)
- Change the filesystem creation time
- Adjust the cluster size
- Enable encryption on the filesystem
Correct answer: Set the maximum mount count before fsck is forced
tune2fs -c sets the maximum number of mounts after which e2fsck will be run automatically on the ext2/3/4 filesystem.
Question 7: In ZFS terminology, what is a 'zpool'?
- A storage pool composed of one or more vdevs (Correct answer)
- A ZFS snapshot
- A ZFS dataset
- A compression algorithm used by ZFS
Correct answer: A storage pool composed of one or more vdevs
A zpool is the top-level ZFS storage container that aggregates one or more virtual devices (vdevs) into a single pool of storage.
Which command displays the UUID of all block devices on a Linux system?