How to set up unionfs under ubuntu

This is an old post i had on my wiki before i deleted it. This will be updated in a near future since unionfs has been updated and so has my system. I haven“t found out yet how to do an easy upgrade of unionfs, but if you do know, please leave a comment.

Here comes the origial post:

First get the sources from http://www.fsl.cs.sunysb.edu/project-unionfs.html. The current version as of this writing is 1.1.5 for kernels 2.6.9-2.6.15. Doing a “uname -r” will tell you what your current kernel is. Mine was “2.6.15-27-k7″.

Then you have to get the kernel sources, headers and libuu-dev:

sudo apt-get install linux-source linux-headers-2.6.15-27-k7 libuu-dev

Get to the directory where you downloaded the sources to and do: tar zxvf unionfs-x.x.x cd unionfs-x.x.x

Then you have to edit the Makefile: nano Makefile and change the line “BINS := unionctl uniondbg unoinimap” to “BINS := unionctl uniondbg” and then change the line ” cp unionimap ${PREFIX}/sbin” to “# cp unionimap ${PREFIX}/sbin”

This is because i didnt find the correct e2fsprogs-headers or something in ubuntu packages.

then do sudo make, and then sudo make install

After that, sudo depmod -a and then sudo modprobe unionfs

then all you have to do is something like: sudo mount -t unionfs -o dirs=/mnt/F=rw:/mnt/G=ro:/mnt/H=ro:/mnt/E=ro unionfs /mnt/All (note that F=rw while all others is ro, bug in unionfs somewhere)

Using some help from http://www.linux-live.org/unionfs/

I will try to find a way to upgrade to a newer version that maybe supports true transparency so i can delete files from my union mounted resource, but i don’t know at the moment how to do that, so if you do, please let me know!

This entry was posted in Computers, Filesystem, Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree