mount -a remounts tmpfs entries: bug or feature?

Denys Vlasenko vda.linux at googlemail.com
Tue Nov 25 02:48:04 PST 2008


On Tuesday 25 November 2008 08:16, Roy Marples wrote:
> On Tue, 2008-11-25 at 03:04 +0100, Denys Vlasenko wrote:
> > On Monday 24 November 2008 10:21, Ralf Friedl wrote:
> > > Vladimir Dronnikov wrote:
> > > >
> > > >     > run 'mount -a' over and over you get stacking mounts
> > > >
> > > > Personally, I'd like to be able to mount valid stuff the way I wish. 
> > > > So BB behaves right.
> > > For a manual mount, I agree.
> > > But I think 'mount -a' should mount everything from /etc/fstab, unless 
> > > it is already mounted.
> > 
> > Define "already mounted". It's not trivial.
> 
> The canonical entry exists in mtab and matches mnt_dir and is of
> mnt_type.
> The code in util-linux does this.
> FWIW, the BSD mount does the same thing (although it doesn't use mtab).

Should mount options match? Should order of mount options match?

What if fstab specifies "mount /dev/sdb1 on /usr and /dev/sdb2 on
/usr/storage" and we find that /dev/sdb2 is mounted on /usr/storage,
but /dev/sdb1 is not mounted? Should we mount /dev/sdb1?
But that will "cover" /usr/storage mountpoint!

--
vda


More information about the busybox mailing list