[linux-lvm] Proper way to delete an active snapshot?

Linda A. Walsh lvm at tlinx.org
Sat Sep 3 07:48:29 UTC 2011



Zdenek Kabelac wrote:
> Dne 30.8.2011 13:47, Zdenek Kabelac napsal(a):
>   
>> Dne 30.8.2011 13:32, Linda A. Walsh napsal(a):
>>     
>>>
>>> If you have a snapshot of a volume running... how are you supposed to delete
>>> it?
>>>
>>> i.e. after you unmount it... if I just do a lvremove, I get a warning about it
>>> being
>>> an active volume -- so I tried doing a dmsetup remove on it first -- and that
>>> stops the warning -- but I just noticed, I had a bunch of inactive 'cow'
>>> volume names under 'dmsetup ls', that referred to the old snapshot names.
>>>       
>> lvchange -an  vg/snapshot_lv
>>     
>
> Ooops sorry - ignore this one - as this will work with some not yet release target
>
>   
I'm confused.

First I tried:

# lvremove /dev/Home+Space/Home-2011.08.31-02.23.11
Do you really want to remove active logical volume 
Home-2011.08.31-02.23.11? [y/n]: ^C
  Logical volume Home-2011.08.31-02.23.11 not removed


Then, I tried what you had above:

# lvchange -an /dev/Home+Space/Home-2011.08.31-02.23.11     
# lvremove /dev/Home+Space/Home-2011.08.31-02.23.11    
  Logical volume "Home-2011.08.31-02.23.11" successfully removed

Was it not supposed to work?



>> Does it work for you ?
>>
>> If so - please post  -vvvv  trace.
>>     
>
>
> So just post only  lvremove -vvvv  trace please.
>
> It could be udev-related issue.
>
> Zdenek
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>   




More information about the linux-lvm mailing list