0

I managed to get SSHFS working smoothly. I've added the following line to my /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

I now can mount the remote filesystem by the following command:

mount /path_to/local/content

All is pretty and well but when should I issue the command above? I have a network application running on the box which needs the content from the remote box as soon as the application is started. I'd rather use auto instead of noauto but how can I be sure that the network is ready when the fstab is "executed"?

Jan Deinhard
  • 2,363
  • 5
  • 26
  • 33

1 Answers1

1

On Ubuntu (10.10), the init daemons will try to mount again once the network has activated, so you should try to do as if it was working ok...

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

I guess most other linux flavours have the same kind of mechanism (to support SSHFS, NFS and all others network FS)...

hth !

Oct
  • 1,576
  • 1
  • 8
  • 5
  • This sound interesting! I do use Ubuntu 10.04. Though I'm not sure whether I understand what this means? Should I just use 'auto' and let the system do the rest? – Jan Deinhard Jul 26 '11 at 13:47
  • 1
    Indeed ! I've not tried that by myself, but my EC2 instances which have network disk do work like a charm :) good luck ! – Oct Jul 26 '11 at 13:49