[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Convert CentOS system to Xen image?



On Mi, Apr 02, 2008 at 10:03:04 -0400, James Pifer wrote:
> On Wed, 2008-04-02 at 16:32 +0300, Igor Chubin wrote:
> > On Mi, Apr 02, 2008 at 08:41:40 -0400, James Pifer wrote:
> > > Attempted to do this using netcat + ssh and here's my next problem. The
> > > CentOS server is using LVM, so instead of getting an img file of around
> > > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. 
> > 
> > 
> > If you use netcat (and dd), you will get image
> > with the size of underlying harddisk.
> > 
> > (not LV, but whole disk).
> > 
> > 
> > What command have you use to copy image?
> > 
> > If you use line
> > 
> >     cat /dev/DEVICE | nc ...
> > 
> 
> 
> I used:
> cat /dev/ida/c0d0p2 | nc -l -p 3000

You have copied just one partition,
instead of the whole disk.

To copy the whole disk,
you should use:

# cat /dev/ida/c0d0 | nc -l -p 3000

But this command will copy all of the disk (and if it is big,
it is not good idea; also you need enough freespace on the target
system).

More flexible way is the way mentioned by Ross: 
to use LVM on the target system
and to copy not the raw device, but files, which is situated
on the device.




> 
> Then on dom0 I used:
> netcat centoshost 3000 > centos.img
> 
> James
> 

-- 
WBR, i.m.chubin


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.