1

The mount command and cat /proc/mounts only list those mount options that have values different than default.

How can I obtain (for a given mounted partition) an exhaustive list of the applied values of all the mount options that the partition's filesystem defines? Think "computed style" but for a mounted partition rather than a HTML element ;)

2
  • 2
    On which version of which operating system? Apr 6, 2019 at 2:55
  • Does this help: sudo tune2fs -l <device> Apr 6, 2019 at 13:37

2 Answers 2

2

The generic Linux mount interface does not provide any more information about this.

The default generic mount options are rw,suid,dev,exec,async. (I looked in man mount for the definition of defaults, and removed anything that was not a kernel mount flag).

To take one popular example, the ext4 filesystem does not show the full list of default ext4 options in /proc/mounts. You should be able to work out most of the defaults just from reading the "Mount options" sections in man ext4. This is a lot of reading :-). It also says it could vary depending on the kernel version. For the ones it does not specify, it appears that:

  • acl is enabled by default, if the kernel was built with support for it (CONFIG_EXT4_FS_POSIX_ACL=y).
  • delalloc is enabled by default for filesystems created as ext4.
  • auto_da_alloc is enabled by default.
2

Here is an example with EXT4. More complete list of applied mounting options:

cat /proc/fs/ext4/sda1/options

Full list of available mounting options:

https://docs.kernel.org/admin-guide/ext4.html

And also directly look at the kernel source code: ./linux/fs/ext4/

2
  • Nice. /proc/fs/<fs>/<bdev>/options doesn't seem to be available for btrfs at least though (and one btrfs FS can be backed by more than one block device, not sure how that would be reflected there if it was supported; not to mention that like on ZFS, different subvols can have different mount options). Mar 22 at 9:09
  • You could also mention /proc/self/mountinfo that sometimes has more information than /proc/mounts. See also findmnt --output-all -J Mar 22 at 9:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .