mounts: nullfs and unionfs

Philip M. Gollucci pgollucci at p6m7g8.com
Fri May 16 07:25:19 UTC 2008


Hi Guys,

$ cd /usr/src
$ export D=/jails/src
$ export H=/jails/tld/domain/host
$ export B=/jails/base
$ sudo mkdir -p $D $H B
$ sudo make installworld DESTDIR=$D
$ sudo make distribution DESTDIR=$D
$ sudo rsync -vrlHpEogXtD $D $B
$ cd $B
$ ln -s usr/home
$ cd $B/usr/home
$ mkdir pgollucci

[/etc/fstab]
/dev/ar0s1h     /usr/home   ufs rw      2   2
/usr/home/pgollucci $H/usr/home/pgollucci nullfs ro 0 0	
$B  $H unionfs rw,below  0 0
[--end--]


So the unionfs [1] mounts work fine; however, I can't see the nullfs 
mount in the upper layer.  I tried doing a layered unionfs mount, and 
that didn't work either.  I'm guessing this is a known issue.  Are there 
plans to solve it ?

The only work around I can think of (which does work) is to nullfs mount 
in the upper layer instead of the lower one.  The only problem is that 
multiples my mounts substantially. For example it would be nice to mount
/root/bin, /usr/src, /usr/ports, /usr/home/X (or just /usr/home), devfs 
in each $H.

For the record, I know about ezjail, other tools, and other docs on 
sharing read only areas with a base (/s).  I'm interested in solving it 
this particular way, if only to learn more.

[1] 
http://www.freebsd.org/news/status/report-2008-01-2008-03.html#UnionFS-Improvements
my 8.0-current is new enough to have all these patches in it.

FWIW: the unionfs seems very stable atm the moment.




-- 
------------------------------------------------------------------------
Philip M. Gollucci (philip at ridecharge.com)
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching



More information about the freebsd-questions mailing list