From owner-freebsd-questions Tue Dec 8 07:00:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA02597 for freebsd-questions-outgoing; Tue, 8 Dec 1998 07:00:09 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ninbox.ml.org (hsv1-116.airnet.net [207.242.81.116]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA02573; Tue, 8 Dec 1998 07:00:03 -0800 (PST) (envelope-from kris@airnet.net) Received: from airnet.net (localhost [127.0.0.1]) by ninbox.ml.org (8.9.1/8.8.5) with ESMTP id IAA00575; Tue, 8 Dec 1998 08:59:47 -0600 (CST) Message-ID: <366D3EE3.CF344DBD@airnet.net> Date: Tue, 08 Dec 1998 08:59:47 -0600 From: Kris Kirby Organization: Absolutely None! X-Mailer: Mozilla 4.07 [en] (X11; U; FreeBSD 3.0-RELEASE i386) MIME-Version: 1.0 To: Matthew Patton CC: freebsd-isp@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: wild and crazy nfs mounts (on FreeBSD) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Patton wrote: > > first, if there is a better forum in which to launch this, please advise. > > I would expect your typical ISP environment would run into cases where a > single server was NFS serving, multiple OS's as well as multiple > architectures. And where itself my need to NFS mount foreign filesystems or > loopback on itself. > > I was setting up such a server which has the following layout and hit upon > a nasty snag in the default /etc/rc.* series of scripts. > > sd0d /export/1 has FreeBSD and OpenBSD userland (./FreeBSD, ./OpenBSD/i386, > ./OpenBSD/sparc, ./openBSD/alpha) > sd0e /export/2 has Free and OpenBSD's src and ports trees (./FreeBSD/src, > ./FreeBSD/ports etc.) > sd1d /export/3 has common home directories and such > > so that my family of client machines mount /usr, /usr/src, /usr/ports and > whatnot in a transparent fashion, I don't see how I can get away without > loopback nfs mounting the latter 2 (on the server) if I want all machines > to be laid out the same way. On the server I can cheat and symlink > /export/1/uname to /usr. Though that is not ideal. > > Turns out though that the rc.network script doesn't get around to invoking > nfsd till it's almost done. Worse, /etc/rc didn't get around to initting > the network and thereby offering even the opportunity to NFS mount /usr, > /var or any other important partition till way late in the game. > > Has no one run across this of late? > > I spent a bit of time shuffling the rc scripts around and rewriting a fair > chunk of it so that > > 1) scans /etc/exports for file systems nfsd is going to want > 2) mounts them right after /(root) goes RW > 3) starts portmap and the other needed nfsd programs (note, portmap has be > recompiled as static and moved to /sbin. I guess this one slipped between > the cracks) > 4) explicitly calls mount on /usr and /var > 5) mounts everything else via -a. > 6) continues with rest of boot. > > I also turned up a bunch of logic errors, dependencies, and bad assumptions > that are either not enforced or lost. (see various blurbs in rc.conf about > running certain daemons only with others or when some other condition is > met) > > If there is interest I can provide diffs. BTW, who do I bounce this off of > for further critique and maybe inclusion into the distribution tree? This looks like a job for amd. See the reference at -- Kris Kirby UAH Mail UAH CS Home WWW ------------------------------------------- TGIFreeBSD... 'Nuff said. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message