2 Aufs3 -- advanced multi layered unification filesystem version 3.x
8 ----------------------------------------
9 In the early days, aufs was entirely re-designed and re-implemented
10 Unionfs Version 1.x series. After many original ideas, approaches,
11 improvements and implementations, it becomes totally different from
12 Unionfs while keeping the basic features.
13 Recently, Unionfs Version 2.x series begin taking some of the same
14 approaches to aufs1's.
15 Unionfs is being developed by Professor Erez Zadok at Stony Brook
16 University and his team.
18 Aufs3 supports linux-3.0 and later.
19 If you want older kernel version support, try aufs2-2.6.git or
20 aufs2-standalone.git repository, aufs1 from CVS on SourceForge.
22 Note: it becomes clear that "Aufs was rejected. Let's give it up."
23 According to Christoph Hellwig, linux rejects all union-type filesystems
25 <http://marc.info/?l=linux-kernel&m=123938533724484&w=2>
29 ----------------------------------------
30 - unite several directories into a single virtual filesystem. The member
31 directory is called as a branch.
32 - you can specify the permission flags to the branch, which are 'readonly',
33 'readwrite' and 'whiteout-able.'
34 - by upper writable branch, internal copyup and whiteout, files/dirs on
35 readonly branch are modifiable logically.
36 - dynamic branch manipulation, add, del.
39 Also there are many enhancements in aufs1, such as:
40 - readdir(3) in userspace.
41 - keep inode number by external inode number table
42 - keep the timestamps of file/dir in internal copyup operation
43 - seekable directory, supporting NFS readdir.
44 - whiteout is hardlinked in order to reduce the consumption of inodes
46 - do not copyup, nor create a whiteout when it is unnecessary
47 - revert a single systemcall when an error occurs in aufs
48 - remount interface instead of ioctl
49 - maintain /etc/mtab by an external command, /sbin/mount.aufs.
50 - loopback mounted filesystem as a branch
51 - kernel thread for removing the dir who has a plenty of whiteouts
52 - support copyup sparse file (a file which has a 'hole' in it)
53 - default permission flags for branches
54 - selectable permission flags for ro branch, whether whiteout can
57 - support <sysfs>/fs/aufs and <debugfs>/aufs.
58 - support multiple writable branches, some policies to select one
59 among multiple writable branches.
60 - a new semantics for link(2) and rename(2) to support multiple
62 - no glibc changes are required.
63 - pseudo hardlink (hardlink over branches)
64 - allow a direct access manually to a file on branch, e.g. bypassing aufs.
65 including NFS or remote filesystem branch.
66 - userspace wrapper for pathconf(3)/fpathconf(3) with _PC_LINK_MAX.
69 Currently these features are dropped temporary from aufs3.
70 See design/08plan.txt in detail.
71 - test only the highest one for the directory permission (dirperm1)
72 - copyup on open (coo=)
73 - nested mount, i.e. aufs as readonly no-whiteout branch of another aufs
75 - statistics of aufs thread (/sys/fs/aufs/stat)
76 - delegation mode (dlgt)
77 a delegation of the internal branch access to support task I/O
78 accounting, which also supports Linux Security Modules (LSM) mainly
80 - intent.open/create (file open in a single lookup)
82 Features or just an idea in the future (see also design/*.txt),
83 - reorder the branch index without del/re-add.
84 - permanent xino files for NFSD
85 - an option for refreshing the opened files after add/del branches
86 - 'move' policy for copy-up between two writable branches, after
88 - light version, without branch manipulation. (unnecessary?)
90 - inotify in userspace
96 ----------------------------------------
97 There were three GIT trees for aufs3, aufs3-linux.git,
98 aufs3-standalone.git, and aufs-util.git. Note that there is no "3" in
100 While the aufs-util is always necessary, you need either of aufs3-linux
103 The aufs3-linux tree includes the whole linux mainline GIT tree,
104 git://git.kernel.org/.../torvalds/linux.git.
105 And you cannot select CONFIG_AUFS_FS=m for this version, eg. you cannot
106 build aufs3 as an external kernel module.
108 On the other hand, the aufs3-standalone tree has only aufs source files
109 and necessary patches, and you can select CONFIG_AUFS_FS=m.
111 You will find GIT branches whose name is in form of "aufs3.x" where "x"
112 represents the linux kernel version, "linux-3.x". For instance,
113 "aufs3.0" is for linux-3.0. For latest "linux-3.x-rcN", use
114 "aufs3.x-rcN" branch.
117 $ git clone --reference /your/linux/git/tree \
118 git://git.code.sf.net/p/aufs/aufs3-linux aufs-aufs3-linux \
120 - if you don't have linux GIT tree, then remove "--reference ..."
122 $ git checkout origin/aufs3.0
124 o aufs3-standalone tree
125 $ git clone git://git.code.sf.net/p/aufs/aufs3-standalone \
127 $ cd aufs3-standalone.git
128 $ git checkout origin/aufs3.0
131 $ git clone git://git.code.sf.net/p/aufs/aufs-util \
134 $ git checkout origin/aufs3.0
136 Note: The 3.x-rcN branch is to be used with `rc' kernel versions ONLY.
137 The minor version number, 'x' in '3.x', of aufs may not always
138 follow the minor version number of the kernel.
139 Because changes in the kernel that cause the use of a new
140 minor version number do not always require changes to aufs-util.
142 Since aufs-util has its own minor version number, you may not be
143 able to find a GIT branch in aufs-util for your kernel's
144 exact minor version number.
145 In this case, you should git-checkout the branch for the
146 nearest lower number.
148 For (an unreleased) example:
149 If you are using "linux-3.10" and the "aufs3.10" branch
150 does not exist in aufs-util repository, then "aufs3.9", "aufs3.8"
151 or something numerically smaller is the branch for your kernel.
153 Also you can view all branches by
157 3. Configuration and Compilation
158 ----------------------------------------
159 Make sure you have git-checkout'ed the correct branch.
161 For aufs3-linux tree,
162 - enable CONFIG_EXPERIMENTAL and CONFIG_AUFS_FS.
163 - set other aufs configurations if necessary.
165 For aufs3-standalone tree,
166 There are several ways to build.
169 - apply ./aufs3-kbuild.patch to your kernel source files.
170 - apply ./aufs3-base.patch too.
171 - apply ./aufs3-mmap.patch too.
172 - apply ./aufs3-standalone.patch too, if you have a plan to set
173 CONFIG_AUFS_FS=m. otherwise you don't need ./aufs3-standalone.patch.
174 - copy ./{Documentation,fs,include/linux/aufs_type.h} files to your
175 kernel source tree. Never copy $PWD/include/linux/Kbuild.
176 - enable CONFIG_EXPERIMENTAL and CONFIG_AUFS_FS, you can select either
178 - and build your kernel as usual.
179 - install the built kernel.
180 - install the header files too by "make headers_install" to the
181 directory where you specify. By default, it is $PWD/usr.
182 "make help" shows a brief note for headers_install.
183 - and reboot your system.
186 - module only (CONFIG_AUFS_FS=m).
187 - apply ./aufs3-base.patch to your kernel source files.
188 - apply ./aufs3-mmap.patch too.
189 - apply ./aufs3-standalone.patch too.
190 - build your kernel, don't forget "make headers_install", and reboot.
191 - edit ./config.mk and set other aufs configurations if necessary.
192 Note: You should read $PWD/fs/aufs/Kconfig carefully which describes
193 every aufs configurations.
194 - build the module by simple "make".
195 - you can specify ${KDIR} make variable which points to your kernel
198 + run "make install" to install the aufs module, or copy the built
199 $PWD/aufs.ko to /lib/modules/... and run depmod -a (or reboot simply).
200 + run "make install_headers" (instead of headers_install) to install
201 the modified aufs header file (you can specify DESTDIR which is
202 available in aufs standalone version's Makefile only), or copy
203 $PWD/usr/include/linux/aufs_type.h to /usr/include/linux or wherever
204 you like manually. By default, the target directory is $PWD/usr.
205 - no need to apply aufs3-kbuild.patch, nor copying source files to your
208 Note: The header file aufs_type.h is necessary to build aufs-util
209 as well as "make headers_install" in the kernel source tree.
210 headers_install is subject to be forgotten, but it is essentially
211 necessary, not only for building aufs-util.
212 You may not meet problems without headers_install in some older
216 - read README in aufs-util, build and install it
217 - note that your distribution may contain an obsoleted version of
218 aufs_type.h in /usr/include/linux or something. When you build aufs
219 utilities, make sure that your compiler refers the correct aufs header
220 file which is built by "make headers_install."
221 - if you want to use readdir(3) in userspace or pathconf(3) wrapper,
222 then run "make install_ulib" too. And refer to the aufs manual in
227 ----------------------------------------
228 At first, make sure aufs-util are installed, and please read the aufs
229 manual, aufs.5 in aufs-util.git tree.
233 $ mkdir /tmp/rw /tmp/aufs
234 # mount -t aufs -o br=/tmp/rw:${HOME} none /tmp/aufs
236 Here is another example. The result is equivalent.
237 # mount -t aufs -o br=/tmp/rw=rw:${HOME}=ro none /tmp/aufs
239 # mount -t aufs -o br:/tmp/rw none /tmp/aufs
240 # mount -o remount,append:${HOME} /tmp/aufs
242 Then, you can see whole tree of your home dir through /tmp/aufs. If
243 you modify a file under /tmp/aufs, the one on your home directory is
244 not affected, instead the same named file will be newly created under
245 /tmp/rw. And all of your modification to a file will be applied to
246 the one under /tmp/rw. This is called the file based Copy on Write
248 Aufs mount options are described in aufs.5.
249 If you run chroot or something and make your aufs as a root directory,
250 then you need to customize the shutdown script. See the aufs manual in
253 Additionally, there are some sample usages of aufs which are a
254 diskless system with network booting, and LiveCD over NFS.
255 See sample dir in CVS tree on SourceForge.
259 ----------------------------------------
260 When you have any problems or strange behaviour in aufs, please let me
262 - /proc/mounts (instead of the output of mount(8))
264 - /sys/fs/aufs/* (if you have them)
265 - /debug/aufs/* (if you have them)
266 - linux kernel version
267 if your kernel is not plain, for example modified by distributor,
268 the url where i can download its source is necessary too.
269 - aufs version which was printed at loading the module or booting the
270 system, instead of the date you downloaded.
271 - configuration (define/undefine CONFIG_AUFS_xxx)
272 - kernel configuration or /proc/config.gz (if you have it)
273 - behaviour which you think to be incorrect
274 - actual operation, reproducible one is better
275 - mailto: aufs-users at lists.sourceforge.net
277 Usually, I don't watch the Public Areas(Bugs, Support Requests, Patches,
278 and Feature Requests) on SourceForge. Please join and write to
283 ----------------------------------------
284 Thanks to everyone who have tried and are using aufs, whoever
285 have reported a bug or any feedback.
288 Tomas Matejicek(slax.org) made a donation (much more than once).
289 Since Apr 2010, Tomas M (the author of Slax and Linux Live
290 scripts) is making "doubling" donations.
291 Unfortunately I cannot list all of the donators, but I really
293 It ends Aug 2010, but the ordinary donation URL is still available.
294 <http://sourceforge.net/donate/index.php?group_id=167503>
295 Dai Itasaka made a donation (2007/8).
296 Chuck Smith made a donation (2008/4, 10 and 12).
297 Henk Schoneveld made a donation (2008/9).
298 Chih-Wei Huang, ASUS, CTC donated Eee PC 4G (2008/10).
299 Francois Dupoux made a donation (2008/11).
300 Bruno Cesar Ribas and Luis Carlos Erpen de Bona, C3SL serves public
301 aufs2 GIT tree (2009/2).
302 William Grant made a donation (2009/3).
303 Patrick Lane made a donation (2009/4).
304 The Mail Archive (mail-archive.com) made donations (2009/5).
305 Nippy Networks (Ed Wildgoose) made a donation (2009/7).
306 New Dream Network, LLC (www.dreamhost.com) made a donation (2009/11).
307 Pavel Pronskiy made a donation (2011/2).
308 Iridium and Inmarsat satellite phone retailer (www.mailasail.com), Nippy
309 Networks (Ed Wildgoose) made a donation for hardware (2011/3).
310 Max Lekomcev (DOM-TV project) made a donation (2011/7, 12, 2012/3, 6 and
312 Sam Liddicott made a donation (2011/9).
313 Era Scarecrow made a donation (2013/4).
314 Bor Ratajc made a donation (2013/4).
315 Alessandro Gorreta made a donation (2013/4).
316 POIRETTE Marc made a donation (2013/4).
317 Alessandro Gorreta made a donation (2013/4).
318 lauri kasvandik made a donation (2013/5).
319 "pemasu from Finland" made a donation (2013/7).
320 The Parted Magic Project made a donation (2013/9).
321 Pavel Barta made a donation (2013/10).
324 Donations are always, including future donations, very important and
325 helpful for me to keep on developing aufs.
329 ----------------------------------------
330 If you are an experienced user, no explanation is needed. Aufs is
331 just a linux filesystem.