How would you mount a new filesystem entry from /dev/vg_data/lv_backups to /mnt/backups and ensure it mounts at boot?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

How would you mount a new filesystem entry from /dev/vg_data/lv_backups to /mnt/backups and ensure it mounts at boot?

Explanation:
The essential idea is to create a persistent, boot-mounted filesystem by defining it in /etc/fstab and then applying that configuration. Start by giving the system a real filesystem on the device, then ensure the directory that will hold the mount exists, and finally arrange for automatic mounting at boot. In this approach, the fstab entry is added so the system knows to mount the device to the target directory at boot. The mount point directory is created before attempting to mount, so the mount can succeed. The filesystem on the device is created with the correct type (XFS) before mounting, ensuring the mount command can read a valid filesystem. Running mount -a applies all entries from /etc/fstab immediately, so you don’t have to reboot to verify the setup. Using an order that formats the device before mounting and ensures the mount point exists avoids common pitfalls: mounting a device without a filesystem, or mounting into a non-existent directory, would fail. The chosen sequence achieves both a working immediate mount and a stable boot-time mount due to the persistent fstab entry.

The essential idea is to create a persistent, boot-mounted filesystem by defining it in /etc/fstab and then applying that configuration. Start by giving the system a real filesystem on the device, then ensure the directory that will hold the mount exists, and finally arrange for automatic mounting at boot.

In this approach, the fstab entry is added so the system knows to mount the device to the target directory at boot. The mount point directory is created before attempting to mount, so the mount can succeed. The filesystem on the device is created with the correct type (XFS) before mounting, ensuring the mount command can read a valid filesystem. Running mount -a applies all entries from /etc/fstab immediately, so you don’t have to reboot to verify the setup.

Using an order that formats the device before mounting and ensures the mount point exists avoids common pitfalls: mounting a device without a filesystem, or mounting into a non-existent directory, would fail. The chosen sequence achieves both a working immediate mount and a stable boot-time mount due to the persistent fstab entry.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy