User Tools

Site Tools


troubleshooting:mountall

mountall

Initially, before experimenting with autofs, I placed all the mounts in /etc/fstab. When the system would boot up, /obj/cse would be mounted, /obj/home9, and /obj/home10, but nothing else. As it turns out, this is because of a bug in mountall. mountall mounts filesystems when the underlying block devices are ready, or when network interfaces come up, checking the filesystems first. When the system boots, and the network interface comes up, it calls /etc/init/mountall-net.conf which sends a SIGUSR1 to mountall. On its first attempt, mountall mounts /obj/cse but can't mount anything under /cse until /cse has been mounted. It can mount /obj/home9 and /obj/home10 because there are no other dependencies on a parent. After it mounts /obj/cse it should mount everything under it, but it only does this when it receives ANOTHER SIGUSR1 (which never comes). Furthermore, even if you send it a SIGUSR1, it won't mount everything because, for example, you need “local” to be mounted before you can mount “share”. In other words, you would have to send a couple of SIGUSR1 before everything would be mounted.

The developer fixed the bug supposedly in Lucid (10.04), but did not bother fixing it in Karmic (9.10) for which we are basing our test environment! Initially, I came up with a hacky fix and added it to “/etc/init/mountall-net.conf” which would continue to send SIGUSR1 to the “mountall” process until it disappeared. Once everything is mounted, mountall is supposed to go away. Things still didn't quite work as I expected. Since mountall was trying to mount NFS filesystems through VPN (tun0) before the VPN was initialized, these mounts would hang, and although they would eventually time out, I wanted a better solution. I eventually decided to use autofs5 (which supports direct maps) to mount most of cse.

Bug report from Launchpad:

https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/470776

Note: to debug mountall, insert into /etc/init/mountall.conf, on the “exec mountall” line, “–debug >/dev/mountall.log 2>&1

troubleshooting/mountall.txt · Last modified: 2010/03/12 16:04 by jas