[CentOS] sshfs mounting on Centos 6.9

Tue Jan 16 23:25:54 UTC 2018
Jose Maria Terry Jimenez <jtj at tssystems.net>


El 16/1/18 a las 23:04, Miguel González escribió:
> Hi all,
>
>   I am trying to mount on boot a sshfs filesystem.
>
>   I have tried this in /etc/fstab
>
>   backup at myserver.com:/home/backup/myserver /backup   fuse.sshfs
> nonempty,allow_other  0    2
>
>   but only works when network works.
>
>   I have also tried this in my crontab:
>
>   @reboot sshfs -o idmap=backup myserver.com:/home/backup/myserver /backup
>
>   but doesn´t seem to work either.
>
>   What else can I try?
>
>   Thanks,
>
>   Miguel
>
> ---

Try adding the options:

_netdev: The filesystem resides on a device that requires network access 
(used to prevent the system from attempting to mount these filesystems 
until the network has been enabled on the system).

delay_connect: delay connection to server

So, change your fstab entry:

backup at myserver.com:/home/backup/myserver /backup   fuse.sshfs 
_netdev,delay_connect,nonempty,allow_other  0    2

Tell if works,

Best,