[Unionfs] Unionfs capability queston

Jim Kissel jlk at osml.eu
Sat Dec 15 06:21:42 EST 2007



Dave Miller wrote:
> 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

Great idea, but......
/bin is already a part of a union that is mounted a /
The --bind works, but unionfs (2.0) prevents you from creating a union 
of /media/external_drive.... and /mnt/fakebin with a:
mount: wrong fs type, bad option, bad superblock on unionfs,
        missing codepage or other error
        In some calse useful info is found in syslog - try
        dmesg | tail or so

which yields:

unionfs: hidden directory '/home/user/MMc-SD/partition1/bin is not a 
valid branch
unionfs_read_super: error while parsing options (err = -22)

I've also tried with /fakebin on the same disk as /bin and used the 
option 'none' instead of 'unionfs'  Same results in both cases.

Thanks for you feedback.  I thought you had solved it.  I may have to 
abandon unionfs for now until the unionfs-odf is stable.

kind regards


More information about the unionfs mailing list