WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Detach specific partition LVM of XEN

To: Souza Anderson <souzalix@xxxxxxxxx>
Subject: Re: [Xen-users] Detach specific partition LVM of XEN
From: Stephan Seitz <s.seitz@xxxxxxxxxxxx>
Date: Thu, 12 Jun 2008 23:19:46 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 12 Jun 2008 13:54:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1202504c0806121339j78fd27eag61c526eb83f618f3@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: netz-haut e.K.
References: <1202504c0806121339j78fd27eag61c526eb83f618f3@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080505)
Hi,

i assume your lvm problem is caused by an overeager udev configuration
which sets up device entries for partitions _inside_ the lv as well as for
the lv itself.

try to
# kpartx -d /dev/yourvg/yourlv
to release these mapper entries before lvremove the lv.


if you renamed this lv, you need to check and re-assign /dev/mapper entries
manually before you're able to remove the entries.

when you're done, check for updated udev and/or lvm packages for your distro.

cheers,

Stephan




Souza Anderson schrieb:
Hi...
I have had a problem when I am going to detach one specific LVM partitions of Xen, so I have been trying xm destroy <domain>, lvchange -an <lvm_partition>, lvremove -f.... So I haven't had sucess. I restarted the server with init 1 yet and nothing... I have seem two specific process started xenwatch and xenbus, but I am not sure if this processes have some action over LVM partitions + XEN. I need to know how can I remove this partition to build another xen VM, an if I need to stop the xend and xendomais services to do the detachment. Thanks so much!!!! VG Name VGxen
  LV UUID                vsdRV1-j7cA-LlZI-dAvv-yPC1-lCEt-OQY3W3
  LV Write Access        read/write
  LV Status              available
  # open                 4
  LV Size                17.69 GB
  Current LE             4529
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0
srv01-Debian:~# xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 238 1 r----- 29.2 vm01 1 256 1 -b---- 0.1
srv01-Debian:~# xm destroy vm01
srv01-Debian:~# xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 238 1 r----- 31.5
srv01-Debian:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VGxen/VM01_Debian
  VG Name                VGxen
  LV UUID                vsdRV1-j7cA-LlZI-dAvv-yPC1-lCEt-OQY3W3
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                17.69 GB
  Current LE             4529
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0
srv01-Debian:~# lvchange -an /dev/VGxen/VM01_Debian
  LV VGxen/VM01_Debian in use: not deactivating
srv01-Debian:~#
srv01-Debian:~# /etc/init.d/xendomains stop
Shutting down Xen domains:  [done]
srv01-Debian:~# lvchange -an /dev/VGxen/VM01_Debian
  LV VGxen/VM01_Debian in use: not deactivating
srv01-Debian:~#
srv01-Debian:~# /etc/init.d/xend stop
srv01-Debian:~# lvchange -an /dev/VGxen/VM01_Debian
  LV VGxen/VM01_Debian in use: not deactivating
srv01-Debian:~# ps -ef |grep -auxf xen
grep: xen: No such file or directory
srv01-Debian:~# ps -ef |grep xen
root         9     7  0 14:12 ?        00:00:00 [xenwatch]
root        10     7  0 14:12 ?        00:00:00 [xenbus]
root 4698 1 0 14:13 ? 00:00:00 xenstored --pid-file /var/run/xenstore.pid
root      4705     1  0 14:13 ?        00:00:00 xenconsoled
root      4706  4705  0 14:13 ?        00:00:00 xenconsoled
root      4707  4706  0 14:13 ?        00:00:00 xenconsoled
root      5331  5030  0 14:19 pts/1    00:00:00 grep xen
srv01-Debian:~# lvremove -f VGxen
  Can't remove open logical volume "VM01_Debian"
srv01-Debian:~# lvremove -f /dev/VGxen/VM01_Debian
  Can't remove open logical volume "VM01_Debian"
srv01-Debian:~# lvs
  LV          VG    Attr   LSize  Origin Snap%  Move Log Copy%
  VM01_Debian VGxen -wi-ao 17.69G
srv01-Debian:~# vgs
  VG    #PV #LV #SN Attr   VSize  VFree
  VGxen   1   1   0 wz--n- 17.69G    0
srv01-Debian:~# pvs
  PV         VG    Fmt  Attr PSize  PFree
  /dev/hda5  VGxen lvm2 a-   17.69G    0


------------------------------------------------------------------------

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


--
Stephan Seitz
Senior System Administrator

*netz-haut* e.K.
multimediale kommunikation

zweierweg 22
97074 würzburg

fon: +49 931 2876247
fax: +49 931 2876248

web: www.netz-haut.de <http://www.netz-haut.de/>

registriergericht: amtsgericht würzburg, hra 5054

Attachment: s_seitz.vcf
Description: Vcard

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>