Thank you Stefan.
That's exactly what i needed.
I worked perfectly.

2011/10/20 Simon Wilson <[email protected]>:
> ----- Message from Stefan Hajnoczi <[email protected]> ---------
>   Date: Thu, 20 Oct 2011 07:43:45 -0700
>   From: Stefan Hajnoczi <[email protected]>
> Subject: Re: Convert one .img disk created with sparse=true to no sparse
>     To: Gonzalo Marcote Peña <[email protected]>
>     Cc: [email protected]
>
>
>> On Thu, Oct 20, 2011 at 4:21 AM, Gonzalo Marcote Peña
>> <[email protected]> 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 [email protected]
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
> ----- End message from Stefan Hajnoczi <[email protected]> -----
>
> If working with a NON-sparse VM img (i.e. originally created with
> virt-install --nonsparse), does a cp without --sparse=never retain the
> non-sparse nature of the file, or does it have to be specified?
>
> Simon
>
>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to