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

Re: Unmount NFS from unavailable machine



Hello!

On Thu, Jun 05, 2003 at 12:04:21AM +0200, Hanspeter Roth wrote:

>>    I have a problem with unmounting NFS from my computer (OpenBSD 3.2)
>> when a computer from which is a filesystem mounted goes down. I`m not
>> able to unmount the filesystem and also, when I try to do it, my
>> computer waiting for connection on it and does nothing.
>>    Is there some posibility to unmount the system efectively?

>have you tried `umount -f'?

This may NOT work, even if the mount is interruptable.

The reason is that umount (in src/sbin/umount/umount.c, function
umountfs()) does a few checks before calling the kernel's unmount(2)
function, which may themselves require the server to be up (e.g.
stat(2) on the mount point).

If so, you need to patch umount or create a specific short unmount
program that does less checks or mount path canonicalizations and
calls unmount(2) more directly.

Been there, done that (incl. the specific unmount program thing)...

Kind regards,

Hannah.

PS: Just looking at the manual page: There's a mention of EINVAL
returned for pathnames containing a character with the high-order
bit set. That error doesn't really occur here, so that mention should
probably be removed, shouldn't it?