A filesystem must be mounted — attached to a directory in the tree — before its files exist as far as the system is concerned. mount does that by hand; /etc/fstab is the table that makes it happen automatically on every boot, with the same options every time.
Mounting by hand #
$ sudo mount /dev/sdb1 /mnt/backup
$ mount | grep sdb1 # confirm: device, mountpoint, type, options
$ sudo umount /mnt/backup # detach — note: u-n-mount, not unmount
The mountpoint must exist first (mkdir), and the device must not be in use — lsof finds whoever is holding it when umount says "busy".
Today's systems mount by label or UUID, not device name, because /dev/sdb1 can become /dev/sdc1 after reboot:
$ lsblk -f
sdb1 ext4 4a9c... /mnt/backup
$ sudo mount UUID=4a9c-... /mnt/backup
fstab: the permanent record #
Every line is: what, where, type, options, dump, pass:
UUID=4a9c-... /mnt/backup ext4 defaults,noatime 0 2
After editing, prove it boots before rebooting — this command mounts everything fstab knows about, exactly as boot would:
$ sudo mount -a
Silence means success. The options column earns its space: noatime skips access-time writes, nofail keeps booting when the disk is absent, ro mounts read-only.
| Option | Effect |
|---|---|
defaults | rw, suid, dev, exec, auto, nouser |
noatime | Do not record access times (less wear) |
nofail | Boot continues if the disk is missing |
ro | Read-only |
x-systemd.automount | Mount on first access, not at boot |
For sizing and filesystem choices, see df and du and ext4 vs btrfs. The terminal notes series continues on the journal.
