Hello,
I would like do make following setup (see also attached figure aufs-example.jpeg):
Over an original Ubuntu-installation I want to lay a branch, containing some edited directories/files
from /etc /usr and /var. This branch ist hosted in /Personal-Old.
On top of those two branches I want to have a branch (hosted in /Temporal-New), that gathers only edited
files from Personal-Old. Edited files, that aren't in Personal-Old must not be copied up to Temporal-New,
but stay in Original-Ubuntu.
Figuratively speaking it should behave like rain, where Original-Ubuntu is a basin and the other two are
roofs: If a file does not exist or only exists in the "basin" Original-Ubuntu, ist drops down into the basin.
But if there is a file on the "roof" Personal-Old that place is occupied and the copied up one goes to
Temporal-New. And if there is already a file in Temporal-New (another "roof"), the file replaces the former one,
(figuratively it melts with the former one).
>From time to time there will be a brsync of Temporal-New to Personal-Old, but never any to Original-Ubuntu.
My understanding of the extremely technical manpage would be:
mount -t aufs -o diropq=always br:/aufs/Personal-Old/etc=rw:/aufs/Temporal-New/etc=rw none /etc
mount -t aufs -o diropq=always br:/aufs/Personal-Old/usr=rw:/aufs/Temporal-New/usr=rw none /usr
mount -t aufs -o diropq=always br:/aufs/Personal-Old/var=rw:/aufs/Temporal-New/var=rw none /var
or in /etc/fstab (after mounting /):
none /etc aufs -o diropq=always br:/aufs/Personal-Old/etc=rw:/aufs/Temporal-New/etc=rw 0 0
none /usr aufs -o diropq=always br:/aufs/Personal-Old/usr=rw:/aufs/Temporal-New/usr=rw 0 0
none /var aufs -o diropq=always br:/aufs/Personal-Old/var=rw:/aufs/Temporal-New/var=rw 0 0
Even if these are the right guessings there are some questions:
Does an existing subdir in Peronal-Old unwantedly collect ALL edited files of subsubdir e.g. P7?
Do I have to umount Personal-Old and Temporal-New before starting a System Update, just to prevent
the case of the former Question?
Any tips or hints on how to do this properly with aufs?
Reiner
Explaining figure of the wanted setup