I have to join two file systems, one read-only (squashfs) and one read-write (ext4). My plan is to mount the read-write filesystem over the read-only flesystem so it appears writable. When I make some changes on the read-only filesystem, the changes should go to the read-write file system.

I am using Linux 3.17, Ubuntu 14.10, and came across these file systems: aufs, unionfs and overlayfs. I don't know what their differences from each other are and what to use for this situation. Could anybody show me the differences between aufs, unionfs and overlayfs, or just suggest the best one to use with this situation?

3 Answers 3


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.

  • en.wikipedia.org/wiki/Aufs is also interesting: "aufs was rejected for merging into mainline Linux. Its code was criticized for being "dense, unreadable, [and] uncommented".[3] Instead, OverlayFS was merged in the Linux kernel.[4][5] After several attempts to merge aufs into mainline kernel, the author has given up.[6]" Oct 13, 2018 at 15:41
  • 1
    @CiroSantilli新疆改造中心法轮功六四事件 Aw...
    – Michael
    Jan 29, 2020 at 23:34
  • How does that answer the question?
    – SF.
    Mar 6, 2020 at 9:21

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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.