Hello nomad,

nomad Bellcam:
>    it is unclear to me from the docs and man page whether is is possible to
>    have a rw aufs file system with a ro "first (upper-most) branch.  the man
>    page says "The default branch permission for the first branch is rw, and
>    the rest is ro." and "When you mount or remount your union without o ro
>    common mount option and without writable branch, aufs will warn you that 
> the
>    first branch should be writable." but i cannot find any more info regarding
>    this.

The reason why the first branch should be writable is the copy-up
feature. When you modify a file on a readonly branch, aufs will copy it
to the upper writable branch and modify it. If there are no writable
branch before (upper) than the readonly branch, then you cannot modify
the file.


>    what i want to do is this:
>
>    mount -t aufs -o br:one=ro:two=rw none base
>
>    this works, but when i try to write to base i cannot (ro file system).  i 
> am
>    not sure why aufs will not simply write to "two"


If you are creating a new file, then the aufs mount option
'create=bottom-up' may help you. There are several policies for create
and copyup to select a writable branch, please refer to the aufs manual.


>    if this is not possible, what is the best solution for keeping "one" at the
>    top of the stack?  i thought of making a dummy empty directory an mounting
>    it like this:
>
>    mount -t aufs -o br:dummy=rw:one=ro:two=rw none base
>
>    is this the recommended way?

It is totally up to what you want.
As I wrote, if you want to modify (or remove) a file existing in a
readonly branch, you need upper writable branch.


J. R. Okajima

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev

Reply via email to