Hello Tobias,

Tobias Sarnowski:
> I want to manage a lot of branches via aufs. If a write to a file, it
> should be the prefered file to read from, so I want the writeable
> directories on higher indexes than the read-only ones. My problem is,
        :::

Unfortunately, I could not get fully what you menat.
And I am afraid that you are misunderstanding the word 'index.'
When you have /u as a mounted aufs and it has two branches,
     /u = /rw + /ro
then, the branch index 0 is /rw, and 1 for /ro.
The branch index is an order of branches.

Current aufs supports only 'copyup' which means one direction.
If you change something which exists on /ro ONLY, aufs copies the
thing from /ro to /rw and make the actual change on /rw.
Since current aufs doesn't support 'copy-down', the rule to choose a
writable branch is simple.

When you have multiple writable branches, here is a rule for choosing
one of them. (it may be changed in the future)
- if the parent dir exists on one or more writable branches, the nearest
  one from the copy-src (readonly branch) will be chosen.
- if the parent dir does NOT exists on any of writable branches, the
  nearest writable branch will be selected. and all ancestor directories
  will be copied-up too.

Usually, in order to change the order of branches, you need to execute
mount(8) with the aufs options ins, del or something.


Junjiro Okajima

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to