52
52
- selectable permission flags for ro branch, whether whiteout can
55
- support <sysfs>/fs/aufs.
56
- support multiple writable branches, some policies to select one
57
among multiple writable branches.
58
- a new semantics for link(2) and rename(2) to support multiple
60
- a delegation of the internal branch access to support task I/O
61
accounting, which also supports Linux Security Modules (LSM) mainly
63
- nested mount, i.e. aufs as readonly no-whiteout branch of another aufs.
56
64
- and more... see aufs manual in detail
58
Aufs is in still development stage, especially,,,
66
Aufs is in still development stage, especially:
59
67
- pseudo hardlink (hardlink over branches)
60
68
- allow a direct access manually to a file on branch, e.g. bypassing aufs.
61
69
including NFS or remote filesystem branch.
64
70
- refine xino and revalidate
65
71
- pseudo-link in NFS-exporting
67
- a delegation of the internal branch access to support task I/O
68
accounting, which also supports Linux Security Modules (LSM) mainly
70
- nested mount, i.e. aufs as readonly no-whiteout branch of another aufs.
74
- reorder the branch index without del/re-add.
75
- permanent xino files
78
- an option for refreshing the opened files after add/del branches
79
- 'move' policy for copy-up between two writable branches, after
81
- ioctl to manipulate file between branches.
73
- sample for kvm, xen, vmware and openvz? If a directory can be
74
sharable between several Guest-OSes, to share readonly aufs branches
76
85
- remount option copy/move between two branches. (unnecessary?)
77
86
- O_DIRECT (unnecessary?)
78
87
- light version, without branch manipulation. (unnecessary?)
79
88
- SMP, because I don't have such machine. But several users reported
80
89
aufs is working fine on SMP machines.
81
- 64bit environment, because I don't have such machine.
82
90
- copyup in userspace
91
- inotify in userspace
84
- disk quota (unnecessary?)
104
111
$ cd aufs.wcvs/aufs
105
112
$ cvs diff -D20061212 -D20061219
114
Usually I am updating CVS tree on every Monday.
107
115
I always try putting the stable version in CVS, so you can try CVS
108
116
instead of SourceForge File Release. And every changes are summarized
109
and reported to aufs-users at lists.sourceforge.net ML. It is recommended to
117
and reported to aufs-users at lists.sourceforge.net ML. I'd like to
118
recommend you to join this ML.
113
121
3. Configuration and Compilation
114
122
----------------------------------------
115
Aufs is being developed and tested on linux-2.6.16 and later
116
(But I am planning to shift to the 'linux-2.6.18 and later').
123
Aufs is being developed and tested on linux-2.6.16 and later.
117
124
You need the correct environment to build a kernel module. Generally
118
125
it is an environment which your kernel was built.
119
126
If you are unsure that you got the correct environment, then I
120
127
recommend you to built your kernel by yourself. If it succeeds, you've
121
128
got the correct environment.
123
Currently aufs configuration is written in ./Kconfig.in. You can build the
124
real ./fs/aufs/Kconfig file by 'make.' And follow the instructions which will
125
be produced. The built ./fs/aufs/Kconfig depends upon the kernel version.
130
Currently aufs configuration is written in ./Kconfig.in. You can
131
generate the real ./fs/aufs/Kconfig file by make(1). And follow the
132
instructions which will be produced. The built ./fs/aufs/Kconfig
133
depends upon the kernel version.
134
Before you build ./fs/aufs/Kconfig, you need to configure your kernel,
135
since this build refers to linux/include/version.h.
126
136
$ make -f local.mk kconfig
127
138
The local.mk searches your kernel build path by
128
139
KDIR = /lib/modules/$(shell uname -r)/build
129
140
If you are cross-compiling the aufs module, try
130
141
$ make KDIR=/your/kernel/build/path -f local.mk kconfig
131
If you compile aufs statically, the built Kconfig will help you.
142
If you link aufs statically, the generated Kconfig will help you.
133
144
Also you can use ./local.mk to compile aufs as a module by simply,
134
145
$ make -f local.mk
140
151
configuration for your aufs module.
141
152
If you don't want to change the ./local.mk, then create a new file
142
153
./priv_def.mk and write the definitions your aufs configuration. The
143
./local.mk includes ./priv_def.mk it it exists.
154
./local.mk includes ./priv_def.mk if it exists.
155
When you configure aufs by modifying ./local.mk (or ./priv_dev.mk),
156
leave it blank/unset when you disable an aufs configuration, instead
159
There is a contributed Makefile for aufs users. You might want to try
161
http://sourceforge.net/mailarchive/forum.php?thread_name=9c4865a10707241831r189f9646n5f2c4a9c303797d1%40mail.gmail.com&forum_name=aufs-users
162
and see the attachment.
145
164
Currently, CONFIG_DEBUG_PROVE_LOCKING (in linux kernel) is not
146
supported since MAX_LOCKDEP_SUBCLASSES is too low for a stackable
165
supported since MAX_LOCKDEP_SUBCLASSES is too small for a stackable
147
166
filesystem. I am trying reducing the depth of lock subclasses.
167
Until then, you need to increase the value of MAX_LOCKDEP_SUBCLASSES
168
macro in include/linux/lockdep.h, for example, 16UL, when you enable
169
CONFIG_DEBUG_PROVE_LOCKING.
149
171
When you test the performance, it is recommended to disable
150
172
CONFIG_AUFS_DEBUG. It is enabled by default for the feature test.
174
Since aufs supports several versions of linux kernel, it uses the
176
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
177
On the other hand, some distributions modify their kernel by their own
178
patches. For example, just a piece of code is brought from v2.6.18 and
179
merged into a distribution kernel which calls itself as v2.6.17.
180
Finally, the conditions in aufs will not work correctly.
181
You may or may not find them when you compile aufs.
182
You need to modify aufs source code for 'custom-version' kernel
183
(cf. patch/ubuntu-edgy.patch).
187
There are several patches for linux kernel, in order to use aufs.
188
All of them are not necessary essentially, but in some cases you need
189
them. It is up to your environment and aufs usage.
190
All these patches are just for exporting a kernel internal function to
191
modules. If the function was already declared as extern and you link
192
aufs statically to your kernel, then you don't need such patch. If the
193
function was not extern and you want the feature, you need to apply
195
When you apply a patch, you need to enable the corresponding aufs
197
All these patches are under CVS_TREE/aufs/patch.
199
- sec_perm-2.6.24.patch
200
For linux-2.6.24 and later.
201
When you compile aufs as a module and enable CONFIG_SECURITY, this
203
- splice-2.6.23.patch
204
For linux-2.6.23 and later.
205
When you use splice(2) or loopback-mount an fs-image file in aufs,
206
this patch is required. Aufs doesn't support splice(2) in
207
linux-2.6.22 and earlier.
208
- sysfs_get_dentry.patch
209
For linux-2.6.23 and later.
210
If you want to see the file size under /sys/fs/aufs, apply this
211
patch. I am afraid most people never care the size of such file.
212
The size shows the size of a memory allocated in kernel space.
213
If you write something to the file under /sys/fs/aufs, the file size
214
will be zero and the memory will be freed.
216
For linux-2.6.19 and later.
217
When you compile aufs as a module and use NFS as an aufs branch
218
filesystem, this patch is required.
220
For linux-2.6.19 and later till linux-2.6.21.
221
When you use NFS as an aufs branch filesystem, this patch is
224
Same above, but this patch is for linux-2.6.22 only.
225
- deny_write_access.patch
226
For linux-2.6.17 and later.
227
When you compile aufs as a module, applied this patch and enabled a
228
configuration, a minor security enhancement will be available at
230
You can omit this if you don't care the writing to a running
231
executable on a lower branch filesystem which was invoked through
234
For linux-2.6.22 and earlier.
235
When you compile aufs as a module and applied this patch, an
236
optimization inside aufs will be available at adding or deleting a
237
branch filesystem. You can omit this if you don't care the aufs
240
Additionally, there are patches for aufs which will be necessary when
241
you use non-standard kernel modules or patches. Some of them have been
242
tested by several people, but not all.
243
See also the comments in the patches.
244
- ubuntu-2.6.22-14.46.patch
246
(http://archive.ubuntu.com/ubuntu/pool/main/l/linux-source-2.6.22/
247
linux-source-2.6.22_2.6.22-14.46_all.deb) which is modifed a lot by
250
For Ubuntu Edgy kernel which calls itself as 2.6.17, while its
251
umount_begin() interface has arguments of 2.6.18.
253
For realtime patch (http://people.redhat.com/mingo/realtime-preempt).
255
For linux-vserver module (http://linux-vserver.org).
256
- openvz_028stab039.1.patch
257
For openvz module (http://openvz.org).
154
261
----------------------------------------
156
263
$ man -l ./aufs.5
157
264
# install -m 500 -p mount.aufs umount.aufs auplink aulchown /sbin (recommended)
265
# echo FLUSH=ALL > /etc/default/auplink (recommended)
158
266
# insmod ./aufs.ko
159
267
$ mkdir /tmp/rw /tmp/aufs
160
268
# mount -t aufs -o dirs=/tmp/rw:${HOME}=ro none /tmp/aufs
270
If you are familiar with Unionfs Version 1.x series and want to use
271
unionctl(8), you can try the sample unionctl script under sample/
162
274
Here is another example.
164
276
# mount -t aufs -o br:/tmp/rw:${HOME}=ro none /tmp/aufs