通过 sshfs 安装树莓派设备:
sshfs osmc@rpi.: /home/user/pi
安装信息:
user@azimuth:~$ mount | grep osmc
osmc@rpi.: on /home/user/pi type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
为何我无法卸载?
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).)
如何卸载 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.
答案1
由于 sshfs 使用fuse
,因此您需要使用fusermount -u
来卸载它:
fusermount -u /home/user/pi
答案2
如果配置了自动挂载,则必须停止此挂载的自动挂载服务。使用启动选项可再次挂载。
systemctl stop path-to-mountpoint.automount
您可以检查自动挂载是否配置了
systemctl list-unit-files --type automount