- Mount the original filesystem
- run df -h to see what's the actual usage of said filesystem
At this point I create two copies of the original filesystem, one "portable" tar.bz2 and a "fixed" LVM volume.
For the portable image:
- create an empty file (dd if=/dev/zero of=live_copy.img bs=1M count= 2048 for a 2Gb filesystem, for example)
- create a filesystem on that file (mkfs.ext3 live_copy.img for an ext3 FS)
- mount it (mount live_copy.img /mnt/copy -o loop)
- rsync between the two (rsync -avz )
- umount the image, compress and safely store it.
live_copy.img is a proper filesystem, with permissions, symlinks and whatnot. You can use it as a source for another install, for example.
For the LVM volume: create it , mount it, format it and rsync between the original filesystem (just like the image). This LVM is to be used as a block device for your DomU
Hope it helps.
De: "Donny Brooks" <dbrooks@xxxxxxxxxxxxxxxx>
Para: xen-users@xxxxxxxxxxxxxxxxxxx
Enviados: Martes, 20 de Abril 2010 17:00:48
Asunto: [Xen-users] Best way to go from Physical to Virtual with Fedora 11 on Centos 5.4 Dom0
I am about to be moving 2 of our production servers over to be virtualized on our CentOS 5.4 Xen machine. I know usually I would want to do a "dd" deal to move the physical host over but on one machine I need to reduce the disk space and the other I need to increase. Since "dd" is a bit for bit copy it would use the same physical size of the current disks. I know I could do a resize2fs on it, but wouldn't it be better to just start with the right size? What would you use in this event? rsync or similar?
--
Donny B.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users