Re: mount --bind not reporting source directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/8/29 Karel Zak <kzak@xxxxxxxxxx>:
> On Sat, Aug 29, 2009 at 08:58:10PM +0200, Jonas Karlsson wrote:
>> When bind mounting a directory the source directory is not recorded
>> somewhere, instead the device at where the source directory resides is
>> recorded as origin.because of that the source directory name can't be
>> used as "key" to revert the bind mount later. See below
>>
>> jonas@Atlas /tmp]sudo mount --bind /tmp/foo /tmp/bar
>> jonas@Atlas /tmp]mount
>> [...]
>> /dev/root on /tmp/bar type reiserfs (rw,relatime)
>
>  Your /etc/mtab is symlink to /proc/mounts, right? The /proc/mounts is
>  useless for bind mounts.
>
Yes, you are correct. Removing the symlink and creating a "real" mtab
made it work. I was not aware of this effect that came into play by
the small differences between those files. Thanks.

-- 
/Jonas
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux