: /etc/mtab

Dan Egli ddavidegli at gmail.com
Mon Sep 16 04:14:42 MDT 2013


*Hey pluggers, I'm in the middle of an argument with another Linux guy, so
I'm hoping that you all can settle the argument once and for all. He and I
were debating the criticality of various files in /etc to the immediate
operation of a computer. Most we agree on, but he seems to be indicating
that /etc/mtab is of higher import to the system than I think it is. Yes,
it maintains a list of all file systems presently mounted. But if the file
was ever altered other than by the kernel or the mount/umount commands,
what would be the effect?*

* *

*For example, suppose the mtab lists the following file systems mounted
(and I know this isn't how it's stored in the file, but you get the idea):*

*/dev/sda1 - ext4 on /*

*/dev/sda2 - swap on none*

*/dev/nfs  - nfs:192.168.2.1:/programs on /progs*

* *

*Now, suppose that without actually unmounting the file system, the last
line (the nfs mount) disappears from the file (either by corruption or by
malice). What would be the actual effect on the system? It wouldn't
actually unmount the nfs directory would it? In such a hypothetical
example, the files in the nfs directory would still be accessible under
/progs, wouldn't they? the system just wouldn't be able to properly unmount
the nfs directory, correct? Or am I completely wrong on this?*

* *

*Your help in solving this disagreement is appreciated!*

* *
*--- Dan*


More information about the PLUG mailing list