Score:0

Fstab mounting fails when remote share is OFF

nl flag

I have an entry in fstab to mount at boot a remote share which works fine when the local box boots finds remote box ON. The issue is when the local box starts and the remote box is OFF. The workaround is to mount manualy which is a bit annoying. I am just wondering if there is a better way to acomplish this task, something like an auto mounting when the remote box status change to ONLINE.

Thanks!

raj avatar
cn flag
raj
There's no way you can mount a share at system startup if the machine exporting that share is not up at that time. It's like trying to access a web page while the web server is down :). You must repeat the mount when server becomes available. However. You may write a script that checks if the share is available and mounts it if yes, and put that script in crontab so that it executes every 5 minutes or so...
Score:2
ru flag

Not exactly what you asked for, but at least your boot won't hang when the remote is down. Otherwise you'd need to write a short script to check for remote up, and then mount share.

Edit your /etc/fstab and try adding nofail like the example I show below...

//caspurr.local/usb_storage  /media/my_username/caspurrshare  cifs  nofail,gue
st,uid=1000,iocharset=utf8  0  0
Brad Thompson avatar
nl flag
Thanks heynnema, I tried that, no work... noauto - The filesystem will NOT be automatically mounted at startup, or when mount passed -a. You must explicitly mount the filesystem.
heynnema avatar
ru flag
@BradThompson No sooner did I post this answer, and I corrected it. Changed from noauto to nofail. Sorry for the confusion.
heynnema avatar
ru flag
@BradThompson Status please...
Brad Thompson avatar
nl flag
sorry, what you mean 'status' ?
heynnema avatar
ru flag
@BradThompson Did my answer solve your problem?
Brad Thompson avatar
nl flag
No. There are no errors but the share is not mounted (obviously). My original question was dumb. Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.