I mounted filesystems reliably by referencing UUIDs in /etc/fstab instead of device names, then validated mounts without rebooting. UUID-based entries kept boot mounts correct even after disks were reordered or added.

Objective & Context

Device names like /dev/sdb are not stable across reboots; UUIDs are. This lab mounts manually, then persists with UUID fstab entries and validates safely, the durable-storage step the LVM and server labs depend on.

Environment & Prerequisites

  • Linux with util-linux and a spare formatted device.
  • Root access to edit fstab and mount.
  • blkid to read UUIDs.

Step-by-Step Execution

1. Read the device UUID

blkid /dev/sdb1

2. Add a UUID fstab entry [ROOT REQUIRED]

echo 'UUID=1234-5678 /mnt/data ext4 defaults,noatime 0 2' >> /etc/fstab

3. Validate without rebooting

mount -a && findmnt /mnt/data
TARGET   SOURCE     FSTYPE OPTIONS
/mnt/data /dev/sdb1 ext4   rw,noatime

Validation & Testing

Run mount -a to confirm the fstab entry is valid (no errors), then verify with findmnt. Pass criteria: the filesystem mounts via UUID, survives a simulated device reorder, and mount -a reports no errors that would block boot.

Advanced: Troubleshooting
  • Boot hangs on bad fstab: add nofail for non-critical mounts and always test with mount -a first.
  • Wrong device after reboot: use UUID or LABEL, never /dev/sdX.
  • Permission/owner issues: set mount options or post-mount chown as needed.

Key Results

  • Made boot mounts resilient to device renaming via UUIDs.
  • Validated fstab safely with mount -a before reboot.
  • Applied noatime/nofail options for performance and safety.
  • Confirmed mounts with findmnt rather than assumptions.