NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/38103: automounter (amd) failed to unmount busy filesystems on reboot - reboot will hang



Hi, here ist our amd configuration, but I don't think this is the cause of the problem.

/etc/amd.conf:

[ global ]
map_type              = nis
browsable_dirs        = no
normalize_hostnames   = yes
fully_qualified_hosts = yes
unmount_on_exit       = yes
restart_mounts        = yes
local_domain          = nagler-company.com

[ /home ]
map_name = amd.home

[ /nsw ]
map_name = amd.nsw

[ /net ]
map_type = file
map_name = /etc/amd.net


/etc/amd.net:

*       type:=host;rhost:=${key};fs:=${autodir}/${rhost}/root


yp-map amd.nsw:

* -opts:=rw,intr,nosuid;rhost:=nsw-${key} xhost(${rhost});fs:=/nsw-data/nsw;type:=link || rfs:=/nsw-data/nsw;type:=nfs
/default opts:=rw,intr,suid


yp-map amd.home:

* -opts:=rw,intr,nosuid;rhost:=home-${key} xhost(${rhost});fs:=/home.stand;type:=link || rfs:=/home.stand;type:=nfs
/default opts:=rw,intr,suid


Remark: we have defined alias names for the NFS-Server in order to be able to support different locations without hardcoding the hostname itself.

The problem happens all the time with all remote mounts done by amd(8) if there is still a process current working directory inside of the mounted filesystem.
amd(8) will unmount everything else, but this mount remains mounted.

The best way to unmount adm automounts on reboot from my point of view will be:
1. try to unmount with SIGTERM (as done now)
2. if the process will not exit after "some" time, kill it ungracefull, e.g. with SIGQUIT (that works for me)

This will allow amd(8) to do as much unmounts as possible and in fact, only the busy mounts are left after some seconds. If e.g. /home/abc was active, then only the automounter mount /home and ./amd/<host>/home.stand are left.

I have had no look into the change done to /etc/rc.d/amd yesterday or today as reported by gnats up to now and I've never tried to shutdown the machine as member of the operator group - this meens we are always running shutdown as root - so I've no exprience with the effects reported in bin/36506, but it sounds like exactly the same problem: if a mountpoint is busy, amd(8)'s gracefull way to unmount the filesystem just by setting the timeout to 0 will not succeed, and there seems to be no way to force amd(8) to do the unmount, if the filesystem is busy. That behaviour needs to be fixed in amd(8) in order to solve the problem. My suggested way to shutdown for amd(8) is just a workaround for the main problem.

W. Stukenbrock




Matthias Scheler wrote:

The following reply was made to PR bin/38103; it has been noted by GNATS.

From: Matthias Scheler <tron%zhadum.org.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: Subject: Re: bin/38103: automounter (amd) failed to unmount busy filesystems on reboot - reboot will hang
Date: Mon, 25 Feb 2008 22:00:13 +0000

 On Mon, Feb 25, 2008 at 03:05:00PM +0000, 
Wolfgang.Stukenbrock%nagler-company.com@localhost wrote:
 > >Synopsis:       automounter (amd) failed to unmount busy filesystems on 
reboot - reboot will hang
 [...]
 >   This problem is new in 4.0. We've had had no problems with that in 3.1.
The reason is that 3.1 didn't try to shutdown amd(8) cleanly but 4.0 does.
 The old behaviour caused dead NFS mount points on my system which prevented
 the final unmount of all filesystem. Since "/etc/rc.d/amd" shuts down
 the daemon properly I haven't seen that problem.
> How-To-Repeat:
 >   Start amd, login as a second user and chdir to a remote filesystem
 >   mounted via amd.
I've tried that in the past and it never hung for me. Can you please
 provide more details about your amd(8) configuration?
I'm not sure whether there is a fix that fixed boht bugs except replacing
 amd(8) with an in-kernel automounter.
Kind regards -- Matthias Scheler http://zhadum.org.uk/




Home | Main Index | Thread Index | Old Index