当我获得过时的 nfs 文件句柄时,如何强制卸载?

UsA*_*R33 19 linux nfs mount

让自己陷入了一个棘手的境地。在 /mnt/1 安装 aufs

aufs on /mnt/1 type aufs (rw,relatime,si=daab1cec23213eea)
Run Code Online (Sandbox Code Playgroud)

我无法卸载东西:

sudo umount -f /mnt/1
umount2: Stale NFS file handle
umount: /mnt/1: Stale NFS file handle
umount2: Stale NFS file handle
umount2: Stale NFS file handle
Run Code Online (Sandbox Code Playgroud)

如何卸载挂载点?(无需重启系统)

(注意:aufs 位于 openafs 系统之上,而不是 NFS 之上。)

小智 6

来自man 8 umount

   -f     Force   unmount   (in  case  of  an  unreachable  NFS  system).
          (Requires kernel 2.1.116 or later.)

   -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.)
Run Code Online (Sandbox Code Playgroud)

如果sudo umount -f /mnt/1不起作用,您可以尝试sudo umount -l /mnt/1