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 externel 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://aufs.git.sourceforge.net/gitroot/aufs/aufs3-linux.git \
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://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git \
127 $ cd aufs3-standalone.git
128 $ git checkout origin/aufs3.0
131 $ git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs-util.git \
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-proc_map.patch too, if you want to make /proc/PID/maps (and
172 others including lsof(1)) show the file path on aufs instead of the
173 path on the branch fs.
174 - apply ./aufs3-standalone.patch too, if you have a plan to set
175 CONFIG_AUFS_FS=m. otherwise you don't need ./aufs3-standalone.patch.
176 - copy ./{Documentation,fs,include/linux/aufs_type.h} files to your
177 kernel source tree. Never copy ./include/linux/Kbuild.
178 - enable CONFIG_EXPERIMENTAL and CONFIG_AUFS_FS, you can select either
180 - and build your kernel as usual.
181 - install the built kernel.
182 - install the header files too by "make headers_install" to the
183 directory where you specify. By default, it is $PWD/usr.
184 - and reboot your system.
187 - module only (CONFIG_AUFS_FS=m).
188 - apply ./aufs3-base.patch to your kernel source files.
189 - apply ./aufs3-proc_map.patch too to your kernel source files,
190 if you want to make /proc/PID/maps (and others including lsof(1)) show
191 the file path on aufs instead of the path on the branch fs.
192 - apply ./aufs3-standalone.patch too.
193 - build your kernel, don't forget "make headers_install", and reboot.
194 - edit ./config.mk and set other aufs configurations if necessary.
195 Note: You should read ./fs/aufs/Kconfig carefully which describes
196 every aufs configurations.
197 - build the module by simple "make".
198 - you can specify ${KDIR} make variable which points to your kernel
201 + run "make install" to install the aufs module, or copy the built
202 ./aufs.ko to /lib/modules/... and run depmod -a (or reboot simply).
203 + run "make headers_install" to install the aufs header file (you can
204 specify DESTDIR), or copty ./usr/include/linux/aufs_type.h to
205 /usr/include/linux or wherever you like. By default, the target
206 directory is $PWD/usr.
207 - no need to apply aufs3-kbuild.patch, nor copying source files to your
210 Note: The haeder file aufs_type.h is necessary to build aufs-util
211 as well as "make headers_install" in the kernel source tree.
212 headers_install is subject to be forgotten, but it is essentially
213 necessary, not only for building aufs-util.
214 You may not meet problems without headers_install in some older
218 - read README in aufs-util, build and install it
219 - note that your distribution may contain an obsoleted version of
220 aufs_type.h in /usr/include/linux or something. When you build aufs
221 utilities, make sure that your compiler refers the correct aufs header
222 file which is built by "make headers_install."
223 - if you want to use readdir(3) in userspace or pathconf(3) wrapper,
224 then run "make install_ulib" too. And refer to the aufs manual in
229 ----------------------------------------
230 At first, make sure aufs-util are installed, and please read the aufs
231 manual, aufs.5 in aufs-util.git tree.
235 $ mkdir /tmp/rw /tmp/aufs
236 # mount -t aufs -o br=/tmp/rw:${HOME} none /tmp/aufs
238 Here is another example. The result is equivalent.
239 # mount -t aufs -o br=/tmp/rw=rw:${HOME}=ro none /tmp/aufs
241 # mount -t aufs -o br:/tmp/rw none /tmp/aufs
242 # mount -o remount,append:${HOME} /tmp/aufs
244 Then, you can see whole tree of your home dir through /tmp/aufs. If
245 you modify a file under /tmp/aufs, the one on your home directory is
246 not affected, instead the same named file will be newly created under
247 /tmp/rw. And all of your modification to a file will be applied to
248 the one under /tmp/rw. This is called the file based Copy on Write
250 Aufs mount options are described in aufs.5.
251 If you run chroot or something and make your aufs as a root directory,
252 then you need to customize the shutdown script. See the aufs manual in
255 Additionally, there are some sample usages of aufs which are a
256 diskless system with network booting, and LiveCD over NFS.
257 See sample dir in CVS tree on SourceForge.
261 ----------------------------------------
262 When you have any problems or strange behaviour in aufs, please let me
264 - /proc/mounts (instead of the output of mount(8))
266 - /sys/fs/aufs/* (if you have them)
267 - /debug/aufs/* (if you have them)
268 - linux kernel version
269 if your kernel is not plain, for example modified by distributor,
270 the url where i can download its source is necessary too.
271 - aufs version which was printed at loading the module or booting the
272 system, instead of the date you downloaded.
273 - configuration (define/undefine CONFIG_AUFS_xxx)
274 - kernel configuration or /proc/config.gz (if you have it)
275 - behaviour which you think to be incorrect
276 - actual operation, reproducible one is better
277 - mailto: aufs-users at lists.sourceforge.net
279 Usually, I don't watch the Public Areas(Bugs, Support Requests, Patches,
280 and Feature Requests) on SourceForge. Please join and write to
285 ----------------------------------------
286 Thanks to everyone who have tried and are using aufs, whoever
287 have reported a bug or any feedback.
290 Tomas Matejicek(slax.org) made a donation (much more than once).
291 Since Apr 2010, Tomas M (the author of Slax and Linux Live
292 scripts) is making "doubling" donations.
293 Unfortunately I cannot list all of the donators, but I really
295 It ends Aug 2010, but the ordinary donation URL is still available.
296 <http://sourceforge.net/donate/index.php?group_id=167503>
297 Dai Itasaka made a donation (2007/8).
298 Chuck Smith made a donation (2008/4, 10 and 12).
299 Henk Schoneveld made a donation (2008/9).
300 Chih-Wei Huang, ASUS, CTC donated Eee PC 4G (2008/10).
301 Francois Dupoux made a donation (2008/11).
302 Bruno Cesar Ribas and Luis Carlos Erpen de Bona, C3SL serves public
303 aufs2 GIT tree (2009/2).
304 William Grant made a donation (2009/3).
305 Patrick Lane made a donation (2009/4).
306 The Mail Archive (mail-archive.com) made donations (2009/5).
307 Nippy Networks (Ed Wildgoose) made a donation (2009/7).
308 New Dream Network, LLC (www.dreamhost.com) made a donation (2009/11).
309 Pavel Pronskiy made a donation (2011/2).
310 Iridium and Inmarsat satellite phone retailer (www.mailasail.com), Nippy
311 Networks (Ed Wildgoose) made a donation for hardware (2011/3).
312 Max Lekomcev (DOM-TV project) made a donation (2011/7, 12 and 2012/3).
313 Sam Liddicott made a donation (2011/9).
316 Donations are always, including future donations, very important and
317 helpful for me to keep on developing aufs.
321 ----------------------------------------
322 If you are an experienced user, no explanation is needed. Aufs is
323 just a linux filesystem.