From owner-freebsd-fs@FreeBSD.ORG Fri Feb 23 16:52:15 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 311B616A404 for ; Fri, 23 Feb 2007 16:52:15 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [216.148.227.154]) by mx1.freebsd.org (Postfix) with ESMTP id DECD913C49D for ; Fri, 23 Feb 2007 16:52:14 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from c-66-31-35-94.hsd1.ma.comcast.net ([66.31.35.94]) by comcast.net (rwcrmhc14) with ESMTP id <20070223165211m1400popu0e>; Fri, 23 Feb 2007 16:52:11 +0000 Received: from c-66-31-35-94.hsd1.ma.comcast.net (localhost.crodrigues.org [127.0.0.1]) by c-66-31-35-94.hsd1.ma.comcast.net (8.13.8/8.13.8) with ESMTP id l1NGqD7f018613 for ; Fri, 23 Feb 2007 11:52:13 -0500 (EST) (envelope-from rodrigc@c-66-31-35-94.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-66-31-35-94.hsd1.ma.comcast.net (8.13.8/8.13.8/Submit) id l1NGqDgN018612 for freebsd-fs@freebsd.org; Fri, 23 Feb 2007 11:52:13 -0500 (EST) (envelope-from rodrigc) Resent-Message-Id: <200702231652.l1NGqDgN018612@c-66-31-35-94.hsd1.ma.comcast.net> Received: from dibbler.crodrigues.org (localhost.crodrigues.org [127.0.0.1]) by c-66-31-35-94.hsd1.ma.comcast.net (8.13.8/8.13.8) with ESMTP id l1N6q9iW015471 for ; Fri, 23 Feb 2007 01:52:10 -0500 (EST) (envelope-from ports@fsck.ch) Received: from mail.comcast.net [204.127.228.10] by dibbler.crodrigues.org with POP3 (fetchmail-6.3.2) for (single-drop); Fri, 23 Feb 2007 01:52:10 -0500 (EST) Received: from smtp.easydns.com ([205.210.42.52]) by alnrmxc13.comcast.net (alnrmxc13) with ESMTP id <20070223064518a1300d4113e>; Fri, 23 Feb 2007 06:45:18 +0000 X-Originating-IP: [205.210.42.52] X-Greylist: Passed host: 212.103.70.36 Received: from secure.socket.ch (secure.socket.ch [212.103.70.36]) by smtp.easydns.com (Postfix) with ESMTP id 28C874ED73 for ; Fri, 23 Feb 2007 01:45:17 -0500 (EST) Received: from localhost ([127.0.0.1] helo=secure.socket.ch) by secure.socket.ch with esmtp (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HKUB2-000KNT-PN for rodrigc@crodrigues.org; Fri, 23 Feb 2007 07:45:12 +0100 Received: from 62.2.233.2 (SquirrelMail authenticated user roth@fsck.ch) by secure.socket.ch with HTTP; Fri, 23 Feb 2007 07:45:08 +0100 (CET) Message-ID: <1235.62.2.233.2.1172213108.squirrel@secure.socket.ch> In-Reply-To: <20070222222301.GA13464@crodrigues.org> References: <20070222222301.GA13464@crodrigues.org> Date: Fri, 23 Feb 2007 07:45:08 +0100 (CET) From: "Tobias Roth" To: "Craig Rodrigues" User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: -3.1 (---) X-Spam-Report: Spam detection software, running on the system "secure.socket.ch", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On Thu, February 22, 2007 11:23 pm, Craig Rodrigues wrote: > Is there a legitimate case where you would > want to do "mount -o union", and have it behave differently > from "mount_unionfs / mount -t unionfs"? Or is this a leftover from > a long time ago that we can now whack (it would simplify some code > in the VFS layer if we whack it)? [...] Content analysis details: (-3.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 1.2 AWL AWL: From: address is in the auto white-list X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ports@fsck.ch X-SA-Exim-Scanned: No (on secure.socket.ch); SAEximRunCond expanded to false Resent-From: rodrigc@crodrigues.org Resent-Date: Fri, 23 Feb 2007 11:52:13 -0500 Resent-To: freebsd-fs@freebsd.org Cc: Subject: Re: What does "mount -o union" and MNT_UNION really do? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2007 16:52:15 -0000 On Thu, February 22, 2007 11:23 pm, Craig Rodrigues wrote: > Is there a legitimate case where you would > want to do "mount -o union", and have it behave differently > from "mount_unionfs / mount -t unionfs"? Or is this a leftover from > a long time ago that we can now whack (it would simplify some code > in the VFS layer if we whack it)? Up to recently, mount -o union just worked, while unionfs was documented to be mostly broken. Profile.sh for instance uses -o union, and I never had any problems with it. I am using it exclusively in read only mode though. One difference that I can remember offhand is explained here (taken from mount_unionfs(8): Filenames are looked up in the upper layer and then in the lower layer. if a directory is found in the lower layer, and there is no entry in the upper layer, then a shadow directory will be created in the upper layer. It will be owned by the user who originally did the union mount, with mode ``rwxrwxrwx'' (0777) modified by the umask in effect at that time. This is not the case with -o union. Given the above statement, I am not sure whether unionfs will work if used in conjunction with read only mode. Mount_unionfs(8) talks about another difference, although I don't know whether this is meaningful in the current context: The union file system manipulates the namespace, rather than individual file systems. The union operation applies recursively down the directory tree now rooted at uniondir. Thus any file systems which are mounted under uniondir will take part in the union operation. This differs from the union option to mount(8) which only applies the union operation to the mount point itself, and then only for lookups. Thanks, Tobias