If you use autofs with Pinstripe, it works very well. But there is one problem with halt scripts (located in the initscripts rpm): it tries to unount the autofs mount points! It is normal to unmount all the filesystems autofs has mounted, but autofs mount points can't be unmount, it is impossible. For example, if I have autofs running in /mnt/cds/auto with 2 possibles mountpoints in this directory (cdrom and cdwriter), the halt script will unmount cdrom and cdwriter (which is right) but /mnt/cds/auto too, which is wrong. The solution is located in the patch below (added autofs to the remaining variable). --- halt.orig Wed Aug 30 21:34:09 2000 +++ halt Mon Sep 4 00:18:24 2000 @@ -67,7 +67,7 @@ # Unmount file systems, killing processes if we have to. sig= retry=3 -remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts` +remaining=`awk '!/(^#|proc|loopfs|autofs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts` while [ -n "$remaining" -a "$retry" -gt 0 ] do if [ "$retry" -lt 3 ]; then @@ -76,7 +76,7 @@ runcmd "Unmounting file systems" umount -a -f -t noproc fi sleep 2 - remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts` + remaining=`awk '!/(^#|proc|loopfs|autofs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5
This shouldn't be happening anyways, AFAICT. This implies that you didn't shut down autofs cleanly.
Yes, you're right! Autofs didn't shutdown cleanly. It said that the mountpoints are used. It is perfectly normal: no process were killed (before this script is called) so it is possible that when autofs shutdowns, processes are still using the mountpoints... Hence the uncleanly shutdown and the unmount failure during the halt script...
will be added as of 5.60-1 ; thanks!