因此,我尝试通过 sshfs 挂载本地网络文件夹。我的 fstab 中的内容如下:
[email protected]:/home/jackie/.kodi/ /home/jackie/KBox/ fuse.sshfs delay_connect,_netdev,user,idmap=user,transform_symlinks,identityfile=/home/jackie/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000 0 0
当我手动使用时,一切正常$ mount KBox/
,但在启动时尝试访问挂载时出现以下错误:
jackie@The-Iron-Throne:~$ ls KBox/
ls: cannot access KBox/: Input/output error
仅当完成以下操作后我才可以访问该坐骑:
jackie@The-Iron-Throne:~$ sudo umount KBox/
jackie@The-Iron-Throne:~$ mount KBox/
jackie@The-Iron-Throne:~$ ls KBox/
addons media sounds system temp userdata
我认为我的 fstab 条目是正确的,否则我认为该$ mount KBox/
命令不会按预期工作,但由于某种原因它无法在启动时工作。
知道为什么吗?
答案1
也许我说的不对。但你为什么不这样做呢:
sshfs /home/jackie/.kodi/ [email protected]:/home/jackie/KBox
并卸载该文件夹:
fusermount -u /home/jackie/KBox
在第一行代码之后,您可以在查询中使用此类参数。
在 umount 的文档中我发现了这些有用的信息:
Note that a file system cannot be unmounted when it is ‘busy’ - for
example, when there are open files on it, or when some process has its
working directory there, or when a swap file on it is in use. The
offending process could even be umount itself - it opens libc, and libc
in its turn may open for example locale files. A lazy unmount avoids
this problem.
欲了解更详细信息请使用此链接:http://manpages.ubuntu.com/manpages/hardy/man8/umount.8.html