Differences of aufs, unionfs and overlayfs from each other

Solution 1:

overlayfs has been merged in kernel 3.18-rc2. Now that it has graduated to the main Linux tree, it is reasonable to guess that overlayfs will see a wider adoption in the future.

Solution 2:

A little reading on gentoo's wiki. Reveals one difference between unionfs and OverlayFS. Speed OverlayFS sends all file i/o requests directly to the underling file system. And is thus potentially faster than unionfs. aufs supplies a super set of OverlayFS features. In other words there setups that can be done with aufs but not OverlayFS. aufs is not in the official kernel but should be included on your system.

aufs supports selecting which branch will be writable rather having this hard code by the driver. It is unclear weather or not overlayfs does this unionfs does not.

For kernel 3.17 neither overlayfs nor aufs were included by mainline. Ubuntu may have chosen to include them. If not the appropriate kernel module will need to be installed.

Solution 3:

I cant offer you a comparison but I do use Aufs. If you follow the instructions in this blog post you can see via Example 3 how you can specify which branch can be read-only or read-write.

Typically the first file system is by default written to unless you specify otherwise as per example 3.

 mount -t aufs -o br=/read/write/dir=rw:/read/only/dir/=ro -o udba=reval none /tmp/aufs-root/

ubda parameter is how you control how changes made directly to the folders are relfected in the union system.