Re: Cannot remove lvs associated with deleted vm guests

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

 



On Sat, January 28, 2012 12:19, Phil Schaffner wrote:
> Pardon the top-post and cross-post, but this apparently
> should have gone
> to centos-virt@xxxxxxxxxx
>
> Phil
>
> chris procter wrote on 01/27/2012 03:29 PM:
>> Hi,
>>
>> Its ages since I came across this problem so my memory
>> is a little hazey but something is obviously holding on
>> to the lv so you'll need to figure out whats holding it
>> and kill that. The open value returned by "dmsetup info"
>>  is how many things have the device file open), it looks
>> to be 2 at the moment and you cant "dmsetup remove"
>> untill its zero (lvm might  be one of them I cant
>> remember)
>>
>>
>> A few things worth trying are
>>
>>
>> 1) make sure its not mounted anywhere!

[root@vhost01 ~]# umount /dev/vg_vhost01/lv_vm_base
umount: /dev/vg_vhost01/lv_vm_base: not mounted

>> 2) if multipathd is running try stopping that.

[root@vhost01 ~]# ps -ef | grep multipathd
root       465   307  0 09:40 pts/0    00:00:00 grep
multipathd
[root@vhost01 ~]# service multipathd status
multipathd: unrecognized service
[root@vhost01 ~]# find / -name multipathd
[root@vhost01 ~]#

>> 3) either lsof or fuser on the device file may be able

[root@vhost01 ~]# fuser /dev/vg_vhost01/lv_vm_base
[root@vhost01 ~]# lsof /dev/vg_vhost01/lv_vm_base
[root@vhost01 ~]#

>> 4) something vm related might not have let go properly,
>> are there any deamons/processes etc still running?

There are many vm qeum processes running, non contain any
reference to lv_vm_base

[root@vhost01 ~]# ps -ef | grep vm_base
root       549   307  0 09:44 pts/0    00:00:00 grep vm_base
[root@vhost01 ~]#

>> 5) reboot, the sledgehammer aproach to killing off
>> processes!!
>>
>> 6) you could try hitting it with dmsetup again, you need
>> to suspend the device first using "dmsetup suspend"
>> which *may* persuade the holding process to let go, if
>> it does reduce the open count you'll need to "dmsetup
>> resume" and then suspend again untill open reaches zero
>> when "dmsetup remove" should work. I'd try and avoid
>> this option if you can, you're messing beneath the lvm
>> layer and it may not like that, should be ok but...

[root@vhost01 ~]#  dmsetup info -c vg_vhost01-lv_vm_base
Name                  Maj Min Stat Open Targ Event  UUID
vg_vhost01-lv_vm_base 253   5 L--w    2    1      0
LVM-gXMt00E1RDjpSX3INLZ35Prtg66aX36BeAOlKIkmfSNQRNol3Hni920R4YVaZr52
[root@vhost01 ~]# dmsetup suspend vg_vhost01-lv_vm_base
[root@vhost01 ~]#  dmsetup info -c vg_vhost01-lv_vm_base
Name                  Maj Min Stat Open Targ Event  UUID
vg_vhost01-lv_vm_base 253   5 L-sw    2    1      0
LVM-gXMt00E1RDjpSX3INLZ35Prtg66aX36BeAOlKIkmfSNQRNol3Hni920R4YVaZr52

>> if none of that is possible/works you could try asking
>> on the lvm-linux list.

Am so doing.

>>
>>
>> Reinstalling really shouldn't be necesary.
>>

Yes.  However.  .  .


-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@xxxxxxxxxxxxx
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

_______________________________________________
CentOS-virt mailing list
CentOS-virt@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos-virt


[Index of Archives]     [CentOS Users]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Linux USB]

  Powered by Linux