Holger Schurig:
> > I've read documentation for aufs and there is some note that aufs2
> > utilities are always necessary.
>
> That's not true. I use a basic aufs2 system on my device and
> don't use or even have installed aufs utilities. It can all be
> done with "mount -o ...".
>
> I guess you'll need the utilities only for advanced stuff :-)

aufs2-util is essentially necessary, especially these files.

(from the aufs2-util README)
----------------------------------------------------------------------
o /sbin/mount.aufs, /sbin/umount.aufs
  Helpers for util-linux-ng package. You should NOT invoke them
  manually. Just install them by "make install".

o /sbin/auplink
  Handles aufs pseudo-link at remount/unmount time. You can invoke it
  manually at anytime.
----------------------------------------------------------------------

They are always invoked at mount/remount/unmount time.
The main purpose of /sbin/mount.aufs is,
- maintain /etc/mtab
- maintain the aufs pseudo-link (by calling /sbin/auplink)

If you don't install /sbin/mount.aufs, then the aufs line in your
/etc/mtab will be incorrect, and you may loose the aufs pseudo-link.
/sbin/auplink is called by /sbin/umount.aufs too.

If you don't know what the aufs pseudo-link is, then refer to the aufs
manual in detail.
Additional information,

(from linux/Documentation/filesystems/aufs/design/02struct.txt)
Pseudo-link
----------------------------------------------------------------------
Assume "fileA" exists on the lower readonly branch only and it is
hardlinked to "fileB" on the branch. When you write something to fileA,
aufs copies-up it to the upper writable branch. Additionally aufs
creates a hardlink under the Pseudo-link Directory of the writable
branch. The inode of a pseudo-link is kept in aufs super_block as a
simple list. If fileB is read after unlinking fileA, aufs returns
filedata from the pseudo-link instead of the lower readonly
branch. Because the pseudo-link is based upon the inode, to keep the
inode number by xino (see above) is important.

All the hardlinks under the Pseudo-link Directory of the writable branch
should be restored in a proper location later. Aufs provides a utility
to do this. The userspace helpers executed at remounting and unmounting
aufs by default.
----------------------------------------------------------------------
And
http://www.mail-archive.com/[email protected]/msg02639.html

If you don't care about /etc/mtab and the pseudo-link, you can uninstall
aufs2-util. Otherwise, just install it.

aufs2-util contains other useful things.
o /usr/bin/auchk
  Similar to generic fsck. Checks whether a branch is healthy or not
  from aufs's point of view.

o /usr/bin/aubrsync
  Move files from the upper writable branch to the lower branch.
  If you use this script with aufs1, then you need to install aufs.shlib
  to /usr/lib/aufs.shlib. Currently only the 20080211 version is tested
  for aufs1.
  The development of this script is sponcered by ASUSTek Computer Inc.
  (http://www.asus.com/).
  Kindly they agreed that I keep my aufs work as free software as it has
  been.

o /usr/lib/libau.so
  A dynamic link library for "readdir(3) in user-space".
  If you need this , then run "make libau.so install_ulib". And refer to
  the aufs manual in detail.

Generally readdir(3) in libau.so runs faster than readdir in aufs
kernel-space, particulary for the huge dir.


J. R. Okajima

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

Reply via email to