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/
Home Products Support Community News


Re: [Xen-users] Xen with LVM

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Xen with LVM
From: Errol Neal <eneal@xxxxxxxxxxxxxxxxx>
Date: Thu, 11 Oct 2007 19:33:33 -0400
Delivery-date: Thu, 11 Oct 2007 16:29:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <470E7AFA.5020006@xxxxxxxxxxx>
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>
References: <470E692E.2090708@xxxxxxxxxxx> <470E7AFA.5020006@xxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Internet Messaging Program (IMP) H3 (4.1.5)
Quoting "IDAGroup - R.W.Muller" <robin@xxxxxxxxxxx>:

Ok, I guess it has not really something to do with LVM, cause I just
installed a (working!)
Centos5 guest into a (also working) Centos5 dom0 as imagefile. When I
try to mount the image
I get:

[root@serv106 ~]# mount -o loop /disk.img /mnt/loop/
mount: you must specify the filesystem type

So, very similar to the error before (actually the same). What is wrong
with my guest installation
that those are booting fine, but are not mountable?

Thanks for any help here,

This is because you are attempting to mount the entire disk.
use sfdisk -l -uS /disk.img to determine what sector the partition you wish to mount starts at. then mount it with the offset option. For example:

server30:/etc/xen/vm # ls /dev/xendata/
volume0  volume1  volume2  volume3
server30:/etc/xen/vm # sfdisk -l -uS /dev/xendata/volume3

Disk /dev/xendata/volume3: 0 cylinders, 0 heads, 0 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 0/0/0).
For this listing I'll assume that geometry.
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/xendata/volume3p1   *        63  20964824   20964762   7  HPFS/NTFS
/dev/xendata/volume3p2      20964825 125821079  104856255   7  HPFS/NTFS
                start: (c,h,s) expected (1023,254,63) found (1023,0,1)
/dev/xendata/volume3p3             0         -          0   0  Empty
/dev/xendata/volume3p4             0         -          0   0  Empty
server30:/etc/xen/vm # mount -o loop,ro,offset=$(( 512*63 )) /dev/xendata/volume3 /mnt/windows/
server30:/etc/xen/vm # ls /mnt/windows
AUTOEXEC.BAT            Inetpub        System Volume Information  pagefile.sys
CFusionMX7              MSDOS.SYS      WINDOWS                    qpmd8378.bin
CONFIG.SYS              NTDETECT.COM   boot.ini
Documents and Settings  Program Files  msizap.exe
IO.SYS                  RECYCLER       ntldr

If you image contains a LVM partition, then it becomes a bit more complicated.
Use losetup with the offset option to loop your image/partition
Use pvscan to scan the loopback device
Use vgchange -ay to activate the volumes
Mount the volumes.

Let me know if that answers your question..


This message was sent using IMP, the Internet Messaging Program.

Xen-users mailing list

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