Linux Labs

Storage / Stage 2 of 11

Mounting and fstab

Not running Starting usually ~20 s
Leave the lesson

Step 4 of 7 · on a machine · 6 min

Checking the table and mounting

A table is checked before mounting: that way an error shows up now, not at the next boot.

findmnt --verify checks the table without mounting anything. The --tab-file option points it at the training table instead of the system one:

bash
sudo findmnt --verify --tab-file /srv/storage-lab/fstab

With a foreign UUID the check prints [E] unreachable on boot required source: UUID=… and a summary of 1 error. A correct table gives Success, no errors or warnings detected. A wrong type only counts as a warning, [W] xfs does not match with on-disk ext4, yet mount refuses that type. So after the check you still mount the volume and look at the result.

mount --fstab TABLE DIRECTORY mounts one entry from the given table. With the system table, sudo mount DIRECTORY is enough, or sudo mount -a for every entry at once. Two facts confirm the result: findmnt --mountpoint shows the source at the right directory, and the directory holds the volume's files.

Note

It is easier to copy a UUID than to retype it: select it with the mouse → right-click → "Copy", then in Vim insert mode paste it with Shift+Insert.

Exercise · do it

Fix the table and mount the volume from it

In the /srv/storage-lab/fstab table fix the UUID using the blkid output, check the table and mount the volume at /mnt/lab-data from it. Keep the line's other fields and leave the system /etc/fstab alone.

Sign in and start The machine is available after signing in

Goals · 0 of 2

  • Fix the UUID in the table not done yet
  • Mount the volume from the table not done yet

Step goals

0 of 2
  • Fix the UUID in the table — not done yet
  • Mount the volume from the table — not done yet
Ubuntu 24.04

Step goals

0 of 2
  • Fix the UUID in the table — not done yet
  • Mount the volume from the table — not done yet
Loading…