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] Migrating DomUs from file VBD to LVM Backend

To: "Reinhard Brandstädter" <reinhard.brandstaedter@xxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-users] Migrating DomUs from file VBD to LVM Backend
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Tue, 24 Apr 2007 16:44:38 +0200
Delivery-date: Tue, 24 Apr 2007 07:43:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200704241639.47228.reinhard.brandstaedter@xxxxxx>
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AceGfn9I1TRVD8JbRoK5fnK4clCtYwAAF1iA
Thread-topic: [Xen-users] Migrating DomUs from file VBD to LVM Backend
 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Reinhard Brandstädter
> Sent: 24 April 2007 15:40
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-users] Migrating DomUs from file VBD to LVM Backend
> 
> On Tuesday 24 April 2007 15:42, Ross S. W. Walker wrote:
> > > -----Original Message-----
> > > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> > > [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> > > Reinhard Brandstädter
> > > Sent: Tuesday, April 24, 2007 9:25 AM
> > > To: xen-users@xxxxxxxxxxxxxxxxxxx
> > > Subject: [Xen-users] Migrating DomUs from file VBD to LVM Backend
> > >
> > > Hello,
> > >
> > > what would be the easiest and fastest way to migrate a file
> > > based DomU to a
> > > LVM based DomU. Given that the file contains a partition
> > > table + partitions.
> > >
> > > I tried with an dummy approach:
> > >
> > > dd if=/path/to/file.img of=/dev/volumegroup/logical-volume.
> > >
> > > That gives me a logical volume that xm create refuses to use....
> >
> > What format is file.img, is it a sparse file created with dd, or
> > is it a qcow qemu file?
> 
> It's a sparse file.
> I found a solution which works, but not really elegant:
> 
> 1. I created a LVM Volume with the size of the image
> 2. created a partition table on that volume (same layout as 
> within the disk 
> image)
> 3. used kpartx to get device mappings from the file and the LVM volume
> 4. used 'dd' to dump the single partitions from the image to 
> the single 
> partitions of the LVM volume.
> 
> Now I only wonder why dumping the image directly to the LVM 
> volume doesn't work.

I don't know the answer, but I'm thinking it's because when copying the sparse 
file, dd doesn't actually write the "empty" bits with zeros, but rather skips 
over them. This may upset some data-structures that are used by the 
file-system, perhaps?

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



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

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