Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Nov 2003 14:41:43 +0300
From:      Alex Povolotsky <tarkhil@over.ru>
To:        fs@freebsd.org
Subject:   "Reverse union" mount possible?
Message-ID:  <20031120144143.6cf73e06.tarkhil@over.ru>

next in thread | raw e-mail | index | archive | help
Hello!

stating man mount(8)

             union   Causes the namespace at the mount point to appear as the
                     union of the mounted file system root and the existing
                     directory.  Lookups will be done in the mounted file sys-
                     tem first.  If those operations fail due to a non-exis-
                     tent file the underlying directory is then accessed.  All
                     creates are done in the mounted file system.

Is it somehow possible, or how complex patch will require to get "reverse union" mount, with first lookup in underlying system, and file creation there as well?

In case I'm trying to invent a square wheel, here is the problem:

I need to create several jails with as many common files as possible, and with ability to update software in all jails at once as well as in specific jails. 

Right now, I'm readonly mount_null'ing /bin, /sbin, /usr/bin, /usr/sbin, /usr/lib, /usr/include, /usr/libexec, /usr/share. With a dozen jails, there are too many mounts to my liking, and about twice a week I experience panic. Probabily it's nullfs-related.

I think that reverse-union mounting (over nfs, for stability, but that doesn't really matter) common tree can help me a lot.

I.e. 
mount -o runion 127.0.0.1:/usr/jail/common /usr/jail/jail1
mount -o runion 127.0.0.1:/usr/jail/common /usr/jail/jail2

etc will reduce mounting and make possible to update software in common subtree for all jails as well as in each particular jail.

Please point me to my mistakes ;-)

-- 
Alex.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031120144143.6cf73e06.tarkhil>