Skip to contentSkip to conversation

umount -a

DISCUSSION Bruce Dubbs 4 participants 4 messages Aug 2, 2011 – Aug 8, 2011 Util-Linux package

lore
Share & tools
lore
#0 lore raw

At linuxfromscratch, we've just made some changes to write bootscript messages to /run/var. This seems to work fine for us until shutdown where

umaount -a

unmounts /run which is mounted as a tmpfs. We can certainly work around the problem, but was wondering if this issue may also affect others.

The man page for umount says:

-a All of the file systems described in /etc/mtab are unmounted.
(With umount version 2.7 and later: the proc filesystem is not unmounted.)

Would it be reasonable to change umount -a to also omit /run if it is mounted as a tmpfs?

-- Bruce

#1 lore raw
Quoted 7 lines · On Tuesday, August 02, 2011 17:54:56 Bruce Dubbs wrote:

At linuxfromscratch, we've just made some changes to write bootscript messages to /run/var. This seems to work fine for us until shutdown where

umaount -a

unmounts /run which is mounted as a tmpfs. We can certainly work around the problem, but was wondering if this issue may also affect others.

you could make the same argument for /dev, but i dont think that gets handled specially either. plus, there's the whole "will only work with recent util- linux versions". so it makes sense imo to have distro init code to deal with this regardless of anything else.
-mike

maintainer
#2 lore raw
In reply to Bruce Dubbs
Quoted 9 lines · Bruce Dubbs

At linuxfromscratch, we've just made some changes to write bootscript messages to /run/var. This seems to work fine for us until shutdown where

umaount -a

unmounts /run which is mounted as a tmpfs. We can certainly work around the problem, but was wondering if this issue may also affect others.

Quoted 8 lines

The man page for umount says:

-a All of the file systems described in /etc/mtab are unmounted.
(With umount version 2.7 and later: the proc filesystem is not unmounted.)

Would it be reasonable to change umount -a to also omit /run if it is mounted as a tmpfs?

umount -a -t notmpfs ?

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#3 lore raw
Quoted 4 lines · Karel Zak
Quoted 2 lines

Would it be reasonable to change umount -a to also omit /run if it is mounted as a tmpfs?

 umount -a -t notmpfs  ?

This might not work as intended if you have a tmpfs mounted on top of a regular fs (in which case you would like to unmount them both).

I think the correct solution is to do as dracut and have a shutdown ramfs from where you can unmount rootfs and all its mountpoints.

Cheers,

-t