How to Mount NFS Automatically After Boot-Time?
norgaard at locolomo.org
Tue Oct 11 01:50:16 PDT 2005
David Marshall wrote:
> We have several servers that mount from an NFS server for a lot of
> reading and writing. We typically have this mount listed in
> If one of these servers reboots when the NFS server is offline, it
> hangs in single-user mode until the NFS server comes back online.
> We have tried usiing amd(8), but the sorts of traffic we have been
> generating has been just a little too much for amd to handle.
> Occasionally it will become overwhelmed and will not work properly
> until it (amd) is restarted. So, it is back to a straight NFS mount.
> How can we cause this NFS mount to be made after the system has
> reached multi-user so that we can log in and perhaps mount from
> another server? (The servers are in a colo, so it's not easy to gain
> physical access to the console to operate the machine in single-user.)
> I've played with putting a mount command into /etc/rc.local, but I
> don't know whether that would make us equally susceptible to a server
If you look in /etc/rc.d/ there are two scripts: mountcritlocal and
mountcritremote - the last one mounts nfs mounts if present in fstab.
In the beginning of the file you will find the lines:
# PROVIDE: mountcritremote
# REQUIRE: NETWORKING root mountcritlocal cleanvar
# KEYWORD: nojail
These are comments for /bin/sh but the affect the order of execution.
The scripts in /etc/rc.d are executed in the order sorted by
So, you can postpone the nfs mounts till later by changing the REQUIRE
line. Note that some scripts may have "mountcritremote" in their REQUIRE
Hope this helps,
Ph: +34.666334818 web: www.locolomo.org
S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt
Subject ID: 9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72
More information about the freebsd-questions