Mounts and capacity

Configure fstab without losing boot

Create a persistent mount by UUID and test the complete fstab before relying on the next reboot.

8 minute lesson

~~~

/etc/fstab describes filesystems systemd should make available, but one invalid required entry can complicate boot.

Prefer UUID or a deliberate label over an unstable device name. Create the mount point first. After editing, run findmnt --verify and test with mount -a while recovery access still works.

Add a disposable filesystem to fstab using its UUID and nofail. Test it without rebooting, then explain whether the real workload should tolerate the disk being absent.

Use the filesystem UUID, create the mount point, and test without rebooting:

sudo blkid /dev/sdb1
sudo mkdir -p /srv/data
sudoedit /etc/fstab
sudo mount -a
findmnt /srv/data

Keep a root shell or provider console open. A typo in fstab can delay or break boot. Run mount -a and verify the expected device, filesystem, options, and writable path before scheduling a reboot.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →