From owner-freebsd-current Thu Feb 25 13:48: 9 1999 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 6615314DCC for ; Thu, 25 Feb 1999 13:48:03 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.1/8.9.1) with ESMTP id NAA00506; Thu, 25 Feb 1999 13:47:46 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.2/8.9.1) id NAA01813; Thu, 25 Feb 1999 13:47:46 -0800 (PST) (envelope-from jdp@polstra.com) Date: Thu, 25 Feb 1999 13:47:46 -0800 (PST) Message-Id: <199902252147.NAA01813@vashon.polstra.com> To: dot@dotat.at Subject: Re: mount -o union broken recently? In-Reply-To: Organization: Polstra & Co., Seattle, WA Cc: current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Tony Finch wrote: > I have been experimenting with union mounts today with a recent > -stable (cvsupped yesterday), and I haven't had much luck. > > Because cvsup likes to obliterate local changes, You might wish to CVSup the repository itself (not use checkout mode), and then apply the techniques described in the CVSup FAQ to maintain your local changes. You can find the CVSup FAQ at . I've never messed with "mount -o union" before. But looking at the tests you did, I'm not so sure you've drawn the right conclusions. Here's your test that failed: > # mount > /dev/da0s1a on / (local, writes: sync 420 async 3185) > procfs on /proc (local) > /dev/da0s1e on /www (local, writes: sync 2 async 0) > # mount /dev/da0s1f /srcdelta > # ls -l /srcdelta > total 1 > drwxr-xr-x 6 root wheel 512 Feb 18 10:32 sys > # umount /srcdelta > # ls /usr/src > COPYRIGHT UPDATING include share > CVS bin kerberosIV sys > Makefile contrib lib tools > Makefile.inc0 crypto libexec usr.bin > Makefile.inc1 etc release usr.sbin > Makefile.upgrade games sbin > README gnu secure > # mount -o union /dev/da0s1f /usr/src > # ls -l /usr/src > total 1 > drwxr-xr-x 6 root wheel 512 Feb 18 10:32 sys > # umount /usr/src > # uname -a > FreeBSD shirt.www.demon.net 3.1-STABLE FreeBSD 3.1-STABLE #6: Thu Feb 18 02:26:59 GMT 1999 root@shirt.www.demon.net:/usr/src/sys/compile/SHIRT i386 > # OK, in that test, you did the union mount onto "/usr/src", which was _not_ a mount point. But you did something different in the test that succeeded: > However, on another machine running 3.0-RELEASE mount -o union works > as expected: > > # ls -l > total 6 > drwxr-xr-x 2 root wheel 512 Feb 18 16:36 da1 > drwxr-xr-x 2 root wheel 512 Dec 11 11:06 da2 > # mount /dev/da1s1e da1 > # mount /dev/da2s1e da2 > # ls -l da?/* > -rw-r--r-- 1 root wheel 0 Feb 18 16:36 da1/this_is_da1 > -rw-r--r-- 1 root wheel 0 Feb 18 16:36 da2/this_is_da2 > # umount da2 > # mount -o union /dev/da2s1e /www/da1 > # ls -l da?/* > -rw-r--r-- 1 root wheel 0 Feb 18 16:36 da1/this_is_da1 > -rw-r--r-- 1 root wheel 0 Feb 18 16:36 da1/this_is_da2 > # Here, you did the union mount on top of an existing mount point (da1). I don't know for sure, but I suspect that this is the only case in which union mounts are designed to work. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Nobody ever went broke underestimating the taste of the American public." -- H. L. Mencken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message