From owner-freebsd-hackers Wed Dec 19 18: 1:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from crotchety.newsbastards.org (pop-mu-8-1-dialup-205.freesurf.ch [194.230.140.205]) by hub.freebsd.org (Postfix) with ESMTP id B07C137B417 for ; Wed, 19 Dec 2001 18:01:15 -0800 (PST) Received: (from news@localhost) by crotchety.newsbastards.org (8.11.6/8.11.6) id fBK18fJ00337; Thu, 20 Dec 2001 02:08:41 +0100 (CET) (envelope-from bounce@dcf77-zeit.netscum.dyndns.dk) Date: Thu, 20 Dec 2001 02:08:41 +0100 (CET) Message-Id: <200112200108.fBK18fJ00337@crotchety.newsbastards.org> X-Authentication-Warning: crotchety.newsbastards.org: news set sender to bounce@dcf77-zeit.netscum.dyndns.dk using -f From: BOUWSMA Beery To: hackers@freebsd.org Subject: nullfs and unionfs Organization: Men not wearing any pants that dont shave X-Hacked: via telnet to your port 25, what else? X-Internet-Access-Provided-By: TDC Suisse AG, Rumlang X-NetScum: Yes X-One-And-Only-Real-True-Fluffy: No Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [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