Date: Thu, 20 Dec 2001 02:08:41 +0100 (CET) From: BOUWSMA Beery <freebsd-user@netscum.dyndns.dk> To: hackers@freebsd.org Subject: nullfs and unionfs Message-ID: <200112200108.fBK18fJ00337@crotchety.newsbastards.org>
next in thread | raw e-mail | index | archive | help
[replies sent directly to me may timeout and bounce, since I'm not
online as often as I should be, but I'll check the list archives]
Hej
Is it safe (relatively speaking) to use the null and the union
filesystems? The LINT kernel config file still includes dire
warnings, as do the man pages, but so far I've successfully
mounted a handful of filesystems without panicking my system,
though I've been careful to do it read-only when possible
However, I have found a bug. What I'm trying to do is to
share the FreeBSD system source on one disk with several OSen
keeping it unchanged from how it gets updated by cvsup, but
still make changes for building.
I do this by keeping the actual source read-write for cvsup
in /usr/local/system, which I then mount_null read-only on
/usr/src. (Likewise ports and stuff)
Over top of this nullfs /usr/src I mount read-write my own
directory which gets my changes in /usr/local/source-hacks.
(I also discovered to get both mounts to work in /etc/fstab
I seem to need to specify the mountpoint differently, lest
mount -t union -a fail to do anything, like
/usr/local/system/src /usr/src null ro
/usr/local/source-hacks /usr/src/ union rw )
^
This gives a /usr/src that I seem to be able to play in,
plus I can readily see every file I've changed by running
`find' in /usr/local/source-hacks -type f. (There are
logical issues concerning undoing my hacks when no longer
needed, but I'll deal with that later somehow)
The bug is that apparently when a union-mounted fs is
mounted atop a null-mounted fs, `pwd' in subdirectories
fails spectacularly. (Works fine in the mountpoint)
dastardly# cd /usr/src
dastardly# pwd
/usr/src
dastardly# cd sys
dastardly# pwd
pwd: .: No such file or directory
(commands like `dirs' succeed) `ls -a' shows the `.'
directory, of course. This also means that `make' does
not want to work
Hang on, this seems to be a csh/tcsh problem:
bash-2.05a# cd /usr/src/
bash-2.05a# pwd
/usr/src
bash-2.05a# cd sys
bash-2.05a# pwd
/usr/src/sys
bash-2.05a# sh
# pwd
/usr/src/sys
# csh
csh: No such file or directory
csh: Trying to start from "/root"
dastardly#
Of course, `make' fails no matter what the shell du jour
As far as I can remember, I had no similar problems in a normal
union mount and null mounts have given me no problems.
thanks
barry bouwsma
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112200108.fBK18fJ00337>
