Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

Friday, March 20, 2009

Use IP alias trick to solve hung NFS mount problem

A NFS mount is hanging and it can not be umount even using -f option


  • Try to use umount -f and fuser, it does not work
#unmount -f
it does not work then,
#fuser -cuxk
This does not work then use the third party application "lsof"
#lsof -N
Kill the nfs pid

If this does not work either then you have a stale mount and will need
to reboot

  • IP alias trick

On the nfs client:

In this example:
The nfs server ip address is
The nfs client ip address is

# mount | grep nfs
The nfs export is mounted over mount point /mnt. cdrom /mnt nfs3

# ping
Ping hangs...the nfs server is no longer available.

# ps -ef
If possible kill any processes that maybe accessing the mount point.
Such as df,find or a mksysb process.

the nfs server back to the loopback interface (lo0) on the nfs client.

# ifconfig lo0 alias netmask up

# netstat -in
Should have an additional lo0 listed with a ip address.

# netstat -rn UH lo0

Need to remove the route that was added by the ifconfig command from the
routing table.

# route delete -host

# showmount -e
hangs...should be able to show the export list of the nfs client if
there's one available.

The showmount command should hang. Need to add a route using the nfs
server ip and point it back to the lo0.

# route add -host

# showmount -e
Returns the export list of the client, if the client is exporting
anything, in this case it was also an nfs server so it had an export

# umount /mnt to unmount the hung mount.

# df -k
No longer hangs...

# mount
No nfs mount listed.

Clean up...

# route delete -host
# ifconfig lo0 -alias netmask

No comments:


Blog Archive