[arch-general] Btrfs snapshots for upgrade operations

Tom Gundersen teg at jklm.no
Sun Oct 28 13:43:00 EDT 2012


On Sun, Oct 28, 2012 at 3:50 PM, Yclept Nemo <orbisvicis at gmail.com> wrote:
>> create a new subvolume as a snapshot of /
>> mount the new subvolume on /mnt/
>> pacman -Syu --root=/mnt
>> mark the new subvolume as the default one
>
> How much space does a subvolume/snapshot require?

It is copy-on-write, so at first it takes no space at all, but as the
two subvolumes start to diverge the space required would increase.

> Will you snapshot all btrfs volumes, or just system-upgrade related
> one.

Only the ones where pacman writes information. In an ideal world we
would get away with only snapshotting /usr. At the moment we certainly
need to snapshot /etc and /var too, but there might be ways to get
around that in the future.

> It seems logical to swap the order - create a snapshot of the current
> system which will then be upgraded - especially for security upgrades
> which need to be effective immediately, unless it is possible to
> remount a volume without rebooting.

Sure, that would be the standard thing to do. However, I think it
would be much more interesting to use btrfs to allow us to do
"offline" upgrades without actually having to go offline. The reason
is that online upgrades (i.e., what we do now) never really worked. It
is all to easy to cause crashes by upgrading libs/modules.

> It seems that *pacnew and *pacsave files will no longer be required.

I think those would still be required, at least for the time being. As
long as pacman owns files in /etc, there must be a way to merge them
on upgrade...

Cheers,

Tom


More information about the arch-general mailing list