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

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



On Di, Apr 01, 2008 at 04:17:19 -0400, James Pifer wrote:
> > I think yes, but I have never used it.
> > 
> > 
> > You can create image with cat, netcat or ssh.
> > 
> > 
> > knoopix#  cat /dev/sda | nc -l -p 3000
> > 
> > dom0#     nc knoppix 3000 > centos.img   
> > 
> 
> Any chance of this working while the system is up, instead of booting
> with knoppix (or anything else)? Or would too much not be copied because
> it's locked?


The reason not in locks actually, 
but better to say in the fact that copied filesystem is being
modified while copying. Hence it's likely that it will be
inconsistent after copying finished (I mean target fs).


If you can remount all of the source file systems to ro mode,
you may not reboot to live cd.

Also, if it is impossible, 
you can shut all processes (or better to switch to init 1, 
but as far as I understand you want to ssh to the server, so 
sshd must be running as minimum), that can modify filesystem, 
and after that make

# sync

and start copying.


Also you can use ssh instead of nc (ssh eats more CPU power due to
crypting, but it is not so important in your case).

centos# sync ; cat /dev/hda | ssh dom0 ' cat > centos.img '




> 
> One of my other challenges is that this system is remote to me so I
> would have to ask (beg) someone to give me hand. Also, being a live
> production system, downtime is never easy...
> 
> Never used netcat before, that looks pretty cool. 
> 
> Thanks,
> 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®.