Subject: Re: Abusing NFS+UNIONFS to avoid BSDOBJDIR.
To: None <>
From: John Darrow <>
List: current-users
Date: 07/08/1999 15:05:35
In article <> Todd Whitesel wrote:
>I would like to use the following scheme to track -current on my home net:

>    1. stable central machine (beefy UW disks, 100bT) SUPs the various
>	source collections and NFS exports them.

>    2. 8-port switch provides full 10bT bandwidth (modulo some tuning)
>	for 7 client machines to the central machine's 100bT.

>    3. The client machines all NFS-mount the source read-only, and union
>	mount local storage on top of it.

>    4. The client machines build -current inside their union mounts,
>	without using BSDOBJDIR.

>Barring bugs in UNIONFS, it seems to me that this method should work.
>Of course I have to be careful about local files obscuring changes
>brought in by SUP, but that's a manageable nuisance.

>Am I doomed before I start? I think this would be a lot cleaner than
>hordes of little symlinks running around.

>Todd Whitesel
>toddpw @

I have a similar setup:

On the NFS server, I sup to a staging area, import into the local cvs tree,
and merge the import into a checked-out directory (thus merging in local

The NFS clients mount the checked-out directory ro, then mount_union it
under (-b) /var/src  (All my machines have a separate /var partition, since
it is constantly written to for transient files (e.g. logs).  This makes it
an ideal place for transient .o files...)

This allows local machines of different architechtures to use the same
source tree, without having to remount the source dir rw to do a make obj
(once on each architecture!) (and having to do it again everytime a dir is
added to or deleted from the source tree) and then remount it ro again (or
risk a misconfigured Makefile polluting the tree...)

The only caveat I've run into with this is not to try to run a make -j, as
this tickles a couple of unionfs bugs...

Here's an excerpt from my fstab:
csserver2:/source /source nfs ro 0 0
/source/NetBSD-current/src /var/src union rw,noauto,-b 0 0
/source/NetBSD-current/xsrc /var/xsrc union rw,noauto,-b 0 0
/source/NetBSD-current/pkgsrc /var/pkgsrc union rw,noauto,-b 0 0


John Darrow - Senior Technical Specialist               Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187  Fax:    630/752-5968