[linux-lvm] unable to remove snapshot of raid1 leg

Zdenek Kabelac zdenek.kabelac at gmail.com
Tue Oct 24 11:03:15 UTC 2017


Dne 23.10.2017 v 18:40 Alexander 'Leo' Bergolth napsal(a):
> On 10/23/2017 04:44 PM, Heinz Mauelshagen wrote:
>> LVM snapshots are meant to be used on the user visible raid1 LVs.
>> You found a bug allowing it to be used on its hidden legs.
>>
>> Removing such per leg snapshot should be possible after the raid1 LV got
>> deactivated.
> 
> Hmm. This LV is currently in use. Any chance to remove it with the raid1
> LV active?
> 
> Cheers,

Hi

Not with lvm2 command.

I could probably imagine a way with several dmsetup commands but it looks
fairly easier to do it in some 'offline' time.

-

The one 'risky' idea could be to try 'vgcfgrestore' metadata before taking
snapshot then (forcibly) remove  (dmsetup remove (-f)  vg-snapshot)  so 
snapshot is no longer referencing origin.
(force should not be needed - but if some has opened snapshot...)

Then you should be able to use  'lvchange --refresh vg'

and finally drop  'left-over'  cow volume with dmsetup remove.
(and make sure snapshot is already gone - if not - try remove again)

Regards

Zdenek




More information about the linux-lvm mailing list