4 Replies Latest reply: Apr 3, 2013 4:35 PM by alvaromiranda RSS

    Cannot umount - stale NFS file handle

    122582
      Hi,

      We are trying to clean up an nfs mount that is no longer valid, but it seems to be stuck. A "ls -la" shows a lot of "?" and umount produces a "Stale NFS file handle" error. Umount with "-f" tells us that it is "not found in /proc/mounts".

      [oracle@xxx mnt]$ ls -la
      ls: cannot access ftpd002: Stale NFS file handle
      total 8
      drwxr-xr-x. 3 root root 4096 Mar 20 14:41 .
      dr-xr-xr-x. 27 root root 4096 Jan 4 03:07 ..
      d?????????? ? ? ? ? ? ftpd002


      [oracle@xxx mnt]$ sudo umount ftpd002
      umount: ftpd002: Stale NFS file handle


      [oracle@nzxpdb259 mnt]$ sudo umount -f /mnt/ftpd002
      /mnt/ftpd002 was not found in /proc/mounts
      /mnt/ftpd002 was not found in /proc/mounts


      Thanks!
        • 1. Re: Cannot umount - stale NFS file handle
          Catch-22
          The problem usually appears when a NFS mount was removed while a client still holds an active reference to a file handle, for instance if the NFS server crashed while copying a file. Your options to correct the issue will depend on NFS version and how you initially mounted the NFS share. NFS mounting options like soft, hard and intr will influence your available options.

          If you hard mounted a NFS share, you may need to reconnect the NFS share in order for the NFS client to resume its operation, then disconnect the client. In the worse case you may have to reset the computer to clear stalled NFS file handles.
          • 2. Re: Cannot umount - stale NFS file handle
            alvaromiranda
            hello

            if you are on linux (what I assume)

            try with

            umount -l



            sudo umount -l /mnt/ftpd002
            • 3. Re: Cannot umount - stale NFS file handle
              122582
              Dude,

              Thanks! Here are the options on the mount...it was hard mounted. So our only options, then, are to a) see if the NFS share can be remounted or b) reset?

              192.xxx.xxx.xx:/home/pasftp /mnt/ftpd002\040(deleted) nfs4 rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.xxx.xxx.xx,minorversion=0,local_lock=none,addr=192.xxx.xxx.xx 0 0


              Alvaro - The -l also gives the same error.
              • 4. Re: Cannot umount - stale NFS file handle
                alvaromiranda
                What's the output of

                sudo lsof | grep '/mnt/ftpd002'

                Alvaro.