aufs based upgrade tests

Michael Vogt mvo at ubuntu.com
Mon Mar 16 12:27:22 GMT 2009


On Mon, Mar 16, 2009 at 09:14:18AM +0100, Martin Pitt wrote:
> Hey Michael,
> 
> Michael Vogt [2009-03-13 19:19 +0100]:
> > The idea discussed with Evan Dandrea (and others) was to create a
> > writable overlay into /tmp on top the systemdirs in "/" and then run
> > the release upgrade.
> 
> That's a great idea!
> 
> Some questions:
> 
>  * Is it possible to use some different directory than /tmp/ ? My root
>    partition doesn't have enough space; could that be set in the
>    configuration file?

Yes, if you use:
[Aufs]
RWDir=/some/dir

It will use that directory for the write operations. I will put
together a wiki page that describes the various options.
 
>  * Once the upgrade is complete, why throw away /tmp? If I use a
>    different directory, couldn't we have some bits in initramfs which
>    check for those and re-mount the aufs? Then after reboot, if
>    everything seems to work, could another tool copy back the aufs
>    contents to the real file system, to "commit" the upgrade? Or
>    doesn't that work for some reason?

That is the longer term goal indeed. This first step will help making
testing the upgrade process easier. 

There is already some code in my branch that supports performing the
upgrade in a aufs overlay and writing the changes back to the real
system (via rsync) at the end of the upgrade (if no dpkg errors
occured). This seems to work already, but I have not done a really
good test to compare if the upgrade done with this process is bit-wise
identical to a normal one. 

The next step would be integration with the initramfs tools so that
the user can test the changes and apply. 

There is currently a known issue with the aufs/dpkg interaction:
https://bugs.edge.launchpad.net/ubuntu/+source/update-manager/+bug/342451

Aufs does not support rename() on direcotries under certain
conditions. This makes the libthunar-vfs-1-2 upgrade fail (a direcotry
with files in it is replaced with a single file of the same
name). This needs some dpkg love to make it work around this
limitation.

Cheers,
 Michael



More information about the ubuntu-devel mailing list