2 Aufs2.1 -- advanced multi layered unification filesystem version 2.1
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 Aufs2.1 supports linux-2.6.31 and later. If you want older kernel version
19 support, try aufs2 from aufs2-27..aufs2-30 GIT branches or aufs1 from
21 By the way, generally "aufs2" means version 2.0 but sometimes it means
22 whole version 2 series. For instance, the name of GIT tree "aufs2-2.6"
23 means whole version 2 series and the name of branch in the GIT tree
24 "aufs2-27" means version 2.0.
26 Note: it becomes clear that "Aufs was rejected. Let's give it up."
27 According to Christoph Hellwig, linux rejects all union-type filesystems
29 <http://marc.info/?l=linux-kernel&m=123938533724484&w=2>
33 ----------------------------------------
34 - unite several directories into a single virtual filesystem. The member
35 directory is called as a branch.
36 - you can specify the permission flags to the branch, which are 'readonly',
37 'readwrite' and 'whiteout-able.'
38 - by upper writable branch, internal copyup and whiteout, files/dirs on
39 readonly branch are modifiable logically.
40 - dynamic branch manipulation, add, del.
43 Also there are many enhancements in aufs1, such as:
44 - readdir(3) in userspace.
45 - keep inode number by external inode number table
46 - keep the timestamps of file/dir in internal copyup operation
47 - seekable directory, supporting NFS readdir.
48 - whiteout is hardlinked in order to reduce the consumption of inodes
50 - do not copyup, nor create a whiteout when it is unnecessary
51 - revert a single systemcall when an error occurs in aufs
52 - remount interface instead of ioctl
53 - maintain /etc/mtab by an external command, /sbin/mount.aufs.
54 - loopback mounted filesystem as a branch
55 - kernel thread for removing the dir who has a plenty of whiteouts
56 - support copyup sparse file (a file which has a 'hole' in it)
57 - default permission flags for branches
58 - selectable permission flags for ro branch, whether whiteout can
61 - support <sysfs>/fs/aufs and <debugfs>/aufs.
62 - support multiple writable branches, some policies to select one
63 among multiple writable branches.
64 - a new semantics for link(2) and rename(2) to support multiple
66 - no glibc changes are required.
67 - pseudo hardlink (hardlink over branches)
68 - allow a direct access manually to a file on branch, e.g. bypassing aufs.
69 including NFS or remote filesystem branch.
70 - userspace wrapper for pathconf(3)/fpathconf(3) with _PC_LINK_MAX.
73 Currently these features are dropped temporary from aufs2.
74 See design/08plan.txt in detail.
75 - test only the highest one for the directory permission (dirperm1)
76 - copyup on open (coo=)
77 - nested mount, i.e. aufs as readonly no-whiteout branch of another aufs
79 - statistics of aufs thread (/sys/fs/aufs/stat)
80 - delegation mode (dlgt)
81 a delegation of the internal branch access to support task I/O
82 accounting, which also supports Linux Security Modules (LSM) mainly
84 - intent.open/create (file open in a single lookup)
86 Features or just an idea in the future (see also design/*.txt),
87 - reorder the branch index without del/re-add.
88 - permanent xino files for NFSD
89 - an option for refreshing the opened files after add/del branches
90 - 'move' policy for copy-up between two writable branches, after
92 - light version, without branch manipulation. (unnecessary?)
94 - inotify in userspace
100 ----------------------------------------
101 Kindly one of aufs user, the Center for Scientific Computing and Free
102 Software (C3SL), Federal University of Parana offered me a public GIT
104 And there are several GIT servers. See http://aufs.sf.net in detail.
106 There are three GIT trees, aufs2-2.6, aufs2-standalone and aufs2-util.
107 While the aufs2-util is always necessary, you need either of aufs2-2.6
110 The aufs2-2.6 tree includes the whole linux-2.6 GIT tree,
111 git://git.kernel.org/.../torvalds/linux-2.6.git.
112 And you cannot select CONFIG_AUFS_FS=m for this version, eg. you cannot
113 build aufs2 as an externel kernel module.
114 If you already have linux-2.6 GIT tree, you may want to pull and merge
115 the "aufs2.1" branch from this tree.
117 On the other hand, the aufs2-standalone tree has only aufs source files
118 and a necessary patch, and you can select CONFIG_AUFS_FS=m. In other
119 words, the aufs2-standalone tree is generated from aufs2-2.6 tree by,
120 - extract new files and modifications.
121 - generate some patch files from modifications.
122 - generate a ChangeLog file from git-log.
123 - commit the files newly and no log messages. this is not git-pull.
125 Both of aufs2-2.6 and aufs2-standalone trees have branches whose name is
126 in form of "aufs2.1" or "aufs2.1-xx" where "xx" represents the linux kernel
127 version, "linux-2.6.xx". For instance, "aufs2.1" (no -xx) for the latest
128 -rc version, and "aufs2.1-31" for linux-2.6.31,
131 $ git clone --reference /your/linux-2.6/git/tree \
132 http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-2.6.git \
134 - if you don't have linux-2.6 GIT tree, then remove "--reference ..."
136 $ git checkout origin/aufs2.1-31
138 o aufs2-standalone tree
139 $ git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git \
141 $ cd aufs2-standalone.git
142 $ git checkout origin/aufs2.1-31
145 $ git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-util.git \
148 $ git checkout origin/aufs2.1
151 $ git clone git://git.kernel.org/.../torvalds/linux-2.6.git linux-2.6.git
152 It will take very long time.
155 $ git remote add aufs2 http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-2.6.git
156 $ git checkout -b aufs2.1-31 v2.6.31
157 $ git pull aufs2 aufs2.1-31
158 It may take long time again.
159 Once pulling completes, you've got linux-2.6.31 and aufs2.1 for it in a
160 branch named aufs2.1-31, and you can configure and build it.
164 $ git checkout -t -b aufs2.1 master
165 $ git pull aufs2 aufs2.1
166 then you've got the latest linux kernel and the latest aufs2.1 in a
167 branch named aufs2.1, and you can configure and build it.
168 But aufs is released once a week, so you may meet a compilation error
169 due to mismatching between the mainline and aufs2.1.
171 Or you may want build linux-2.6.xx.yy instead of linux-2.6.xx, then here
172 is an approach using linux-2.6-stable GIT tree.
174 $ cd linux-2.6.git/..
175 $ git clone -q --reference ./linux-2.6.git git://git.kernel.org/.../linux-2.6-stable.git \
177 It will take very long time.
179 $ cd linux-2.6-stable.git
180 $ git remote add aufs2 http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-2.6.git
181 $ git checkout -b aufs2.1-31.1 v2.6.31.1
182 $ git pull aufs2 aufs2.1-31
183 then you've got linux-2.6.31.1 and aufs2.1 for 2.6.31 in a branch named
184 aufs2.1-31.1, and you can configure and build it.
185 But the changes made by v2.6.xx.yy may conflict with aufs2.1-xx, since
186 aufs2.1-xx is for v2.6.xx only. In this case, you may find some patchces
187 for v2.6.xx.yy in aufs2-standalone.git#aufs2.1-xx branch if someone else
188 have ever requested me to support v2.6.xx.yy and I did it.
190 You can also check what was changed by pulling aufs2.
191 $ git diff v2.6.31.1..aufs2.1-31.1
193 If you want to check the changed files other than fs/aufs, then try this.
194 $ git diff v2.6.31.1..aufs2.1-31.1 |
197 > /^diff.*aufs/ {new=0}
202 3. Configuration and Compilation
203 ----------------------------------------
204 Make sure you have git-checkout'ed the correct branch.
207 - enable CONFIG_EXPERIMENTAL and CONFIG_AUFS_FS.
208 - set other aufs configurations if necessary.
210 For aufs2-standalone tree,
211 There are several ways to build.
213 You may feel why aufs2-standalone.patch needs to export so many kernel
214 symbols. Because you selected aufs2-standalone tree instead of aufs2-2.6
215 tree. All symbols exported here are just for the external aufs module.
216 If you don't like aufs2-standalone.patch, then try aufs2-2.6 tree.
219 - apply ./aufs2-kbuild.patch to your kernel source files.
220 - apply ./aufs2-base.patch too.
221 - apply ./proc_map.patch too, if you want to make /proc/PID/maps (and
222 others including lsof(1)) show the file path on aufs instead of the
223 path on the branch fs.
224 - apply ./aufs2-standalone.patch too, if you have a plan to set
225 CONFIG_AUFS_FS=m. otherwise you don't need ./aufs2-standalone.patch.
226 - copy ./{Documentation,fs,include/linux/aufs_type.h} files to your
227 kernel source tree. Never copy ./include/linux/Kbuild.
228 - enable CONFIG_EXPERIMENTAL and CONFIG_AUFS_FS, you can select either
230 - and build your kernel as usual.
231 - install the built kernel.
232 - install the header files too by "make headers_install".
233 - and reboot your system.
236 - module only (CONFIG_AUFS_FS=m).
237 - apply ./aufs2-base.patch to your kernel source files.
238 - apply ./proc_map.patch too to your kernel source files,
239 if you want to make /proc/PID/maps (and others including lsof(1)) show
240 the file path on aufs instead of the path on the branch fs.
241 - apply ./aufs2-standalone.patch too.
242 - build your kernel, don't forget "make headers_install", and reboot.
243 - edit ./config.mk and set other aufs configurations if necessary.
244 Note: You should read ./fs/aufs/Kconfig carefully which describes
245 every aufs configurations.
246 - build the module by simple "make".
247 - you can specify ${KDIR} make variable which points to your kernel
250 + run "make install" to install the aufs module, or copy the built
251 ./aufs.ko to /lib/modules/... and run depmod -a (or reboot simply).
252 + run "make headers_install" to install the aufs header file (you can
253 specify DESTDIR), or copty ./usr/include/linux/aufs_type.h to
254 /usr/include/linux or wherever you like.
255 - no need to apply aufs2-kbuild.patch, nor copying source files to your
258 Note: The haeder file aufs_type.h is necessary to build aufs2-util
259 as well as "make headers_install" in the kernel source tree.
260 headers_install is subject to be forgotten, but it is essentially
261 necessary, not only for building aufs2-util.
262 You may not meet problems without headers_install in some older
266 - read README in aufs2-util, build and install it
267 - if you want to use readdir(3) in userspace or pathconf(3) wrapper,
268 then run "make install_ulib" too. And refer to the aufs manual in
273 ----------------------------------------
274 At first, make sure aufs2-util are installed, and please read the aufs
275 manual, aufs.5 in aufs2-util.git tree.
279 $ mkdir /tmp/rw /tmp/aufs
280 # mount -t aufs -o br=/tmp/rw:${HOME} none /tmp/aufs
282 Here is another example. The result is equivalent.
283 # mount -t aufs -o br=/tmp/rw=rw:${HOME}=ro none /tmp/aufs
285 # mount -t aufs -o br:/tmp/rw none /tmp/aufs
286 # mount -o remount,append:${HOME} /tmp/aufs
288 Then, you can see whole tree of your home dir through /tmp/aufs. If
289 you modify a file under /tmp/aufs, the one on your home directory is
290 not affected, instead the same named file will be newly created under
291 /tmp/rw. And all of your modification to a file will be applied to
292 the one under /tmp/rw. This is called the file based Copy on Write
294 Aufs mount options are described in aufs.5.
295 If you run chroot or something and make your aufs as a root directory,
296 then you need to customize the shutdown script. See the aufs manual in
299 Additionally, there are some sample usages of aufs which are a
300 diskless system with network booting, and LiveCD over NFS.
301 See sample dir in CVS tree on SourceForge.
305 ----------------------------------------
306 When you have any problems or strange behaviour in aufs, please let me
308 - /proc/mounts (instead of the output of mount(8))
310 - /sys/fs/aufs/* (if you have them)
311 - /debug/aufs/* (if you have them)
312 - linux kernel version
313 if your kernel is not plain, for example modified by distributor,
314 the url where i can download its source is necessary too.
315 - aufs version which was printed at loading the module or booting the
316 system, instead of the date you downloaded.
317 - configuration (define/undefine CONFIG_AUFS_xxx)
318 - kernel configuration or /proc/config.gz (if you have it)
319 - behaviour which you think to be incorrect
320 - actual operation, reproducible one is better
321 - mailto: aufs-users at lists.sourceforge.net
323 Usually, I don't watch the Public Areas(Bugs, Support Requests, Patches,
324 and Feature Requests) on SourceForge. Please join and write to
329 ----------------------------------------
330 Thanks to everyone who have tried and are using aufs, whoever
331 have reported a bug or any feedback.
334 Tomas Matejicek(slax.org) made a donation (much more than once).
335 Since Apr 2010, Tomas M (the author of Slax and Linux Live
336 scripts) is making "doubling" donations.
337 Unfortunately I cannot list all of the donators, but I really
339 It ends Aug 2010, but the ordinary donation URL is still available.
340 <http://sourceforge.net/donate/index.php?group_id=167503>
341 Dai Itasaka made a donation (2007/8).
342 Chuck Smith made a donation (2008/4, 10 and 12).
343 Henk Schoneveld made a donation (2008/9).
344 Chih-Wei Huang, ASUS, CTC donated Eee PC 4G (2008/10).
345 Francois Dupoux made a donation (2008/11).
346 Bruno Cesar Ribas and Luis Carlos Erpen de Bona, C3SL serves public
347 aufs2 GIT tree (2009/2).
348 William Grant made a donation (2009/3).
349 Patrick Lane made a donation (2009/4).
350 The Mail Archive (mail-archive.com) made donations (2009/5).
351 Nippy Networks (Ed Wildgoose) made a donation (2009/7).
352 New Dream Network, LLC (www.dreamhost.com) made a donation (2009/11).
353 Pavel Pronskiy made a donation (2011/2).
354 Iridium and Inmarsat satellite phone retailer (www.mailasail.com), Nippy
355 Networks (Ed Wildgoose) made a donation for hardware (2011/3).
356 Max Lekomcev (DOM-TV project) made a donation (2011/7).
359 Donations are always, including future donations, very important and
360 helpful for me to keep on developing aufs.
364 ----------------------------------------
365 If you are an experienced user, no explanation is needed. Aufs is
366 just a linux filesystem.