Mounting a filesystem by UUID keeps the correct disk partition attached to the correct directory even when kernel device names such as /dev/vdb1 change after a reboot, storage-controller change, or added disk. Stable mounts matter for data volumes, backup targets, and application directories that must always appear at the same path.
Each filesystem stores its own UUID in metadata on the disk, and the Linux mount stack can resolve UUID=… in a direct mount command or in /etc/fstab. Tools such as blkid read the exact identifier and filesystem type, while findmnt confirms that the saved entry resolves to the intended block device and mount point.
The command flow below was verified on Ubuntu 24.04 with an ext4 filesystem, but the same pattern applies on other current Linux distributions. Replace the device path, mount point, filesystem type, mount options, and final /etc/fstab field to match the actual filesystem, because a wrong entry can leave the volume unavailable or delay boot until the file is corrected.
$ lsblk -o NAME,SIZE,TYPE,MOUNTPOINTS NAME SIZE TYPE MOUNTPOINTS nvme0n1 100G disk ├─nvme0n1p1 512M part /boot/efi └─nvme0n1p2 99.5G part / vdb 64G disk └─vdb1 64G part
The target is usually a partition such as /dev/vdb1 or /dev/nvme1n1p1 rather than the whole-disk node.
$ sudo blkid /dev/vdb1 /dev/vdb1: LABEL="data" UUID="3f5e6c0d-2c2f-4a7f-b2b7-a1d4fd6c9ec4" BLOCK_SIZE="4096" TYPE="ext4"
blkid provides the exact identifier and filesystem type to use in the mount command and in /etc/fstab.
$ sudo mkdir -p /mnt/data
Files already present in /mnt/data stay hidden until the mounted filesystem is unmounted.
$ sudo mount UUID=3f5e6c0d-2c2f-4a7f-b2b7-a1d4fd6c9ec4 /mnt/data $ findmnt --target /mnt/data --output TARGET,SOURCE,FSTYPE,OPTIONS TARGET SOURCE FSTYPE OPTIONS /mnt/data /dev/vdb1 ext4 rw,relatime
A successful test mount proves that the UUID resolves to the intended filesystem and mount point.
$ sudo umount /mnt/data
$ sudo cp --archive /etc/fstab /etc/fstab.bak
A malformed /etc/fstab entry can prevent the system from mounting the volume at boot and can delay boot until the file is corrected.
$ sudoedit /etc/fstab
UUID=3f5e6c0d-2c2f-4a7f-b2b7-a1d4fd6c9ec4 /mnt/data ext4 defaults 0 2
The fields are, in order, the source, mount point, filesystem type, mount options, dump flag, and filesystem check order.
Use 0 0 instead of 0 2 for filesystems that fsck does not check at boot, such as XFS, or when boot-time checking is not wanted. Options such as defaults,nofail are useful for removable or occasionally missing storage.
$ sudo findmnt --verify --verbose /mnt/data /mnt/data [ ] target exists [ ] UUID=3f5e6c0d-2c2f-4a7f-b2b7-a1d4fd6c9ec4 translated to /dev/vdb1 [ ] source /dev/vdb1 exists [ ] FS type is ext4 Success, no errors or warnings detected
If findmnt reports an error, correct the /etc/fstab line before mounting or rebooting.
$ sudo mount /mnt/data $ findmnt /mnt/data TARGET SOURCE FSTYPE OPTIONS /mnt/data /dev/vdb1 ext4 rw,relatime
When the mount point exists in /etc/fstab, mount can use the target path instead of the raw device name.