[Pkg-sysvinit-devel] Bug#481546: Bug#481546: initscripts: umountfs fails to unmount /var with RAM*
Jörg Sommer
joerg at alea.gnuu.de
Sat May 17 11:23:31 UTC 2008
Hello Petter,
Petter Reinholdtsen schrieb am Sat 17. May, 00:05 (+0200):
> [Jörg Sommer]
> > I've a separate partition for /var and I've set RAMLOCK and
> > RAMRUN. The umountfs script excludes the mountpoints /var/run and
> > /var/lock which causes /var is not unmountable. I'm using this patch
> > to solve the problem:
>
> The patch look strange. The mount points /var/run and /var/lock are
> handled specially in umountfs when $TMPFS_MTPTS is populated,
Good point. Why do you handle them specially?
> so any changes to how they are handled should be done at that location
> in the script.
That's really difficult. Because you mount /var/run and lock two times;
one time in mountkernfs and the second time in mountall with
post_mountall. This is how my mount table looks:
% cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext2 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=755 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
varrun /var/run tmpfs rw,nosuid,mode=755 0 0
varlock /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
^^^^^^^^^^^^^^^^^
usbfs /proc/bus/usb usbfs rw,nosuid,nodev,noexec 0 0
/dev/root /dev/.static/dev ext2 rw,errors=remount-ro 0 0
tmpfs /dev tmpfs rw,size=10240k,mode=755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
varrun /var/run tmpfs rw,nosuid,mode=755 0 0
varlock /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
^^^^^^^^^^^^^^^^^
/dev/hda4 /var ext3 rw,errors=continue,commit=5,data=ordered 0 0
none /tmp tmpfs rw 0 0
none /var/lib/ibam tmpfs rw,mode=755 0 0
/dev/mapper/_dev_hda5 /home/joerg ext3 rw,commit=5,data=ordered 0 0
If you don't exclude varlock and varrun in the loop in umountfs you have
them two times in the list. But proccessing this list fails, because the
first mount is below /var. You must call umount with
/var/{run,lock} /var /var/{run,lock}
But this is not in ‘order of decreasing length’ and you have to mix
TMPFS_MTPTS and REG_MTPTS.
Bye, Jörg.
--
“Hey, dad, you see how this man can twist his fingers? Amazing, isn't
it?” “No, son, not really. He's been using Emacs for ten years…”
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature http://en.wikipedia.org/wiki/OpenPGP
Url : http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20080517/9be4bfef/attachment.pgp
More information about the Pkg-sysvinit-devel
mailing list