From owner-freebsd-questions@FreeBSD.ORG Tue Oct 11 08:50:15 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0AEB16A426 for ; Tue, 11 Oct 2005 08:50:15 +0000 (GMT) (envelope-from norgaard@locolomo.org) Received: from strange.daemonsecurity.com (62-14-194-191.inversas.jazztel.es [62.14.194.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BFF443D5A for ; Tue, 11 Oct 2005 08:50:14 +0000 (GMT) (envelope-from norgaard@locolomo.org) Received: from [172.24.8.84] (generic.ATOSORIGIN.ES [212.170.156.200]) by strange.daemonsecurity.com (Postfix) with ESMTP id 0AF682E307; Tue, 11 Oct 2005 10:50:11 +0200 (CEST) Message-ID: <434B7CBE.3000001@locolomo.org> Date: Tue, 11 Oct 2005 10:50:06 +0200 From: Erik Norgaard User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050824) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Marshall References: <53f158630510110141k50281f15o23fa83e70dbb3036@mail.gmail.com> In-Reply-To: <53f158630510110141k50281f15o23fa83e70dbb3036@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: How to Mount NFS Automatically After Boot-Time? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2005 08:50:16 -0000 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 > /etc/fstab. > > 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 > outage. 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 /sbin/rcorder(8) So, you can postpone the nfs mounts till later by changing the REQUIRE line. Note that some scripts may have "mountcritremote" in their REQUIRE line. Hope this helps, Erik -- 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 Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9