mount command absurdly verbose?

Marko Vojinovic vvmarko at gmail.com
Tue Nov 22 19:01:43 UTC 2011


On Tuesday 22 November 2011 16:25:06 Reindl Harald wrote:
> Am 22.11.2011 16:09, schrieb Andras Simon:
> > Hmmm. I wonder why /dev/sdb8 is mounted to 3 different places?
> > I see here something like this too:
> > 
> > /dev/sda1 on / type ext2
> > (rw,noatime,nodiratime,seclabel,errors=continue)
> > /dev/sda1 on /home type ext2
> > (rw,noatime,nodiratime,seclabel,errors=continue)
> > 
> > sda1 should only be mounted to / (according to fstab).
> 
> you know "bind mounts"?
> and that is why the behavior since F15 is a bad joke
> 
> you will need them to chroot sftp-users to different phyiscal folders
> you will need them to provide a physical path of a production server
> in test-environment while symlinks would change the realpath and
> a bind mount does not

After some reading about this, it appears to me that the problem lies in the 
common misconception that bind mounts are somehow different from ordinary 
mounts. And they aren't --- the kernel does not make any difference between an 
ordinary mount and a bind mount. See for example

  http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html
  
for a nice explanation.

Consequently, all userspace apps which relied on this "difference" were broken 
to begin with, and need to be fixed.

The only issue is that before F15 this was not obvious. F15 featured a new 
version of gnulib which basically made /etc/mtab obsolete (as far as I 
understood). Since F15 /etc/mtab is just a symlink to /proc/self/mounts, and I 
guess it will probably be removed altogether in the future.

Also, this is not just for Fedora, but rather *all* Linux distributions which 
feature the recent gnulib. And it seems that everybody decided to go for the 
"mtab is a symlink" behavior for the time being.

So if your favorite userspace app misbehaves because of this, file a bug 
against it and persuade the relevant devs to fix it.

HTH, :-)
Marko




More information about the users mailing list