RHCSA RHCSA Filesystem and Mount Configuration 5 — Questions and Answers
Question 1: What is the correct way to persistently mount an ISO image file /images/rhel.iso at /mnt/iso using /etc/fstab?
- /images/rhel.iso /mnt/iso iso9660 loop,ro 0 0 (Correct answer)
- /images/rhel.iso /mnt/iso iso9660 defaults 0 0
- loop:/images/rhel.iso /mnt/iso iso9660 ro 0 0
- /images/rhel.iso /mnt/iso udf loop,ro 0 0
Correct answer: /images/rhel.iso /mnt/iso iso9660 loop,ro 0 0
ISO images require the 'loop' mount option in fstab to attach them via the loop device, along with the iso9660 filesystem type.
Question 2: Which command shows the inode usage of filesystems, useful for diagnosing 'no space left' errors even when disk has free space?
- df -i (Correct answer)
- df -h
- du -s
- lsblk -f
Correct answer: df -i
df -i displays inode usage statistics; a filesystem can run out of inodes while still having free disk space.
Question 3: A user cannot write to /mnt/data even though they own the files. The mount shows 'ro'. How do you remount it read-write without unmounting?
- mount -o remount,rw /mnt/data (Correct answer)
- mount --bind /mnt/data /mnt/data
- chmod 777 /mnt/data
- tune2fs -o ^read-only /dev/sdb1
Correct answer: mount -o remount,rw /mnt/data
mount -o remount,rw changes the mount options of an already-mounted filesystem without unmounting it.
Question 4: Which filesystem type is recommended for the /boot/efi partition on UEFI-based RHEL systems?
- vfat (Correct answer)
- ext4
- xfs
- btrfs
Correct answer: vfat
The EFI System Partition must be formatted as vfat (FAT32) because UEFI firmware can only read FAT filesystems.
Question 5: What command would you use to set the reserved block percentage to 1% on an ext4 filesystem at /dev/sdb1?
- tune2fs -m 1 /dev/sdb1 (Correct answer)
- e2fsck -m 1 /dev/sdb1
- mkfs.ext4 -r 1 /dev/sdb1
- resize2fs -m 1 /dev/sdb1
Correct answer: tune2fs -m 1 /dev/sdb1
tune2fs -m sets the percentage of reserved blocks for the superuser; reducing it from 5% to 1% reclaims space on large data disks.
Question 6: Which option in /etc/fstab prevents execution of binaries on a mounted filesystem, adding a layer of security?
- noexec (Correct answer)
- nosuid
- nodev
- ro
Correct answer: noexec
The noexec mount option prevents direct execution of any binaries on the filesystem, reducing attack surface.
Question 7: After adding a new entry to /etc/fstab for a network filesystem, which systemd command reloads the fstab-generated unit files without rebooting?
- systemctl daemon-reload (Correct answer)
- systemctl restart systemd-fstab-generator
- mount -a
- systemctl reload fstab
Correct answer: systemctl daemon-reload
systemctl daemon-reload causes systemd to re-read and regenerate unit files, including those generated from /etc/fstab.
What is the correct way to persistently mount an ISO image file /images/rhel.iso at /mnt/iso using /etc/fstab?