mount -a remounts tmpfs entries: bug or feature?

Denys Vlasenko vda.linux at googlemail.com
Sun Nov 23 15:01:35 UTC 2008


On Friday 07 November 2008 03:01, busybox at eehouse.org wrote:
> busybox's implementation of mount differs from the standalone version
> in not refusing to mount entries on top of each other.  With tmpfs
> entries where it's actually possible to do this, it succeeds.  That
> is, if you have a tmpfs entry in /etc/fstab and run 'mount -a' over
> and over you get stacking mounts -- but only with busybox's
> implementation.  If you try the same trick with the -v option using
> standalone mount you get an error:
> 
>  ==> sudo mount -a -v
> mount: proc already mounted on /proc
> mount: UUID=79f04f7c-1d73-45a4-b996-5a1e88c2127e already mounted on /boot
> mount: tmpfs already mounted on /var/tmp
> nothing was mounted
> 
> Is this a bug or intentional?

It is not intentional.

However, I'd find it difficult to formulate exact logic
how mount -a should behave if *some* of mounts are already
done. Might get real weird in corner cases of stacked mounts,
union mounts, mounts with some options differing and so on.
--
vda



More information about the busybox mailing list