[fedora-virt] porting a disk from lvm to file

Sven Lankes sven at lank.es
Wed Jul 28 17:39:30 UTC 2010


On Wed, Jul 28, 2010 at 05:48:37PM +0200, Gianluca Cecchi wrote:

> Can I port this lvm vm-disk to file, for example with something like:
> dd if=/dev/vgname/lvname of=/directory_tree/filename
> and then copy "filename" to the other host and use it as a backing storage
> for a vm on it?

Yes. 

You can also do it in one step:

dd if=/dev/vgname/lvname bs=1024 | ssh username at otherserver.fqdn "dd of=/directory_tree/filename"

You might want to add -c to the ssh cmd to compress the data if the
connection between the servers is < 100 MBit/s.

-- 
sven === jabber/xmpp: sven at lankes.net


More information about the virt mailing list