findmnt — Every Mount on the Machine, the One Underneath It, and the fstab Check Before You Reboot

ByLinuxtastic

December 1, 2026

A backup disk “mounted fine” and the data on it is three weeks old. A container cannot see a directory the host swears is there. df says a path is on / and the files in it are clearly not. Every one of these is a question about the mount table — what is mounted where, on top of what, with which options, from which namespace — and findmnt is the one command built to answer it. It reads the same kernel table mount and df read, but it shows all of it, as a tree, including the mounts those two hide; it can look up a single path and say which mount it is really on; it can check /etc/fstab for mistakes before you reboot into them; and it can sit and watch mounts come and go.

findmnt
findmnt /var/lib/docker
findmnt -T /var/lib/docker/volumes/db/_data

With no arguments it prints every mount as a tree under /, four columns: target, source, filesystem type, options. With a path it prints the entry for that mount point — or nothing, exit status 1, if the path is not one. With -T (--target) it prints the mount that contains the path, which is the question people usually mean: not “is this a mount point” but “which filesystem are these bytes actually on”. Measured, on an Ubuntu 24.04 machine whose root is /dev/vda:

$ findmnt /
TARGET SOURCE   FSTYPE OPTIONS
/      /dev/vda ext4   rw,relatime,discard,no_prefetch_block_bitmaps,resv_strict,resuid=65534,resgid=65534
$ findmnt /opt; echo "rc=$?"
rc=1
$ findmnt -T /opt/claude-code/bin -no TARGET,SOURCE
/opt/claude-code /dev/vdc
$ findmnt -l | wc -l
28
$ findmnt --real -l | wc -l; findmnt --pseudo -l | wc -l
8
21

/opt is a directory, not a mount, so the plain form says nothing; -T on a path inside /opt/claude-code finds the mount above it. -l is the flat list instead of the tree, and --real and --pseudo split the table into the eight mounts that are backed by a device and the twenty that are kernel furniture (proc, sysfs, cgroups, devpts). On a server with containers the full table runs to hundreds of lines and --real is the one you want first.

The mount underneath the mount

A directory can have more than one thing mounted on it. Only the top one is visible to programs; the others are still there, still mounted, and still listed — by findmnt and by nothing else you normally reach for. df shows one entry, stat can name the wrong filesystem entirely, and the data you are looking at may be the newest mount rather than the one you think. Measured, with two bind mounts stacked on one directory:

$ mount --bind a b; mount --bind c b
$ cat b/f
from c
$ findmnt -no SOURCE,TARGET b
/dev/vda[/srv/lab/a] /srv/lab/b
/dev/vda[/srv/lab/c] /srv/lab/b
$ df --output=source,target b | tail -1
/dev/vda       /srv/lab/b
$ stat -c %m b/f
/
$ umount b; cat b/f
from a
$ umount b; cat b/f
cat: b/f: No such file or directory

findmnt lists both mounts on b, oldest first, with the device[subdirectory] notation that tells you a bind mount’s real origin. df reports one line. stat‘s %m — the “mount point” of a file — answers /, because it finds a mount point by walking up until the device number changes, and a bind mount from the root filesystem never changes it. One umount reveals the mount underneath, with the older data; the second reveals the empty directory that was there all along. This is exactly the shape of the stale-backup-disk problem: the disk was mounted over a directory that already had a copy of the data, or a second mount landed on top of the first, and every tool but findmnt told you what you expected to hear.

The same machine shows a real example without any setup: findmnt /dev/shm prints two identical tmpfs lines, because the sandbox’s init mounted it twice. Harmless here; on a host where the second mount was a tmpfs over a directory of real files, it would be the reason the files vanished.

Options

FlagMeaning
findmnt [PATH]The whole table as a tree; with a path, the entry whose target or source is exactly that path (status 1 if none)
-T PATH / --targetThe mount containing the path (the path must exist); the usual “which filesystem is this on” question
-l / -rFlat list instead of a tree / raw whitespace-separated output for scripts
-nNo header line
-o COLSChoose columns: TARGET,SOURCE,FSTYPE,OPTIONS by default; also SIZE,USED,AVAIL,USE%, PROPAGATION, UUID,LABEL, MAJ:MIN, FSROOT, OPT-FIELDS, ID,PARENT and more (--help lists them)
-D / --dfA df-shaped view (source, type, size, used, available, use%, target) that still includes pseudo filesystems
--real / --pseudoOnly mounts backed by a device / only the kernel’s virtual ones
-t TYPESOnly these filesystem types, comma-separated; -t noproc,nosysfs excludes
-O OPTSOnly mounts with these options, e.g. -O ro or -O nodev,noexec; -O +ro and -O no-ro are exact and negated forms
-RRecursive: a mount point and everything mounted under it
-s / --fstabRead /etc/fstab instead of the kernel table (what should be mounted)
-x / --verifyCheck fstab (or --tab-file FILE) for unreachable sources, missing targets, bad options and type mismatches; exits non-zero on errors
-e / --evaluateResolve UUID=, LABEL=, PARTUUID= tags to device paths in the output
-p / --poll[=mount,umount,remount,move]Block and print mount-table changes as they happen; -w MS gives up after that long
-N PIDThe mount table as seen by that process’s mount namespace — a container’s view, from the host
-JJSON output
-k / -mForce the kernel table (/proc/self/mountinfo, the default) / the legacy /etc/mtab

Checking fstab before the reboot checks it for you

An fstab line that names a UUID that no longer exists, without nofail, drops the next boot into emergency mode. findmnt --verify reads the file the way the boot will and reports what it would trip over, without mounting anything. Measured against a three-line test file (--tab-file points it at a file other than the real /etc/fstab):

$ cat fstab.test
UUID=0000-nope /mnt/data ext4 defaults,nofail 0 2
/dev/vdb /opt/rclone squashfs ro 0 0
/dev/vdd /opt/env-runner ext4 defaults 0 0
$ findmnt --verify --tab-file fstab.test; echo "rc=$?"

0 parse errors, 2 errors, 2 warnings
/mnt/data
   [E] unreachable on boot required target: No such file or directory
   [E] unreachable on boot required source: UUID=0000-nope
/opt/rclone
   [W] cannot detect on-disk filesystem type (Operation not permitted)
/opt/env-runner
   [W] cannot detect on-disk filesystem type (Operation not permitted)
rc=1

Two errors on the first line — the UUID matches nothing and the mount point does not exist — and warnings on the other two because the sandbox is not allowed to open the block devices to confirm their types; on a real host with root those warnings become either silence or a genuine type-mismatch error, which is the one that saves a reboot. Note that nofail on the first line does not make the verifier quieter: it reports what is wrong, and leaves “is that acceptable” to you. Run it after every fstab edit, before systemctl daemon-reload and long before the next reboot. findmnt -s prints the fstab entries themselves, and -e turns UUID=… into the device it currently resolves to — or blank, when it resolves to nothing, which is the same fault seen from the other direction.

Watching mounts happen

Something mounts and unmounts a filesystem and you cannot see what: a container runtime, an automounter, a USB device, a unit with a RequiresMountsFor=. --poll blocks on the kernel’s mount table and prints each change as it lands:

$ findmnt --poll=mount,umount -o ACTION,TARGET,FSTYPE
ACTION     TARGET      FSTYPE
mount      /mnt/pollme tmpfs
umount     /mnt/pollme tmpfs

That was a mount -t tmpfs and an umount run in another shell while findmnt waited. Add remount and move to the list to catch option changes and mount --move; the OLD-TARGET and OLD-OPTIONS columns show what a remount or move changed from. Leave it running in a tmux pane while you reproduce the problem, and the mystery mount names itself.

Mounts a container can and cannot see

Every container has its own mount namespace, so “the directory is mounted” on the host says nothing about whether it is mounted there. findmnt -N PID reads the table as seen by that process — -N 1 is the host’s own init, and the PID of a container’s main process (from docker inspect or ps) gives the container’s view without entering it. The PROPAGATION column (private, shared, slave) explains the other half of the puzzle: a mount made on the host after the container started only appears inside it if the parent mount’s propagation allows, and the default on most hosts is private, which is the setting the sandbox’s root shows too. A volume that exists on the host and is empty in the container is almost always one of these two things, and findmnt -N settles which in one line. nsenter, unshare and lsns is the page for going in; this one is for looking from outside.

Where it does not reach

findmnt reads /proc/self/mountinfo; it reports what the kernel says is mounted, not whether the filesystem is healthy, whether the device behind it is still attached, or what the free space is for anything but the -D columns. A mount whose NFS server has gone away still appears, options and all, and findmnt will not hang on it — but df and ls will. For block devices and partitions that are not mounted, and for which disk is behind a device name, it has nothing to say: that is lsblk, blkid and wipefs. And -T needs the path to exist, so it cannot tell you where a file would land before you create it; -T on the parent directory does.

Common problems

SymptomCauseCheck / fix
Mounted disk shows old dataMounted over a directory that already held a copy, or a second mount on topfindmnt TARGET lists more than one line; umount once and look again; the directory under the mount may hold the “missing” files
df says a path is on / but it clearly is notBind mount from the root filesystem; same device number, so df/stat walk up to /findmnt -T PATH shows /dev/root[/origin]
findmnt PATH prints nothingThe path is inside a mount, not a mount point itselfUse -T PATH
findmnt -T PATH exits 1The path does not existGive it the nearest existing parent
Boot drops to emergency mode after an fstab editUnreachable UUID or missing mount point, no nofailfindmnt --verify before rebooting; findmnt -se to see what each tag resolves to
Volume empty inside a container, full on the hostMounted on the host after the container started, under a private parent; or a different namespace entirelyfindmnt -N PID -T /path from the host; check -o PROPAGATION on the parent
Hundreds of lines, mostly cgroups and overlaysContainers, snaps and systemd each add mounts--real, -t nooverlay,nosquashfs, or -R /srv to scope it
Something mounts and unmounts a path and nothing logs itAutomounter, runtime, hotplugfindmnt --poll in a second terminal while reproducing
findmnt and mount disagree with /etc/mtabmtab is a stale file (or a symlink to the kernel table on modern systems)Trust findmnt -k; -m shows the legacy file for comparison

Quick reference

findmnt                              # everything, as a tree
findmnt --real                       # only device-backed mounts
findmnt -T /path/to/file             # which mount a path is really on
findmnt /mnt/data                    # is this a mount point (and how many times)
findmnt -no SOURCE,FSTYPE,OPTIONS /  # just these columns, no header
findmnt -D                           # df-shaped, pseudo filesystems included
findmnt -t ext4,xfs -O rw            # filter by type and option
findmnt -R /var                      # a mount and everything under it
findmnt -s                           # what fstab says should be mounted
findmnt -se                          # ...with UUID= and LABEL= resolved
findmnt --verify                     # check fstab before you reboot into it
findmnt --poll=mount,umount,remount  # watch the table change
findmnt -N 1                         # the host's table from inside a container
findmnt -N $(pgrep -f myservice) -T /data   # a container's view, from the host
findmnt -J / | jq .                  # JSON for scripts

Related reading

  • The Life of a Block Device — the long one on how a disk becomes a mount, and the stale-backup-disk case this page’s box reproduces
  • lsblk, blkid and wipefs — the devices and partitions underneath the mounts, mounted or not
  • Disk space — df and du, and why their answers differ from each other and from this page
  • stat — where the %m in the box comes from, and what it is good for
  • nsenter, unshare and lsns — entering the mount namespace -N only looks at
  • Restoring a Linux Server — the mounts that did not come back, and how to tell before the data is missing