From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.

This article is a stub. You can help by expanding it.

Aufs (Another Union File System) is an advanced multi-layered unification filesystem. Aufs was originally a re-design and re-implementation of the popular UnionFS, however after adding many new original ideas it became entirely separate from UnionFS. Aufs is considered a UnionFS alternative since it supports many of the same features.


  • The ability to unite several directories into a single virtual filesystem. Calling the member directory as a branch;
  • Specification of the permission flags on each branch (readonly, readwrite, and whiteout-able);
  • Via upper writable branch, internal copyup and whiteout is possible (files and directories on the readonly branch are logically modifiable);
  • Dynamic branch manipulation (add, delete, etc.)


Emerge the pre-patched (sys-kernel/aufs-sources) package. This will install another set of kernel sources that have had the Aufs4 patches applied. The new sources will show up in /usr/src using a aufs suffixed name scheme.

If aufs sources are not yet emerged on the system, do so presently:

root #emerge --ask sys-kernel/aufs-sources

After the emerge process is finished, list the available sources:

root #eselect kernel list
  [1]   linux-4.14.91-gentoo
  [2]   linux-4.14.91-aufs

Use eselect to set the symlink to the aufs kernel sources:

root #eselect kernel set 2

Kernel configuration

KERNEL Enabling support for Aufs
File systems  --->
   Miscellaneous filesystems  --->
      [*] Aufs (Advanced multi layered unification filesystem) support
            Maximum number of branches (127)  --->
      [*]   Detect direct branch access (bypassing aufs)
              method (fsnotify)  --->
      [ ]   NFS-exportable aufs
      [*]   support for XATTR/EA (including Security Labels)
      [*]   File-based Hierarchical Storage Management
      [ ]   Readdir in userspace
      [ ]   Workaround for rename(2)-ing a directory
      [ ]   Show whiteouts
      [*]   Ramfs (initramfs/rootfs) as an aufs branch
      [ ]   Debug aufs

After the features have been set, build the kernel:

root #make
Depending on the speed of the CPU(s) available, building the kernel could take a while. If the number of CPU cores in the system are known the -jN (where N is a number) option can be used to speed up the complication process. See the build section of the manual kernel configuration article for more information.


In order to work with Aufs, the sys-fs/aufs-util package is needed; utilities are always necessary for Aufs. This packages should be pulled in when emerging sys-kernel/aufs-sources. In the case that it is not, run:

root #emerge --ask sys-fs/aufs-util


Check man aufs


See also

  • UnionFS - The original union filesystem.
  • OverlayFS — an in-kernel attempt at providing union file system capabilities on Linux.