RHCSA RHCSA Filesystem and Mount Configuration 4 — Questions and Answers
Question 1: Which command adds a label 'BACKUP' to an ext4 filesystem on /dev/sdb1?
- tune2fs -L BACKUP /dev/sdb1 (Correct answer)
- e2label BACKUP /dev/sdb1
- mkfs.ext4 -L BACKUP /dev/sdb1
- blkid --label BACKUP /dev/sdb1
Correct answer: tune2fs -L BACKUP /dev/sdb1
tune2fs -L sets or changes the filesystem label on an existing ext4 filesystem without reformatting.
Question 2: A mount point /mnt/data has the 'nofail' option in /etc/fstab. What happens if the device is absent at boot?
- The system boots normally and skips mounting that entry (Correct answer)
- The system drops to emergency mode
- The filesystem is mounted read-only
- systemd retries the mount indefinitely
Correct answer: The system boots normally and skips mounting that entry
nofail tells systemd not to fail the boot if this mount cannot be completed, allowing the system to continue booting.
Question 3: Which command mounts all filesystems listed in /etc/fstab that are not currently mounted?
- mount -a (Correct answer)
- mount --all
- systemctl mount-all
- fstab-mount
Correct answer: mount -a
mount -a reads /etc/fstab and attempts to mount all filesystems that have the 'auto' option and are not already mounted.
Question 4: What does the fifth field (dump) in an /etc/fstab entry control?
- Whether the dump backup utility backs up the filesystem (Correct answer)
- The dump speed of the filesystem in MB/s
- The number of inodes allocated during formatting
- Whether the filesystem is exported via NFS
Correct answer: Whether the dump backup utility backs up the filesystem
The dump field (0 or 1) tells the legacy dump utility whether to include this filesystem in backups; 0 means skip.
Question 5: Which command shows all currently mounted filesystems along with their mount options?
- findmnt (Correct answer)
- mount
- df -T
- cat /proc/mounts
Correct answer: findmnt
findmnt displays all mounted filesystems in a tree format including mount options, source, and type.
Question 6: An NFS share nfs-server:/exports/data needs to mount at /mnt/nfs. Which fstab entry is correct?
- nfs-server:/exports/data /mnt/nfs nfs defaults 0 0 (Correct answer)
- nfs-server:/exports/data /mnt/nfs nfs4 ro 0 2
- /mnt/nfs nfs-server:/exports/data nfs defaults 0 0
- nfs://nfs-server/exports/data /mnt/nfs nfs defaults 0 0
Correct answer: nfs-server:/exports/data /mnt/nfs nfs defaults 0 0
NFS fstab entries use server:/path as the device, the local mountpoint, 'nfs' as the type, and 0 0 for dump and pass fields.
Question 7: Which command unmounts /mnt/usb and ensures all pending writes are flushed before removal?
- umount /mnt/usb (Correct answer)
- sync && umount /mnt/usb
- mount -o remount,ro /mnt/usb
- eject /mnt/usb
Correct answer: umount /mnt/usb
umount itself flushes buffers and ensures data is written before unmounting; running sync beforehand is redundant but harmless.
Which command adds a label 'BACKUP' to an ext4 filesystem on /dev/sdb1?