This is my reply for a support-request on SourceForge.
I have experienced that my reply to
<bra...@support-requests.aufs.p.re.sf.net> was ignored and I had to
forward to aufs-users ML.
This time, I wrote to both.


"MasterQ":
> Hello,
> i have a box with a linux installation on a sdcard. To protect the box from 
> changes and to protect the sd-card (without wear-leveling) from many 
> write-cycles I use aufs with to branches:
> 1. ext4 ro mounted partition /ro
> 2. ramfs partion on /rw.
> I have mounted both and merged them with aufs that works fine.
>
> I want to give this box away. But it is possibile that i have to give support 
> and need /ro branch to be writeable.
> For example for keeping log files after system crash or make a system update.
> I see, the second example could be made in chroot enviorment.
>
> Teoriticaly something like:
> 1. remount the /ro with -o remount,rw
> 2. mount -o remount,mod:/ro=rw /
> 4. mount -o remount,mod:/rw=ro /
>
> Should solve the problem, but of cause /rw will be allways busy.
>
> So what i like to ask is...
> Is there something like:
> 1. remount the /ro with -o remount,rw
> 2. mount -o remount,mod:/ro=rw /
> 3. Tell aufs so save new files to /ro

Hello MasterQ,

Unfortunately I cannot fully understand what you wrote.
What you want to do looks like as making the root dir readonly because
your first writable branch /rw is already busy.
Generally you can make the root dir readonly only when shutting down the
system. In this case, you can use "aubrsync" script to reflect the
contents of /rw to /ro (which should be writable).
"aubrsync" script is available the system shutdown time only. So it may
not be your solution.
Another option is a rather new feature called "move-down" (oppsite of
copy-up). Try a utility called "aumvdown" in aufs-util.git.

- remount the /ro with -o remount,rw
- mount -o remount,mod:/ro=rw /
- run aumvdown until "remount,mod:/rw=ro" succeeds

But I am not sure when the third step succeeds. Additionally when it
succeeds, errors may happen because the file becomes "readonly" for some
applications.

Inserting a new writable branch before your /rw may make the problem
smaller. But I don't think it can be a solution for you.


Hope this helps
J. R. Okajima

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees

Reply via email to