Concepts·LPIC-1
Why fstab uses UUIDs, and checking a filesystem
A /dev/sd? name is assigned in the order the kernel finds the disks, which changes when hardware is added. This guide shows the persistent identifiers that do not move, and then runs fsck - which has one rule that matters more than every flag it takes.
101: Devices and Filesystems Guide 12 of 33 Beginner
- OSUbuntu 26.04 LTS
- Kernel7.0.0-30-generic
- systemd259
- TimeAbout 14 min
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LPIC1-A01 | 192.168.0.76 | Ubuntu 26.04 LTS | Debian-family host - dpkg and apt, which objective 102.4 names | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when adding a disk, cloning a VM, moving storage, or writing fstab entries that must survive reboot. This matters because a device name is assigned in the order the kernel finds the hardware and can change between boots, while a filesystem UUID stays attached to the filesystem.
- comparing
/dev/disk/by-uuidwith/dev/disk/by-id, and knowing which names the filesystem and which names the hardware - seeing why a
/dev/sd?name is unsafe for a persistent mount - unmounting
/mnt/lpic1databefore checking it - running
fsck -f -yon the unmounted filesystem and reading its five passes - reading the
fsckexit status, where 0 is clean and 1 means errors were corrected
Before you start
- Complete {{guide-title:partitions-filesystems-and-fstab}} first, so the
/mnt/lpic1datafilesystem exists.
-
The identifiers that do not move
-
Checking a filesystem