Re: no /etc/mtab and mount bind
Le jeudi 22 mars 2007 14:33, Bernard a écrit :
> Hi,
>
> On our servers /etc is read-only. Therefore, I don't have /etc/mtab.
>
> My problem is to find which mounts are bind mounts (mount --bind ...).
> Normally in the file mtab the mounts are shown with the option "bind".
> Is there another way to find which mounts are mount bind?
> I thought in /proc I could find something but I didn't find anything.
>
> Someone has a trick on this?
mount with no args should give a list of all mounted devices and their
options, including bind, but I don't know if it uses mtab or not. The same
infos are in /proc/mount, but the bind option doesn't seem to appear there.
The only solution I can see is to check for the device inode (stat -c '%d')
of all your mount points, looking for duplicate ones, but there's probably
simpler...
--
Cédric Lucantis
Reply to: