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

Bug#2304: umount calls gethostbyname() at consequence

> When NFS mounts are unmounted, umount calls gethostbyname() unnecessarily
> (the IP address of the server is available from /etc/mtab).
> The consequence of this is that, during shutdown, no name resolvers are
> necessarily available, causing the umount to fail. The mounted partitions
> underlying the NFS mounts will then fail to get unmounted, and will undergo
> a complete fsck upon reboot.

Unfortunately, my fix for this in the mount package doesn't completely solve
the problem. I'd therefore like some input from other Debian developers to
help find a suitable solution.

The problem is that by the time `umount -a' is called to unmount all
filesystems before shutting down (in /etc/init.d/{halt,reboot}), the network
layer which was used to access NFS filesystems (e.g. ppp) may already have
been shut down, preventing the umount from succeeding.

What should we do to prevent this? Should we modify the shutdown procedure to
try to unmount NFS filesystems before killing off processes? This might pose
other problems if some processes have open files under NFS.

Should umount be modified to quietly succeed in unmounting NFS filesystems if
it can determine the network is no longer accessible? How should it do this?
(I'm not even sure this is possible, given the interface with the kernel. I
haven't looked into this very deeply yet.)

Other suggestions? The only real problem here is that the filesystems
*underneath* the NFS mounts don't get properly unmounted, running a small risk
of losing data and spending unnecessary time in fsck them when the system is
brought back up.


Robert Leslie

Reply to: