[Unionfs] Unionfs capability queston
Dave Miller
justdave at mozilla.com
Fri Dec 14 13:42:59 EST 2007
Jim Kissel wrote on 12/11/07 6:47 AM:
> Is it possible using unionfs to mount an directory from one of these
> external sources such that it forms a union with /bin that is
> transparent to the user? I would like to do similar with /lib
>
> A program on /media/external_dirve/bin would appear to be in /bin and if
> it needs any additional libraries, the ones stored on
> media/external_drive/lib would appear in /lib
Based on a recent conversation in #unionfs on freenode that I saw, I'm
pretty sure this is possible (but I haven't tried it myself, so this is
just hearsay :) ). The trick is you need to bind mount /bin and /lib
somewhere else first and use the bind-mounted copies as the branches in
your unionfs mounts (which you would then mount overtop of the original
locations).
mkdir /mnt/fakebin
mount --bind /bin /mnt/fakebin
mkdir /mnt/fakelib
mount --bind /lib /mnt/fakelib
mount -t unionfs -o dirs=/media/external_drive/bin=rw:/mnt/fakebin=ro \
unionfs /bin
mount -t unionfs -o dirs=/media/external_drive/lib=rw:/mnt/fakelib=ro \
unionfs /lib
--
Dave Miller http://www.justdave.net/
System Administrator, Mozilla Corporation http://www.mozilla.com/
Project Leader, Bugzilla Bug Tracking System http://www.bugzilla.org/
More information about the unionfs
mailing list