Skip to content
Latchkey

mount and findmnt: Inspect Filesystems in CI

mount and findmnt list every mounted filesystem with its device, type, and mount options, revealing read-only, full, or tmpfs mounts that break a build.

A step that fails to write often hits a read-only or full mount. findmnt and mount show the mount table so you can see exactly where a path lives and how it is mounted.

What it does

mount with no arguments prints the current mount table. findmnt renders it as a searchable tree and can target a single path. The options column shows ro (read-only) vs rw, and the FSTYPE column shows tmpfs (RAM-backed), overlay (container layers), nfs, and so on.

Common usage

Terminal
findmnt
findmnt /tmp                     # how is /tmp mounted
mount | grep -E ' ro,| ro '      # read-only mounts
findmnt -t tmpfs                 # all tmpfs (RAM) mounts

Options

Command / flagWhat it does
mountList all mounts (device on path type opts)
findmnt <path>Show the mount backing a specific path
findmnt -t <type>Filter by filesystem type (tmpfs, overlay)
findmnt -DShow free space per mount (df-like)
findmnt -o TARGET,SOURCE,FSTYPE,OPTIONSPick columns

In CI

A "Read-only file system" (EROFS) error means the target path is on an ro mount; findmnt <path> confirms it and write to a rw location like /tmp instead. If /tmp is a small tmpfs, large temp files fill RAM and fail; findmnt -D /tmp shows its size. Overlay mounts indicate you are inside a container, where the writable layer may be size-capped.

Common errors in CI

"touch: cannot touch ‘/x’: Read-only file system" is an ro mount; pick a writable path. "No space left on device" (ENOSPC) on a tmpfs means the RAM-backed mount filled, not the disk; check findmnt -D. A bind-mounted source from the host that does not exist shows up as a surprising path in the mount table.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →