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

[Xen-users] Trouble mounting domU logical volumes

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Trouble mounting domU logical volumes
From: Liam Kirsher <liamk@xxxxxxxxxxx>
Date: Fri, 29 Jun 2007 14:16:41 -0700
Delivery-date: Fri, 29 Jun 2007 14:14:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Openpgp: id=7011F7B7; url=http://liam.numenet.com/pgp/
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.0 (X11/20070326)
Hi,

Has anyone gotten this working?  It might be that I just don't
understand LVM very well.

I'm having trouble mounting Xen image files.  I'm trying to follow the
instructions here:
http://fedoraproject.org/wiki/FedoraXenQuickstartFC5#head-1898c4d2e381f0407801069a6dcd61647d1c643c

I'm using default CentOS 5.0 install, which is Xen 3.0.3.  I thought
I should get it working first, before trying to upgrade to 3.[1 or 2?]. 
The virtual
domains I created using the Virt-Manager gui, and they are all CentOS 5.
Two use images and one uses a separate volume group (VolGroup01/LogVol00).
Below, I'm just trying to view the volumes in the image file of dom2, which
looks like this:
# Automatically generated xen config file
name = "dom2"
memory = "255"
disk = [ 'tap:aio:/var/lib/xen/images/dom2.img,xvda,w', ]
vif = [ 'mac=00:16:3e:1d:5f:3f, bridge=xenbr0', ]
vfb = ["type=vnc,vncunused=1"]
uuid = "5ca750c2-074c-321c-89f7-6e9609e965de"
bootloader="/usr/bin/pygrub"
vcpus=1
on_reboot   = 'restart'
on_crash    = 'restart'

The kernel in dom0 and dom2 /boot dir is vmlinuz-2.6.18-8.1.6.el5xen

The first time I tried, I used losetup with the image file, but it looks
like
kpartx will do this automatically without losetup:

kpartx -av /var/lib/xen/images/dom2.img
  loop0p1 : 0 208782 /dev/loop0 63
  loop0p2 : 0 2650725 /dev/loop0 208845

mount /dev/mapper/loop0p2 /mnt/dom2.p2
(apparently works)

vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "VolGroup01" using metadata type lvm2
  Found volume group "VolGroup00" using metadata type lvm2
  Found volume group "VolGroup00" using metadata type lvm2

(This seems wrong.  I don't think there should be two volume groups
with the same name, should there?  But, actually there are, because I
just used the default partitioning scheme in dom2, which sets up LVM.
I think this may be the problem.)

vgchange -ay VolGroup00
  2 logical volume(s) in volume group "VolGroup00" now active

(Does that mean the two in dom0:VolGroup00 or the supposed two new ones
in dom2:VolGroup00???)

lvs
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%
  LogVol00 VolGroup00 -wi-ao  9.75G                             
  LogVol01 VolGroup00 -wi-ao  1.94G                             
  LogVol00 VolGroup01 -wi-a- 10.00G   

That VolGroup00 just looks like what I've got in dom0!  I tried to mount
the volume, per the how-to instruction

mount /dev/VolGroup00/LogVol00 /mnt/somedir

but only managed to mount the
volume I was on, not the one from the image. So.

I'm not going to say much more, because I think the problem is above
somewhere.  Can anyone point me in the right direction?  I was playing
around with this previously and really hosed the whole thing, so I don't
want to do that again!

Basically, I just want to create an image that I can use as a base to
create new domU's.  Well, I want to clone it as a backup.  So I really
need to be able to edit the images, and go back and forth easily between
file images and partitions.

Thanks in advance for your help!

Liam


-- 
Liam Kirsher
PGP: http://liam.numenet.com/pgp/


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

<Prev in Thread] Current Thread [Next in Thread>