Date: Fri, 23 Feb 2007 07:45:08 +0100 (CET) From: "Tobias Roth" <ports@fsck.ch> To: "Craig Rodrigues" <rodrigc@crodrigues.org> Subject: Re: What does "mount -o union" and MNT_UNION really do? Message-ID: <1235.62.2.233.2.1172213108.squirrel@secure.socket.ch> Resent-Message-ID: <200702231652.l1NGqKph018617@c-66-31-35-94.hsd1.ma.comcast.net> In-Reply-To: <20070222222301.GA13464@crodrigues.org> References: <20070222222301.GA13464@crodrigues.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1235.62.2.233.2.1172213108.squirrel>