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] Error moving DomU image to LVM

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Error moving DomU image to LVM
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Wed, 2 Apr 2008 11:52:27 +0100
Cc: "Johnson, Tony M" <Tony.Johnson@xxxxxxxxx>
Delivery-date: Wed, 02 Apr 2008 03:53:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <3DFFB0670A395946974CE996C7207324128F5485@xxxxxxxxxxxxxxxxxxxx>
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: <3DFFB0670A395946974CE996C7207324128F5485@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
> In creating LVMs during the Fedora install. I created the following
> layout;
>
> /dev/sdb
>    /dev/sdb1     /boot
>    /dev/sdb2     VolGroup01
>    /dev/sdb3     VolGroup02
>
> VolGroup00
>   LogVol01       swap
>   LogVol00       /
>
> VolGroup01
>   LogVol00      /guest1
>   LogVol01      /guest2
>
> I then used virt-install to create HVMs. However I created them using a
> file system: '/xen/file.img'.
> Later I used the dd command to copy the image as follows: dd
> if=/xen/file.img of=/dev/VolGroup01/guest1

That all sounds sensible.

> I added the following to the config: disk =
> ['phy:VolGroup/guest1,xvda1,w'] and get the following error: Error:
> Device 770 (vbd) could not be connected. Device /dev/VolGroup01/guest1
> is mounted in the privileged domain, and so cannot be mounted by a
> guest.

Well, that suggests you had the filesystem mounted (or somehow "in use", at 
least) in dom0.  The control tools stop you from starting the domain in this 
case as mounting a filesystem in multiple domains simultaneously (or whilst 
one is paused / suspended) will produce severe filesystem corruption.

> After rebooting I get this error: fsck.ext3: Bad magic number in
> super-block while trying to open /dev/VolGroup01/guest1

Was this previously a mountable filesystem, configured in /etc/fstab?  
Apparently it's not mountable anymore.  If what you dd-ed was a *whole disk 
image* rather than just a *partition image* then it's not going to be 
possible to directly mount this volume anymore.  I think this is probably the 
case here...  if I'm right about that, then you can just remove the line 
from /etc/fstab.

> Can I recover from the above if so how? What is the correct procedure to
> convert the image to the LVM?

What you did sounds right, as long as the LV was big enough.

You mapped the LV to xvda1 in the guest - that's a partition.  If it's a whole 
disk image then that's not going to work.  Export it as xvda instead.

> Help is greatly appreciated!

Hope that helps,
Cheers,
Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

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

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