'mount -a' remounts tmpfs /tmp, clobbering old /tmp, ouch!

Denis Vlasenko vda.linux at googlemail.com
Sat Apr 28 14:09:30 PDT 2007


On Tuesday 24 April 2007 01:05, Clem Taylor wrote:
> So busybox mount is just (re-)mounting all the devices, most mount
> points return EBUSY, but the tmpfs mount happily does the mount. This
> creates a new tmpfs file system, clobbering (orphaning?) the old one.

It's not clobbered. Unmount new one and you will see old one again.

> On my desktop machine, util-linux 'mount -a' does not seem to attempt
> to remount already mounted file systems.
> 
> The only reason I was running 'mount -a' was because the USB storage
> device doesn't exist when the intial mount command was run, once the
> USB devices are discovered, I wanted to mount any missing filesystems.
> 
> Should busybox be more careful with what it attempts to mount or
> should tmpfs check if the filesystem is already mounted? Running
> 'mount -a' more then once seems perfectly reasonable to me...

It's difficult to say. Unless you know any standard which says what
mount -a should do in this case, we will probably stick
to smallest version.
--
vda


More information about the busybox mailing list