| Tested on | RHEL 10.2 (Coughlan) |
|---|---|
| Package | util-linux 2.40.2-18.el10coreutils 9.5-8.el10_2systemd 257-23.el10_2.2 |
| Applies to | Ubuntu, Debian, Kali Linux, Linux Mint, Pop!_OS, Raspberry Pi OS, elementary OS, Zorin OS, Parrot OS, MX Linux, RHEL, Rocky Linux, AlmaLinux, Oracle Linux, CentOS Stream, Fedora, Arch Linux |
| Privilege | sudo or root for mount, fstab edits, and label changes |
| Scope | Persistent local mounts with /etc/fstab; UUID and LABEL identifiers; mount options; mount -a and findmnt verification; single-entry mount; bad-entry recovery. Does not cover partitioning, formatting, NFS exports, autofs, or ISO/USB/network mount workflows. |
| Related guides | Create and mount filesystems Linux mount command lsblk command LVM in Linux RHCSA tutorial |
/etc/fstab. It does not walk through creating partitions, mkfs, NFS server setup, or autofs maps—those live in separate storage articles linked where they apply.
A mount /dev/sdb1 /data command lasts until reboot. To keep /data after every boot, you register the filesystem in /etc/fstab with a stable identifier—usually UUID=—so the mount survives when the kernel reorders disks. The walkthrough below uses a spare data disk on the lab host; if you still need partitioning or mkfs, start with create and mount filesystems first.
How Persistent Filesystem Mounting Works
Linux separates three ideas beginners often conflate:
| Concept | What it is |
|---|---|
| Block device | A disk partition or logical volume such as /dev/sdb1 or /dev/mapper/rhel-root |
| Filesystem | The formatted data structure on that device (XFS, ext4, swap, and so on) |
| Mount point | A directory where the filesystem tree is attached, such as /data. The directory does not have to be empty, but existing contents are hidden while another filesystem is mounted there |
A temporary mount runs mount once. The kernel attaches the filesystem until you umount or reboot. A persistent mount adds a line to /etc/fstab so boot tools and mount -a know which source, type, and options to apply at /data every time.
Device paths like /dev/sdb1 are not stable identifiers. BIOS order, new disks, or USB insertions can shift names so yesterday's /dev/sdb1 becomes /dev/sdc1. UUID and LABEL identify the filesystem (or swap area) itself, which is why Anaconda writes UUID lines on RHEL installs.
On the lab host, Anaconda already registered root, boot, and swap by UUID:
head -15 /etc/fstabSample output:
#
# /etc/fstab
# Created by anaconda on Mon Aug 3 05:57:29 2026
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=96b3becc-49da-4746-89b4-6b44cc1daf47 / xfs defaults 0 0
UUID=cbd838ad-a342-4b56-b65f-da022e195971 /boot xfs defaults 0 0
UUID=78531da6-a389-46e8-9bad-267572940826 none swap defaults 0 0Those comments remind you that stable symlinks live under /dev/disk/ and that systemd reads the same file.
/etc/fstab Quick Reference
Keep this table nearby while you edit. Field meanings are expanded in the next section.
Example line shapes:
UUID=<uuid> /data xfs defaults 0 0
LABEL=backup /backup ext4 defaults 0 2| Task | Command |
|---|---|
| Show filesystem UUIDs and types | lsblk -f |
| Inspect one block device | blkid /dev/sdb1 |
| List active mounts | findmnt |
| Mount all fstab entries | mount -a |
| Reload generated mount units | systemctl daemon-reload |
| Show source for one mount point | findmnt /data |
| Validate fstab before reboot | findmnt --verify |
Understand the Six /etc/fstab Fields
Each non-comment line has six fields separated by whitespace or tabs:
<identifier> <mount point> <type> <options> <dump> <fsck>- Device or filesystem identifier —
UUID=…,LABEL=…,/dev/mapper/…, or a device path. Prefer UUID for local data disks. - Mount point — Directory path where the filesystem attaches (or
nonefor swap). Existing files in the directory are hidden while another filesystem is mounted on that path. - Filesystem type —
xfs,ext4,swap,vfat, and so on. Useautoonly when you understand the risk. - Mount options — Comma-separated flags such as
defaultsorrw,noatime. - dump —
0skips the legacydumpbackup tool;1includes the filesystem. Almost always0today. - fsck order —
0skips boot-time fsck for this filesystem.1is traditionally the root filesystem on ext4.2checks other ext4 filesystems after root. On RHEL, XFS fstab lines use0in this column—fsck.xfsis only a compatibility stub and XFS does not perform a traditional boot-time fsck. The lab's XFS root, boot, and data examples all use0 0.
Device Name vs UUID vs LABEL
| Identifier | Points at | Stable when disks reorder? |
|---|---|---|
/dev/sdb1 |
Partition device node | No |
UUID=… |
Filesystem superblock | Yes |
LABEL=… |
Filesystem label in superblock | Yes, if unique |
PARTUUID=… |
Partition table entry | Partition stable, not filesystem |
/dev/disk/by-uuid/… |
Symlink to device | Same as UUID |
PARTUUID identifies the partition slot, not the filesystem inside it. After reformatting the partition, the PARTUUID may stay while the filesystem UUID changes.
Stable symlinks on the lab host map UUIDs to block devices:
ls -la /dev/disk/by-uuid/ | head -6Sample output:
total 0
drwxr-xr-x. 2 root root 100 Aug 8 15:08 .
drwxr-xr-x. 7 root root 140 Aug 8 15:08 ..
lrwxrwxrwx. 1 root root 10 Aug 8 15:08 78531da6-a389-46e8-9bad-267572940826 -> ../../dm-1
lrwxrwxrwx. 1 root root 10 Aug 8 15:08 96b3becc-49da-4746-89b4-6b44cc1daf47 -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Aug 8 15:08 cbd838ad-a342-4b56-b65f-da022e195971 -> ../../sda2Before any labeled filesystem existed, /dev/disk/by-label/ was absent on this VM—labels appear only after you set them on a formatted filesystem.
Find a Filesystem UUID
List friendly columns for every block device:
lsblk -fSample output (lab host, trimmed):
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda2 xfs cbd838ad-a342-4b56-b65f-da022e195971 1.4G 26% /boot
└─sda3 LVM2_member LVM2 001 kK0T8E-lrVU-PAkS-fdwT-wIlJ-S32a-VaNd7X
├─rhel-root xfs 96b3becc-49da-4746-89b4-6b44cc1daf47 15.8G 37% /
└─rhel-swap swap 1 78531da6-a389-46e8-9bad-267572940826 [SWAP]
sdbRead FSTYPE for the filesystem type, LABEL when set, UUID for fstab, and MOUNTPOINTS for where it is already attached.
For one partition, blkid prints the exact strings you paste into fstab:
blkid /dev/sda2Sample output:
/dev/sda2: UUID="cbd838ad-a342-4b56-b65f-da022e195971" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="148448c7-94ed-4278-b445-c84cc78e4a22"That UUID matches the /boot line in /etc/fstab and the findmnt source below.
Assign and Use Filesystem Labels
Labels are optional human-readable names stored in the filesystem superblock. They must be unique among filesystems on the same machine if you mount by LABEL=.
Brief tool reference:
| Filesystem | Set or change label |
|---|---|
| XFS | xfs_admin -L newlabel /dev/sdb1 — unmount the filesystem first |
| ext4 | e2label /dev/sdb1 newlabel or tune2fs -L newlabel /dev/sdb1 |
| VFAT | fatlabel /dev/sdb1 NEWLABEL |
On the lab data disk the XFS label was set during formatting with mkfs.xfs -L labdata. To read it later:
xfs_admin -l /dev/sdb1Sample output:
label = "labdata"Duplicate labels make LABEL= mounts ambiguous—always verify with blkid after changes.
Mount a Filesystem Temporarily by UUID
Before you edit fstab, confirm the UUID mounts cleanly. Create the mount point if it does not exist:
mkdir -p /dataMount by UUID (use the value from blkid):
mount UUID=276aa1ee-3141-49fc-a2d3-8b631bbc281a /datamount prints nothing on success. Confirm the attachment:
findmnt /dataSample output:
TARGET SOURCE FSTYPE OPTIONS
/data /dev/sdb1 xfs rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquotaThe source shows /dev/sdb1 even though you passed UUID—findmnt resolves the device node.
Create a Persistent Mount with UUID
This is the central workflow. The lab used /dev/sdb1 with XFS and label labdata on a spare 10 GiB disk—filesystem creation is out of scope here; see create and mount filesystems if you still need that step.
Capture the UUID you will paste into fstab:
blkid /dev/sdb1Sample output:
/dev/sdb1: LABEL="labdata" UUID="276aa1ee-3141-49fc-a2d3-8b631bbc281a" BLOCK_SIZE="512" TYPE="xfs" PARTLABEL="primary" PARTUUID="7bbbdf4f-1690-4167-b852-f866a80a2ce5"Back up fstab before every edit:
cp -a /etc/fstab /etc/fstab.bakAdd one line (tabs or spaces between fields):
UUID=276aa1ee-3141-49fc-a2d3-8b631bbc281a /data xfs defaults 0 0Run systemctl daemon-reload so systemd regenerates .mount units from the edited fstab. That step updates generated unit definitions for the running manager—it does not perform the mount test.
mount -a is independent: the mount utility reads /etc/fstab itself and tries to attach every entry that is not already mounted. Run both after a normal fstab edit; they answer different questions (unit regeneration versus whether the lines actually mount).
systemctl daemon-reloadIf /data was mounted manually during testing, unmount so mount -a exercises the fstab line:
umount /dataApply every fstab entry that is not already mounted:
mount -amount -a exits silently when all entries succeed. Verify:
findmnt /dataSample output:
TARGET SOURCE FSTYPE OPTIONS
/data /dev/sdb1 xfs rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquotaRun the fstab verifier:
findmnt --verifySample output:
Success, no errors or warnings detectedOn a maintenance host, reboot once and run findmnt /data again to confirm the mount returns without manual mount. The shared lab skipped reboot to avoid disrupting other work; mount -a plus findmnt --verify is the minimum gate before you reboot production systems.
Create a Persistent Mount with LABEL
Replace only the first fstab field when the label is unique:
LABEL=labdata /data xfs defaults 0 0Advantages: readable in findmnt and logs. Limitations: labels are user-assigned and can collide; UUIDs are globally unique by design. Many teams use UUID in fstab and labels only for operator notes.
Test LABEL mounts without fstab first:
umount /dataMount by label to confirm the name resolves to the intended filesystem:
mount LABEL=labdata /dataConfirm:
findmnt /dataSample output:
TARGET SOURCE FSTYPE OPTIONS
/data /dev/sdb1 xfs rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquotaAfter you trust the label, swap the fstab identifier field, run systemctl daemon-reload and mount -a on a booted system, then findmnt --verify.
Understand Common Mount Options
The fourth fstab field is a comma-separated list. defaults on RHEL is typically rw,suid,dev,exec,auto,nouser,async.
| Option | Effect |
|---|---|
defaults |
Distribution default bundle—usually read-write with normal device and suid behavior |
ro / rw |
Read-only versus read-write |
noexec |
Block executable binaries from this filesystem |
nosuid |
Ignore setuid bits on files |
nodev |
Block device nodes on this filesystem |
noatime |
Skip updating file access times on read (can reduce write load) |
nofail |
Boot continues if this mount fails—useful for optional data disks |
This article is not a hardening guide—pick options that match how the data is used. nofail is common for non-critical volumes so a missing USB disk does not drop the system into emergency mode.
Mount Only One /etc/fstab Entry
When the line exists in fstab, mount can take only the mount point:
umount /dataPass only the mount point so fstab supplies the UUID, filesystem type, and options:
mount /dataConfirm the entry mounted from fstab:
findmnt /dataSample output:
TARGET SOURCE FSTYPE OPTIONS
/data /dev/sdb1 xfs rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquotaThe same pattern works for /boot on the lab system—fstab already maps UUID to mount point:
findmnt /bootSample output:
TARGET SOURCE FSTYPE OPTIONS
/boot /dev/sda2 xfs rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquotaVerify /etc/fstab Before Rebooting
Editing fstab and rebooting immediately is how administrators learn emergency mode. Validate first on a normally booted system:
systemctl daemon-reload— regenerate systemd.mountunits from the saved fstabmount -a— let themountutility read fstab and surface UUID, type, or option errorsfindmnton each new mount pointfindmnt --verifywhen available
daemon-reload does not mount filesystems; mount -a does not refresh systemd units. Both are worth running before reboot because they test different layers.
Skipping mount -a means the first boot attempt becomes the test. A wrong UUID or missing mount point can stall boot until you fix fstab from rescue or rd.break.
Change an Existing /etc/fstab Entry
Common edits and what they require:
| Change | Typical workflow |
|---|---|
/dev/sdb1 → UUID= |
Edit fstab, daemon-reload, then mount -a on a running system—no umount if UUID points at the same filesystem |
| New mount point path | Create directory, update fstab, umount old path, mount -a |
Add noexec or ro |
Edit options, umount and mount that entry (or reboot) so new flags apply |
| Wrong filesystem type | Fix type field, mount -a—will fail until type matches blkid |
LVM logical volumes keep the same /dev/mapper/rhel-root path and UUID when you extend the LV—see extend an LVM partition for growth without fstab changes.
Troubleshoot /etc/fstab Errors
| Symptom | Likely cause | Fix |
|---|---|---|
mount -a reports wrong fs type |
TYPE in fstab does not match blkid |
Correct the third field |
can't find UUID |
Typo or filesystem replaced | Re-run blkid, update first field |
mount point does not exist |
Missing directory | mkdir -p the mount point |
already mounted |
Duplicate entry or manual mount | findmnt, remove duplicate line or umount first |
Two LABEL= with same name |
Duplicate labels | Change label on one filesystem |
| Boot drops to emergency mode | Bad root or required mount line | Fix or comment line; see recovery section |
mount -a works but boot fails |
nofail missing on optional disk that was offline at boot |
Add nofail or ensure disk is present |
findmnt --verify warnings |
Deprecated paths or bind mounts | Read verifier message; align with UUID |
Recover from a Bad /etc/fstab Entry
When boot hangs after an fstab edit, you need console access—not SSH.
- Interrupt GRUB and boot with
rd.breakor select recovery media if the system does not reach login—see reset root password on RHEL for the GRUB edit pattern and systemd targets for rescue versus emergency semantics. - In rd.break:
mount -o remount,rw /sysroot, thenchroot /sysroot. - Comment the bad fstab line with
#or fix the UUID, mount point, and type. - Inside the chroot, run
mount -ato test the corrected file. Do not rely onsystemctl daemon-reloadhere—you are not in the normally booted systemd environment. - Exit the chroot and initramfs shell, then reboot so the installed system boots with the fixed fstab.
- After a normal boot, run
systemctl daemon-reloadandfindmnt --verify, then confirm mounts withfindmnt.
Keep a known-good fstab.bak on the system or in your change ticket so recovery is a copy operation under pressure.
UUID and Label Examples
| Use case | Identifier example | Notes |
|---|---|---|
| Data disk | UUID=276aa1ee-3141-49fc-a2d3-8b631bbc281a |
Spare partition XFS on /data |
| Boot partition | UUID=cbd838ad-a342-4b56-b65f-da022e195971 |
Matches /boot on lab host |
| LVM root | UUID=96b3becc-49da-4746-89b4-6b44cc1daf47 |
Filesystem UUID on /dev/mapper/rhel-root |
| Swap | UUID=78531da6-a389-46e8-9bad-267572940826 |
none mount point, type swap |
| Removable USB | UUID=… with nofail |
Optional mount; may be absent at boot |
Network filesystems and autofs use different configuration files—see NFS client setup and autofs guides when the mount is not a local block device. Temporary ISO, USB, and network mounts belong in Linux mount command rather than duplicated here.
References
- fstab(5) — static filesystem information
- mount(8) — mount a filesystem
- findmnt(8) — find a mount point
- blkid(8) — locate block device attributes
- Red Hat Enterprise Linux 10 — Managing file systems
Summary
Persistent mounts on Linux live in /etc/fstab, not in your shell history. A temporary mount /dev/sdb1 /data disappears at reboot; a UUID line tells the boot stack which filesystem to attach at /data every time. UUID is the usual choice for local disks because it follows the formatted filesystem when kernel device names shuffle.
The safe edit path on a running system is backup, add the line, systemctl daemon-reload (regenerate systemd mount units), mount -a (test fstab through the mount utility), findmnt, and findmnt --verify—then reboot when you have a maintenance window. LABEL mounts work the same way when labels are unique, but duplicate labels break mount in ways UUIDs avoid.
When mount -a fails or boot lands in emergency mode, fix or comment the offending line from console access before you reboot again. Partitioning and mkfs belong in create and mount filesystems; NFS, autofs, and one-off mount targets belong in their dedicated guides—not mixed into every fstab lesson.

