[clug-talk] forcing umount on nfs filesystem [solved]
Gustin Johnson
gustin at echostar.ca
Fri Oct 14 09:32:35 PDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I usually try to figure out what was locking the directory before
resorting to umount -f. Try something like lsof |grep unix_data
Sometimes it is something as simple as having left a command prompt "in"
that directory, sometimes it is a process, such as apache.
smagnuson at forzani.com wrote:
> It figures, I have been playing with this on and off for a couple of days now. Decide to engage the group and then discover the following works on linux clients. Gonna try AIX now.
>
> sudo umount -lf /unix_data
>
> -l Lazy unmount. Detach the filesystem from the filesystem hierar-
> chy now, and cleanup all references to the filesystem as soon as
> it is not busy anymore. (Requires kernel 2.4.11 or later.)
>
>
>
> -----Original Message-----
> From: clug-talk-bounces at clug.ca [mailto:clug-talk-bounces at clug.ca]On
> Behalf Of Magnuson, Sig
> Sent: Friday, October 14, 2005 9:31 AM
> To: clug-talk at clug.ca
> Subject: [clug-talk] forcing umount on nfs filesystem
>
>
> we have a linux nfs server serving linux and AIX clients.
>
> When our linux nfs server recently went down we were left with stale NFS file handles on some of the hosts. We have been unable to umount/remove the stale mount. rebooting is not a option at this time.
>
> Any suggestions on how to remove this stale mount.
>
> IE:
>
> cat /etc/redhat-release
> Red Hat Enterprise Linux AS release 3 (Taroon Update 4)
>
> sudo umount /unix_data
> umount: /unix_data: device is busy
>
> sudo umount -f /unix_data
> umount2: Device or resource busy
> umount: /unix_data: device is busy
>
> sudo umount -vf /unix_data
> umount2: Device or resource busy
> umount: /unix_data: device is busy
>
> df -h
> Filesystem Size Used Avail Use% Mounted on
> ...
> ...
> calnfs01.corporate.net:/nfs_unix_data
> - - - - /unix_data
>
> sudo lsof /unix_data
> lsof: WARNING: can't stat() nfs file system /unix_data
> Output information may be incomplete.
> lsof: status error on /unix_data: Stale NFS file handle
> lsof 4.63
> latest revision: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/
> latest FAQ: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/FAQ
> latest man page: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof_man
> usage: [-?abhlnNoOPRstUvV] [-c c] [+|-d s] [+D D] [+|-f]
> [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] [-p s]
> [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [--] [names]
> Use the ``-h'' option to get more help information.
>
> sudo fuser /unix_data
> /unix_data: Stale NFS file handle
>
> sudo fuser -k /unix_data
> /unix_data: Stale NFS file handle
>
> attempts to remount over top of the stale mount result in dual entries
> sudo mount /unix_data
> df -h
> Filesystem Size Used Avail Use% Mounted on
> ...
> ...
> calnfs01.corporate.net:/nfs_unix_data
> 100G 74M 100G 1% /unix_data
> calnfs01.corporate.net:/nfs_unix_data
> 100G 74M 100G 1% /unix_data
>
> sudo umount -f /unix_data
> df -k
> Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> ...
> calnfs01.corporate.net:/nfs_unix_data
> - - - - /unix_data
>
> sudo umount -f /unix_data
> umount2: Device or resource busy
> umount: /unix_data: device is busy
>
>
> Anyone tried this suggestion?
> http://lists.debian.org/debian-isp/2003/04/msg00234.html
>
> _______________________________________________
> clug-talk mailing list
> clug-talk at clug.ca
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
>
> _______________________________________________
> clug-talk mailing list
> clug-talk at clug.ca
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDT92iwRXgH3rKGfMRArPgAJoDccAk8OnN1anBl9QGTHcJvskdzACePn+V
zG/IK+EdAh/2hgNhDhY5RSw=
=OtBQ
-----END PGP SIGNATURE-----
More information about the clug-talk
mailing list