Pcornel
Linux · Filesystems & Mounting

Mount Options

Cheat sheet · https://pcornel.dk/topic.php?topic=2759

Back to the Topic

Answer

Mount options control how a filesystem behaves: rw/ro, noexec, nosuid, nodev, noatime/relatime, nofail, _netdev, user, and filesystem-specific ones such as discard or compress.

Remember

Check the effective options with findmnt, not fstab. Harden /tmp, /var/tmp, /dev/shm and removable media with nodev,nosuid,noexec. Use nofail and _netdev for network and non-critical mounts so boot does not hang.

First checks

  • findmnt — mount tree with options
  • df -hT — usage and filesystem types
  • findmnt --verify — check /etc/fstab
  • dmesg -T | grep -iE 'ext4|xfs|btrfs' — filesystem kernel messages

Commands

mount -a
mount -o remount <mount point>

Verify in this order

fstab options → mount → kernel enforces them for every access

Where it usually breaks

First mismatch in hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2759

Confirmation

Confirm action

Continue?