Hello Mr. Okajima! :)

Thank you for letting me know that it is not possible to use aufs as a
branch. This means I need to do my task differently.

Slax has this setup
/ (root) = tmpfs (rw) + ro1 + ro2 + ro3 ...

Now I realized that for my purposes I actually do not need to reuse
the tmpfs branch. So in fact I do not need my current root (aufs) as a
branch, I can simply setup another union mount from scratch, with my
existing ro branches and a new (empty) tmpfs, like this:
/another_union = tmpfs2 (different) + ro1 + ro2 + ro3 ...
and I will chroot this, it will be probably even better for my purposes.

By the way, I am very happy that Debian has aufs patches in their
stock kernel, so adding AUFS to debian is a matter of single command
(apt install aufs-dkms) without the need to recompile kernel.
This makes life so easier :)

Happy 2018! :-)

Tomas M


On Thu, Dec 28, 2017 at 5:49 PM,  <sf...@users.sourceforge.net> wrote:
> Hi Tomas,
> Glad to hear from you again.
>
> Tomas M:
>> can I use aufs mount as a branch of another aufs mount?
>
> Basically, you can't.
> Technically, such hierarchy will cause an internal recursive call which
> consumes the stack space a lot. Aufs explicitly prohibited it in the
> beginning. Later, another user had requested me to support it, and I did
> after some investigation and consideration. It was implemented with
> CONFIG_AUFS_ROBR "Aufs as an readonly branch of another aufs mount" in
> aufs1-age. But the feature was un-popular and I removed it when aufs has
> grown up.
>
> Current linux kernel consumes the less stack space than it used
> to. Additinonally the small stack space (4KB) configuration is gone
> now. So I guess it should be enough possible now. But it is suspicious
> for me to think it is really necessary.
>
>
>> Is there any workaround?
>> My goal is to create a chroot which will have current root as a
>> readonly branch, and tmpfs as writable branch.
>
> Why don't you try stacking onto a single aufs mount?
> - /(root) = /rwA + /roB
> - /union = /changes
> - /union(new) = /changes + /rwA + /roB
>   instead of
>   /union(new) = /changes + /root
>
>
> J. R. Okajima

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Reply via email to