Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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"?

share|improve this question
    
This sounds like a job for autofs. –  Caleb Jul 26 '11 at 12:56
add comment

1 Answer

up vote 1 down vote accepted

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 !

share|improve this answer
    
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 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.