[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |