You are not logged in.

#1 2008-12-22 12:03:05

stabele
Member
Registered: 2008-12-22
Posts: 101

LVM snapshot merge ?

One thing I am really looking forward is LVM snapshot merge - it would be great to easily make snapshot of / , try some changes like install packages I am not sure about and than either revert to state before changes or accept changes (=delete snapshot). To make snapshot is easy, but I don't know any easy way how to revert to state before changes.

Patches for LVM snapshot merge was published at August thanks to Jakub Patocka. Does anybody get this working in Arch ? I was unable to find anything about this at wiki/forums.

Offline

#2 2008-12-23 06:21:19

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: LVM snapshot merge ?

The kernel is on your /boot, which isn't lvm (or are you using grub2?), so to handle that takes some coding; booting up with the wrong kernel for the root, isn't good.

I don't think that you need to merge snapshots: make the snapshot the backup; if things go terribly wrong, then you reboot and select the grub menu that selects root=/dev/mapper/vg0-rootSnap, with the old kernel and initrd. You then get to revert. Merging different snapshots doesn't make that much sense to me, since you can usually boot up a system after a pacman -Syu. (if it can't be done, then merging could be helpful), so your later attempts can all be targeted at the main logical volume, not some snapshot.

I don't know of those patches having been incorporated.

Offline

#3 2008-12-23 10:57:20

stabele
Member
Registered: 2008-12-22
Posts: 101

Re: LVM snapshot merge ?

As far as I understand there is a big need for snapshot merging. In model situation:
1) I make snapshot before operation (could be risky one, could be some package I want to try)
2) After operation I don't like result

Now what? Without snapshot merging sure I can boot from snapshot, but how to revert partitions to original state before this whole operation? I can boot live CD and use dd, but it i slow because a) I have to copy all data, not changes only b) every time written block differs LVM writes this block to snapshot. On the other side, with snapshot merging this is really easy and (if there was not too many changes which is probably in many use cases) also fast.

And yes, I am using /boot outside LVM, but there is no big deal (if I make change kernel I keep copy of old one for some time).

Offline

#4 2008-12-23 11:46:23

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: LVM snapshot merge ?

A workaround would be making the snapshot, rebooting on the snapshot, if it's okay, reboot and do the same thing on the "real" part, if not, throw away the snapshot.

BTW: grub2 should support booting from an lvm /boot


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#5 2008-12-23 12:43:10

stabele
Member
Registered: 2008-12-22
Posts: 101

Re: LVM snapshot merge ?

A workaround would be making the snapshot, rebooting on the snapshot, if it's okay, reboot and do the same thing on the "real" part, if not, throw away the snapshot.

Sure this works. It just a lot less practical than snapshots merging. With snapshot merging all you need before risky operation is to make snapshot (just one command). No need to reboot using snapshot. And more important no need to make changes twice if things are OK.

Offline

Board footer

Powered by FluxBB