从挂载点卸载 sshfs

gat*_*ack 1 umount sshfs

通过 sshfs 挂载树莓派设备:

sshfs osmc@rpi.: /home/user/pi
Run Code Online (Sandbox Code Playgroud)

安装信息:

user@azimuth:~$ mount | grep osmc

osmc@rpi.: on /home/user/pi type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
Run Code Online (Sandbox Code Playgroud)

为什么我无法卸载?

user@azimuth:~$ sudo umount /home/user/pi
[sudo] password for user: 
umount: /home/user/pi: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
Run Code Online (Sandbox Code Playgroud)

如何卸载 sshfs 共享?

更新:

user@azimuth:~$ sudo lsof | grep /home/user/pi
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.sshfs file system /home/user/nas
      Output information may be incomplete.
Run Code Online (Sandbox Code Playgroud)

ste*_*ver 5

由于 sshfs 使用fuse,您需要使用fusermount -u来卸载它:

fusermount -u /home/user/pi
Run Code Online (Sandbox Code Playgroud)