Re: Convert one .img disk created with sparse=true to no sparse

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

 



On Thu, Oct 20, 2011 at 4:21 AM, Gonzalo Marcote Peña
<gonzalomarcote@xxxxxxxxx> wrote:
> Hi.
> I have one guest that I created with virt-install comand option 'sparse=true'.
> As i want to use now this guest for I/O tasks (DDBB) and i want to
> improve performance, I want to convert the disk.img from sparse to no
> sparse (obviusly without format it).
> How can I do this task without loosinf the disk image data?.

If you are using a raw image file:
$ cp --sparse=never old-sparse.img new-allocated.img

This copies the data into the new file and does not try to make zero
regions sparse.  You can then replace the old file with the new file.

Stefan
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux