RHCSA RHCSA Filesystem and Mount Configuration 3 — Questions and Answers
Question 1: Which command creates a new XFS filesystem on /dev/sdc1?
- mkfs.xfs /dev/sdc1 (Correct answer)
- xfs_create /dev/sdc1
- mkfs -t xfs /dev/sdc1 only
- format.xfs /dev/sdc1
Correct answer: mkfs.xfs /dev/sdc1
mkfs.xfs is the standard command to create an XFS filesystem on a specified block device.
Question 2: A disk partition /dev/sdb2 is formatted as XFS and mounted at /backup. Which command repairs it if corrupted?
- xfs_repair /dev/sdb2 (Correct answer)
- fsck.xfs /dev/sdb2
- e2fsck /dev/sdb2
- xfs_check /dev/sdb2
Correct answer: xfs_repair /dev/sdb2
xfs_repair is the correct tool to repair a corrupted XFS filesystem; fsck.xfs exists but only calls xfs_repair.
Question 3: Which /etc/fstab option makes a filesystem mount only when explicitly requested with 'mount -a' or accessed?
- noauto (Correct answer)
- nofail
- user
- x-systemd.automount
Correct answer: noauto
The 'noauto' option prevents the filesystem from being mounted automatically during boot or when 'mount -a' is run.
Question 4: What does 'mount --bind /source /destination' accomplish?
- Makes the same directory tree accessible at a second location (Correct answer)
- Creates a symbolic link from source to destination
- Mounts an ISO image at the destination
- Copies files from source to destination
Correct answer: Makes the same directory tree accessible at a second location
A bind mount makes the same directory tree visible at two different mount points without copying data.
Question 5: Which command extends an XFS filesystem on /dev/vg1/lv1 that is mounted at /data to use all available space?
- xfs_growfs /data (Correct answer)
- resize2fs /dev/vg1/lv1
- xfs_resize /dev/vg1/lv1
- lvextend --resizefs /dev/vg1/lv1
Correct answer: xfs_growfs /data
xfs_growfs extends an XFS filesystem online using the mount point; the underlying LV must already be extended first.
Question 6: What type of filesystem is created by the command 'mkfs.vfat /dev/sdc1'?
- FAT32/FAT filesystem compatible with Windows (Correct answer)
- Virtual filesystem for proc entries
- A FUSE-based filesystem
- An ext2-compatible legacy filesystem
Correct answer: FAT32/FAT filesystem compatible with Windows
mkfs.vfat creates a FAT filesystem (commonly FAT32) on the partition, widely compatible with Windows and USB drives.
Question 7: Which systemd unit type is automatically generated from /etc/fstab entries to manage mounts?
- .mount units (Correct answer)
- .service units
- .path units
- .socket units
Correct answer: .mount units
systemd-fstab-generator converts /etc/fstab entries into .mount units that systemd uses to manage filesystems.
Which command creates a new XFS filesystem on /dev/sdc1?