Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 1998 05:19:06 -0500
From:      Matthew Patton <patton@sysnet.net>
To:        freebsd-isp@FreeBSD.ORG
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   wild and crazy nfs mounts (on FreeBSD)
Message-ID:  <l03110701b29155edc6c8@[192.168.1.10]>

next in thread | raw e-mail | index | archive | help
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?



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?l03110701b29155edc6c8>