NFS mount after rc.local

I have an NFS entry in my /etc/fstab, but the server might not be available at boot time so I would like to run /etc/rc.local before an attempt is made to mount it.

How to do this? I'm aware of the late parameter, but can't figure out when that kicks in,

An explanation would be appreciated.
 
You could try the 'failok' option in fstab. mount_nfs will keep retrying to mount in the background, but the system will continue to boot if the target isn't available.
 
I've just discovered that when rc.local runs, $PATH does not include programs in /usr/local, so I must use fully pathed names to be able to run them.

Not sure want happens if I try to use /usr/local/etc/rc.local instead
 
Grappling with mount_nfs() options late, failok, noauto I can't find a combination which does what I want.

failok gives me a remote system error - operation timed out. and boot process just stops. Is that to be expected?
 
If I have noauto, mount -a doesn't seem to work after boot up, although manually entering

mount 192.168.1.111:/mnt /net does work. There's something here that I haven't figured out yet.

 
If I have noauto, mount -a doesn't seem to work after boot up, although manually entering

mount 192.168.1.111:/mnt /net does work. There's something here that I haven't figured out yet.
Well, that is hole the point in noauto - do not mount automatic, but let the user or script mount the filesystem when needed.
In your case, you would mount the filesystem in /etc/rc.local before you continue with what else you got.
 
To me it looks like the system tries to mount remote filesystems before processing /etc/rc.local...

Or am I missing something?
 
Yes, unless marked noauto in fstab (remote or local fs)



You seem to have missed posts #2 and #8 ... you're not blocking user BjarneB, are you?
I tried to do what was suggested, but have discovered that mount -a does not work and that I need to issue a full mount command.
So it looks like having an NFS entry in fstab is pretty useless if there is a fair chance of it failing.

Incidentally, I don't block anyone.
 
I tried to do what was suggested, but have discovered that mount -a does not work and that I need to issue a full mount command.

I can't fathom "does not work"; I often have 'noauto' partition/s in fstab and they're never mounted until I "mount /mountpoint", as cracauer@ said.

Incidentally, I don't block anyone.

Sorry, I shouldn't have speculated, but failed to see how it didn't work for you, assuming correct syntax.
 
It's not supposed to get mounted with mount -a if you used noauto or late.

Code:
     -a      All the file systems described in fstab(5) are mounted.
             Exceptions are those marked as “noauto”, those marked as “late”
             (unless the -l option was specified), those excluded by the -t
             flag (see below), or if they are already mounted (except the root
             file system which is always remounted to preserve traditional
             single user mode behavior).
 
Back
Top