Contributed by sean on from the make world on ancient hardware then go on vacation dept.
Arrigo Triulzi has done a brief writeup of getting OpenBSD built from source while using only one, shared source checkout via read only NFS mount. This was useful for his scenario, which had a machine with limited disk, and helped him to conserve disk space overall. It should be helpful to anyone who manages multiple machines and wants to conserve on disk space while building from source, for example to test a patch or updates. You can find his writeup on his website, "Building OpenBSD "make world" with /usr/src read-only".
This is a handy trick to use with older machines where big disks are either prohibitively expensive or hard to find. This may actually be faster and with some old machines (like the SS5 in the article) where network access to cheap IDE disks may be faster than the ancient SCSI disks in use. For those of us too lazy to try the above and have extra chasis room, these (for non-SCA machines) are helpful.
(Comments are closed)
By Peter Dembinski (217.96.175.71) pdembinski@konin.lm.pl on http://www.pdembinski.konin.lm.pl
By RC (4.8.16.53) on
It's in the docs on OpenBSD.org... When /usr/src is read-only, you 'cd' into your writable directory (your remote NFS mount) and basically just run "lndir /usr/src/". Then you can make the source just like you would normally.
Very simple.
Comments
By Peter Dembinski (217.96.175.71) pdembinski@konin.lm.pl on http://www.peter.dembinski.prv.pl
By Arrigo (212.152.8.176) on
Just to add to your friendly comment if you just do an lndir /usr/src you had better have a writable NFS-mounted /usr/obj for the "make obj" step or do you like leaving documentation half-baked?
Also, you might not have noticed but the comment regarding the use of lndir is in the section on building X11 where you don't have the "make obj" option.
Mounting /usr/src read-only and then having a separate writable /usr/obj sound like a pretty reasonable thing to do and it works flawlessly if your server and client happen to be the same architecture since you inherit the former's symlinks, otherwise it breaks in the architecture-specific bits.
It never hurts to document what breaks and a quick fix.
Also, from an efficiency point of view may I point out that your lndir mechanism introduces another level of indirection which over NFS is something you pay for. Allow me to explain:
NFS mounts:
server:/usr/src -> client:/usr/real_src
server:/scratch1 -> client:/usr/src
server:/scratch2 -> client:/usr/obj
These are three independent NFS mounts, your lndir will populate /scratch1 with symlinks to /usr/src and then "make obj" will populate /scratch1 with symlinks to /scratch2 (server-side names).
When you actually run the make for each file-access in client:/usr/src you will have an indirection, via the symlink, to client:/usr/real_src before you get to the real file. This is quite expensive as NFS is not that fast over a 10Mbit/s link.
With my "oh-so-lame" method you leave out one layer of indirection as you only have two NFS mounts.
Of course I am sure you had thought of this in your complete and detailed response on using lndir.
Comments
By mirabile (213.196.254.173) on http://MirBSD.org/
I've done an NFS build with the NFS server being an i386
and the client and build machine being a sparc. And it
even worked without since the symlinks go to /usr/obj.
Comments
By Arrigo (212.152.8.176) on
Comments
By Peter Dembinski (217.98.20.195) pdembinski@konin.lm.pl on http://www.peter.dembinski.prv.pl
Sorry if anyone got confused.
By Jim (69.182.45.193) on
- a "make build" on the Ultra10
- tar up /usr/obj and burn it to a CD to bring home
- untar it on my Ultra1 and just run "make install" so it doesn't rebuild everything.
I realize the above sequence will not work, an obvious reason being that /usr/src/Makefile doesn't have an "install" target. However, is something similar to this possible? If so, can someone give me a basic idea about how to do it?
Comments
By Martin Reindl (62.178.75.222) martin@ on