Re: a bug in --namesnapshot merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 14 2009 at  1:21pm -0400,
Mikulas Patocka <mpatocka@xxxxxxxxxx> wrote:

> Hi
> 
> When lvconvert -M --namesnapshot is invoked, there is a bug, it ends up 
> with a message like
> device-mapper: snapshots: exception for block 0 is on disk but not in 
> memory
> 
> The bug is not in the kernel but in the lvm. It loads -real and -cow 
> devices badly, so that the kernel treats the origin volume as the 
> snapshot.
> 
> The --namesnapshot option causes that the snapshot becomes the origin and 
> mergin starts, if we have
> lv-origin   owi-a- origin
> lv-snapshot swi--- snapshot
> , after lvconvert -M --namesnapshot vg/lv-snapshot, we'll have
> lv-snapshot Owi-a- mergin snapshot, containing the previous content of 
> lv-snapshot
> 
> The trick that needs to be done is to preserve the logical volume 
> structure and the device, but move it from one storage to another. Sadly, 
> LVM2 is not designed to do it. That --pivotorigin option that Alasdair 
> implemented needed the same trick and it was buggy too.
> 
> I'd suggest to remove --namesnapshot option at all (and remove patches
> lvm-merge-swap-uuid.patch and 
> lvm-merge-swap-lvid-of-underlying-devices.patch that do most of this 
> stuff) and leave only --nameorigin and --onactivate.
> 
> The implementation of --namesnapshot is very dirty. I was writing that 
> option --namesnapshot for a month, implemented it three times before 
> getting it right. And now some other changes to lvm made it nonworking 
> again. It is unmaintainable over the long term. It is not worth fixing, 
> because it would be beroken again.
> 
> Other that that, I think that snapshot merging could be applied to the 
> kernel and lvm.

I agree with the above.  The two times I rebased those swap uuid patches
they were fairly fragile/subtle/challenging.  Eliminating --namesnapshot
seems reasonable.  I updated the LVM2 snapshot-merge patches accordingly:

http://people.redhat.com/msnitzer/patches/snapshot-merge/lvm2/LVM2-2.02.52/

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux