From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8d3497c42250108c201dc829c7769f20@collyer.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] union directories From: Geoff Collyer In-Reply-To: <1f229e0b2b861ffeebd62738b74c9cd3@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-ifqxxygguiroeifhtyqlpyfxei" Date: Fri, 28 Feb 2003 14:58:28 -0800 Topicbox-Message-UUID: 75e0b5c0-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-ifqxxygguiroeifhtyqlpyfxei Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit `bind -c 9 9' remains useful, however, to retain createability of the directory in which a union mount is then performed: ; cd /tmp ; mkdir x ; bind -a /sys/lib x ; ns|tail -4 mount -b '#s/rio.geoff.73279' /dev bind /tmp/x /tmp/x bind -a /sys/lib /tmp/x cd /tmp ; >x/FOO x/FOO: rc: can't open: mounted directory forbids creation versus ; unmount x ; bind -c x x ; bind -a /sys/lib x ; ns|tail -4 mount -b '#s/rio.geoff.73279' /dev bind -c /tmp/x /tmp/x bind -a /sys/lib /tmp/x cd /tmp ; >x/FOO ; unmount x; ls x x/FOO --upas-ifqxxygguiroeifhtyqlpyfxei Content-Type: message/rfc822 Content-Disposition: inline Received: from collyer.net ([10.9.0.4]) by collyer.net; Fri Feb 28 10:57:25 PST 2003 Received: from mail.cse.psu.edu ([130.203.4.6]) by collyer.net; Fri Feb 28 10:57:23 PST 2003 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id BF63019A00; Fri, 28 Feb 2003 13:57:16 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (ampl.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 895A419A25 for <9fans@cse.psu.edu>; Fri, 28 Feb 2003 13:56:28 -0500 (EST) Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Fri Feb 28 13:56:27 EST 2003 Received: from 18.24.6.202 ([18.24.6.202]) by plan9; Fri Feb 28 13:56:24 EST 2003 Message-ID: <1f229e0b2b861ffeebd62738b74c9cd3@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] union directories From: "Russ Cox" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 28 Feb 2003 13:56:18 -0500 You used to need to say "bind foo foo" to set up a mount point for future union mounts. (A long time ago.) Now the system inserts these for you, though they're still visible in the /proc/$pid/ns file (and thus the output of ns). Bind -bc 9 9 is a different thing, and almost certainly not what is wanted, especially in the example given -- it doesn't have any effect except to make everything appear twice in the directory. (Bind -bc 9 9 is like: bind 9 9 bind -bc 9 9 hence everything appears twice.) Russ --upas-ifqxxygguiroeifhtyqlpyfxei--