Union mounts allows you to mount exactly one read-write file system over exactly one read-only file system. The top layer file system must support whiteouts and fallthrus, which are special kinds of directory entries. Currently, ext2, jffs2, and tmpfs have fallthru and whiteout support (in the union mount git repository below).
Union mounts require patches to the kernel, e2fsprogs, and util-linux. All patches are maintained in public git repos, linked to below.
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/val/linux-2.6.gitThe name of the most up to date branch changes a lot; send email if you need to know exactly what it is this week. As of June 15th, the most recent branch is "ext2_cleanup".
$ git clone git://git.kernel.org/pub/scm/fs/ext2/val/e2fsprogs.git
$ git clone git://git.kernel.org/pub/scm/utils/util-linux-ng/val/util-linux-ng.git
Download the following enormous tarball and you'll get a complete union mount on User Mode Linux development environment (along with above git repos, of course). It is x86_64 only. You must have the union mount e2fsprogs and util-linux installed on your development machine in order to rebuild the test disk images for UML.
Union mount UML devkit
Please send corrections, suggestions, new patch sources, etc. to:vaurora at redhat dot com
Part 2: Unioning file systems: Union directories and mounts
Part 3: Unioning file systems: unionfs and aufs
The in-kernel documentation is currently out of date.