我应该如何以及何时使用SSHFS挂载远程文件系统?

我设法让SSHFS运行顺利。 我已将以下行添加到我的/ etc / fstab中:

sshfs#xxx@remote_host:/path_to/remote/content /path_to/local/content fuse \ comment=sshfs,noauto,user,exec,allow_other,reconnect,kernel_cache, \ compression=no,cache_timeout=600,ServerAliveInterval=15 \ 0 0 

我现在可以通过以下命令挂载远程文件系统:

 mount /path_to/local/content 

一切都很好,但是什么时候我应该发出上面的命令? 我有一个networking应用程序运行在盒子上,只要应用程序启动,就需要从远程盒子获取内容。 我宁愿使用auto而不是noauto,但是如何确保当fstab被“执行”时networking已经准备好了?

在Ubuntu(10.10)上,一旦networking激活,init守护进程将尝试再次挂载,所以你应该尝试做,就好像它工作正常。

 more /etc/init/mountall-net.conf # mountall-net - Mount network filesystems # # Send mountall the USR1 signal to inform it to try network filesystems # again. 

我猜大多数其他的linux风格有相同的机制(支持SSHFS,NFS和所有其他networkingFS)…

hth!