Date: Thu, 23 Dec 2010 08:48:37 -0800 From: "Jason C. Wells" <jcw@speakeasy.net> To: freebsd-fs@FreeBSD.org Subject: Mount Union Only at One Hierachy Level Message-ID: <4D137D65.6040502@speakeasy.net>
next in thread | raw e-mail | index | archive | help
'mount -o union' cannot properly overlay namespaces at more than one level of the hierarchy. Another way of saying this is that 'mount -o union' doesn't manage namespace collisions in a unioned way. Notice the duplicate . and .. and usr directories: # ls -la drwxr-xr-x 7 root wheel 512 Dec 23 16:16 . drwxr-xr-x 7 root wheel 512 Dec 23 16:16 . drwxr-xr-x 7 root wheel 512 Dec 21 13:55 .. drwxr-xr-x 7 root wheel 512 Dec 21 13:55 .. drwxr-xr-x 2 root wheel 1024 Jul 19 02:24 bin ... drwxr-xr-x 3 root wheel 512 Dec 23 16:15 usr drwxr-xr-x 3 root wheel 512 Dec 23 16:15 usr drwxr-xr-x 21 root wheel 512 Dec 23 05:34 var To achieve this I did; # mount -t nullfs -o union,rw /usr/jail/f1 /usr/jail/f1-fs where ./f1 contains the jail's ./usr, but without ./usr/local and ./f1-fs contains only ./usr/local. I expect the namespaces to be unioned at /usr/jail/f1, but they were not. Only ./usr/local is accessible. ./usr/bin and friends are not accessible. I did this because I desired ./usr to be read only, but ./usr/local to be read write so I could add packages inside the jail. I know I can do this another way. The question is, is this a bug? Regards, Jason C. Wells
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D137D65.6040502>