Every filesystem that's been created must be attached to the directory tree via mount. This episode covers mount and /etc/fstab, UUID as a stable reference, per-filesystem mount options, then systemd-mount, automount, and mount/swap units for modern management.

Up to episode 6, you could create filesystems. But an unmounted filesystem is like a warehouse without a door — the data is there, but it can't be accessed from the directory tree. Episode 7 is the bridge between creating filesystems and daily operations: how to attach them to the system correctly and permanently.
We'll cover mount and /etc/fstab, the difference between UUID and device path, and the mount options that determine filesystem behavior. Then we'll move to the modern way of managing mounts with systemd: systemd-mount, automount, and mount/swap units that manage boot order declaratively.
After this episode, you'll no longer type mount /dev/sdb1 manually at every boot — you'll define the mount point once and let the system handle it.
The mount command attaches a filesystem to a directory (mount point):
sudo mkdir -p /mnt/lab
sudo mount /dev/loop0 /mnt/labAfter that, the filesystem's contents appear at /mnt/lab. Check all active mounts with:
mount | grep /mnt
df -hT /mnt/labThe mount output is a snapshot view; df -hT shows size and filesystem type. To detach, use umount /mnt/lab — and remember that a filesystem in use by a process will be rejected.
Recording /dev/sdb1 in a config is fragile: device order can change between boots, especially with many disks. The solution is the UUID — a unique identity written to the superblock at mkfs time:
sudo blkidThe blkid output shows the UUID and TYPE of every filesystem. The UUID doesn't change as long as the filesystem isn't reformatted, so the fstab reference stays valid even when device names change.
The /etc/fstab file defines permanent mounts with six columns:
device mount-point type options dump fsck-orderAn example of a correct line:
UUID=8f3c-9a21-4b5e /data ext4 defaults,noatime 0 2The dump (0 = not backed up) and fsck-order (1 = root, 2 = others) columns are used by legacy tools. After editing fstab, validate with sudo mount -a before rebooting, and always keep a backup copy cp /etc/fstab /etc/fstab.bak.
Some options apply to all filesystems:
noatime: don't update access time — reduces writes on every file read.relatime: only update atime if it's older than mtime — the modern default compromise.nodev,nosuid,noexec: disable devices, setuid, and execution — standard for /tmp and untrusted partitions.Check the options currently active on the root filesystem:
findmnt -no OPTIONS /The findmnt output shows effective options like rw,relatime,errors=remount-ro.
Some options only make sense on certain filesystems:
data=ordered|writeback|journal for journaling mode, discard for SSD TRIM, commit=30 for the journal commit interval.noatime and logbsize for the log buffer size.compress=zstd for transparent compression, ssd to optimize for SSD devices.zfs set atime=off), not kernel mount options.An example of mounting btrfs with compression:
sudo mount -o compress=zstd,noatime /dev/loop0 /mnt/labTo make compression permanent, write that option into fstab. compress=zstd is btrfs's most recommended compression choice because of its balanced ratio and speed.
systemd manages mounts as units. systemd-mount is the equivalent of mount, and automount defers mounting until the mount point is first accessed:
sudo systemd-mount /dev/loop0 /mnt/lab
sudo systemd-umount /mnt/labFor permanent automount, add the x-systemd.automount option in fstab:
UUID=8f3c-9a21-4b5e /data btrfs defaults,x-systemd.automount,compress=zstd 0 2The benefits of automount: idle devices don't need to be mounted, boot is faster, and the mount point is available even if the device wasn't present yet.
systemd generates mount units automatically from fstab, but you can also write a manual .mount unit:
[Unit]
Description=Data mount
[Mount]
What=UUID=8f3c-9a21-4b5e
Where=/data
Type=btrfs
Options=defaults,noatime,compress=zstdFor swap, define a swap unit or a swap-type fstab line:
UUID=5e2d-11c8-77ab none swap sw 0 0These mount/swap units ensure correct mount ordering: RequiresMountsFor dependencies and Before=local-fs.target are handled automatically by systemd.
If a filesystem can't be mounted at boot, the system can get stuck. Several mitigations:
nofail option: the system still boots even if the device is missing — suitable for external media.x-systemd.device-timeout=30 option: limit how long to wait for a device.errors=remount-ro (ext4): on error, remount read-only for data safety.An example for an external USB that may be absent:
UUID=8f3c-9a21-4b5e /mnt/usb ext4 defaults,nofail,x-systemd.device-timeout=30 0 2The nofail and device-timeout combination keeps a server alive even when external storage isn't available.
Mount is how filesystems enter the Linux ecosystem. By understanding fstab, UUIDs, and mount options, you can create mounts that are stable, fast, and safe. With systemd, mount management becomes declarative and fully automatable.
Key takeaways:
noatime and discard are the most common performance tuning options.nofail and automount options prevent boot failures from absent storage.systemd-mount and .mount units are the modern replacements for manual mounts.data=, btrfs compress=, ZFS via properties.In the next episode, episode 8, we cover quota, encryption, and integrity — how to limit space usage, encrypt data with LUKS and ZFS native encryption, and schedule checksum scrubs to detect silent corruption. You'll start building comprehensively safe filesystems.