I am looking at /etc/fstab
and the output from df
. There are far more filesystems under df
. Why is this?
1 Answer
The reason is because fstab
is not the only source of mounted partition info. As the man page for fstab
explains; bold emphasis is mine:
The file
fstab
contains descriptive information about the various file systems.fstab
is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file.
So fstab
is basically where user/administrator defined—or at least user/administrator controllable—mounts/partitions are managed; the system only reads the fstab
and does not write to it.
If you want to see what other filesystems and mount points were mounted when the system booted, check the contents of mtab
like this:
cat /etc/mtab
Or even /proc/mounts
like this:
cat /proc/mounts
Those two files are dynamically created by the system on boot and whenever a new mount
command is issued. Those files keep track of things that are mounted already and should not be touched by system users/administrators. More details on the mount
man page.
So knowing that, when you run df
—or df -h
for human readable output—what you are seeing is a report of all mounted file systems disk space usage; not just for items from fstab
but from any/all mounted file systems on the machine.