Challenge, Medium,  on  Linux

Make a Filesystem Mount Survive a Reboot

This challenge demonstrates a common pitfall when working with Linux storage: a plain mount command creates a temporary mount that does not survive a reboot.

The server has an additional drive (/dev/vdb) formatted as ext4. It contains some files on it but is not currently mounted.

Start by creating a mount point directory at /mnt/data and mounting the drive there:

Hint: Mounting a drive

For a refresher on how to mount a drive, see the Mount a Drive with Existing Data challenge.

The mount you just created lives solely in the kernel's in-memory mount table. When the system reboots, the kernel starts fresh and all runtime mounts are lost.

Your task is to configure the system so that /dev/vdb is automatically mounted at /mnt/data every time the machine boots. Once you're confident in your configuration, reboot the machine:

sudo reboot
Hint: Making mounts persistent

The kernel doesn't remember mounts between boots. You need to configure the system to recreate the mount automatically during the boot process. There is more than one way to achieve this on a modern Linux system.

Hint: Testing before rebooting

Before rebooting, it's a good idea to validate your configuration. Try unmounting the drive, then see if the system can bring it back automatically using the configuration you've added.