[ovirt-users] Re: Thin Provisioned to Preallocated

2020-08-09 Thread Nir Soffer
On Mon, Aug 10, 2020 at 2:26 AM Nir Soffer  wrote:
>
> On Thu, Aug 6, 2020 at 5:35 PM Jorge Visentini  
> wrote:
> >
> > Hi oVirt land.
> >
> > Can I convert the disks of Thin Provision to Preallocated?
>
> We don't have a way to convert the format for the same disk.
>
> We should have this in future version, since it is important for
> incremental backup.
See https://bugzilla.redhat.com/98


>
> The most flexible way now is to download and upload the disk. During
> upload you can
> convert the disk format.
>
> Here is an example:
>
> Download qcow2 disks to raw-sparse format:
>
> $ ./download_disk.py \
> --engine-url https://engine3 \
> --username admin@internal \
> --password-file engine3-password \
> --cafile engine3.pem \
> --format raw \
> 58daea80-1229-4c6b-b33c-1a4e568c8ad7 \
> /var/tmp/download.raw
> Connecting...
> Creating image transfer...
> Transfer ID: fe4c3409-7e82-4d68-a68b-8b61b9d70647
> Transfer host name: host4
> Downloading image...
> Formatting '/var/tmp/download.raw', fmt=raw size=6442450944
> [ 100.00% ] 6.00 GiB, 9.45 seconds, 650.28 MiB/s
> Finalizing image transfer...
>
> $ qemu-img info /var/tmp/download.raw
> image: /var/tmp/download.raw
> file format: raw
> virtual size: 6 GiB (6442450944 bytes)
> disk size: 2.18 GiB
>
> We could download also to qcow2 format, this was just an example how
> you can convert the format during download.
>
> Now upload back to new disk in raw preallocated format.
>
> $ ./upload_disk.py \
> --engine-url https://engine3 \
> --username admin@internal \
> --password-file engine3-password \
> --cafile engine3.pem \
> --sd-name nfs1 \
> --disk-format raw \
> /var/tmp/download.raw
> Checking image...
> Image format: raw
> Disk format: raw
> Disk content type: data
> Disk provisioned size: 6442450944
> Disk initial size: 6442450944
> Disk name: download.raw
> Disk backup: False
> Connecting...
> Creating disk...
> Disk ID: beb2435e-9607-4a09-b6a6-b5e5f4ae9fd8
> Creating image transfer...
> Transfer ID: b9fd2ad9-be85-4db8-998b-c5f981f8103c
> Transfer host name: host4
> Uploading image...
> [ 100.00% ] 6.00 GiB, 5.30 seconds, 1.13 GiB/s
> Finalizing image transfer...
> Upload completed successfully
>
> You can replace now the old thin disk (58daea80-1229-4c6b-b33c-1a4e568c8ad7)
> with the new preallocated disk (beb2435e-9607-4a09-b6a6-b5e5f4ae9fd8).
>
> Nir
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/TUIMTUWKX3YOCGMKUCFFRSX57HCJCNJ2/


[ovirt-users] Re: Thin Provisioned to Preallocated

2020-08-09 Thread Nir Soffer
On Thu, Aug 6, 2020 at 5:35 PM Jorge Visentini  wrote:
>
> Hi oVirt land.
>
> Can I convert the disks of Thin Provision to Preallocated?

We don't have a way to convert the format for the same disk.

We should have this in future version, since it is important for
incremental backup.

The most flexible way now is to download and upload the disk. During
upload you can
convert the disk format.

Here is an example:

Download qcow2 disks to raw-sparse format:

$ ./download_disk.py \
--engine-url https://engine3 \
--username admin@internal \
--password-file engine3-password \
--cafile engine3.pem \
--format raw \
58daea80-1229-4c6b-b33c-1a4e568c8ad7 \
/var/tmp/download.raw
Connecting...
Creating image transfer...
Transfer ID: fe4c3409-7e82-4d68-a68b-8b61b9d70647
Transfer host name: host4
Downloading image...
Formatting '/var/tmp/download.raw', fmt=raw size=6442450944
[ 100.00% ] 6.00 GiB, 9.45 seconds, 650.28 MiB/s
Finalizing image transfer...

$ qemu-img info /var/tmp/download.raw
image: /var/tmp/download.raw
file format: raw
virtual size: 6 GiB (6442450944 bytes)
disk size: 2.18 GiB

We could download also to qcow2 format, this was just an example how
you can convert the format during download.

Now upload back to new disk in raw preallocated format.

$ ./upload_disk.py \
--engine-url https://engine3 \
--username admin@internal \
--password-file engine3-password \
--cafile engine3.pem \
--sd-name nfs1 \
--disk-format raw \
/var/tmp/download.raw
Checking image...
Image format: raw
Disk format: raw
Disk content type: data
Disk provisioned size: 6442450944
Disk initial size: 6442450944
Disk name: download.raw
Disk backup: False
Connecting...
Creating disk...
Disk ID: beb2435e-9607-4a09-b6a6-b5e5f4ae9fd8
Creating image transfer...
Transfer ID: b9fd2ad9-be85-4db8-998b-c5f981f8103c
Transfer host name: host4
Uploading image...
[ 100.00% ] 6.00 GiB, 5.30 seconds, 1.13 GiB/s
Finalizing image transfer...
Upload completed successfully

You can replace now the old thin disk (58daea80-1229-4c6b-b33c-1a4e568c8ad7)
with the new preallocated disk (beb2435e-9607-4a09-b6a6-b5e5f4ae9fd8).

Nir
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/TKO5DVRPURQ66QVUQZBHEX73MOC6VPH7/


[ovirt-users] Re: Thin Provisioned to Preallocated

2020-08-09 Thread Strahil Nikolov via Users
In regular KVM thin disks can be made fully preallocated when you 'expand' them 
to the predefined maximum size.
Usually  I create a large file and then I delete it.
Something like this: 'dd if=/dev/zero of=/path/to/mounted/qcow2/disk/largefile  
bs=4M status=progress ; rm -f /path/to/mounted/qcow2/disk/largefile

I doubt it's different in oVirt as backend is the same (KVM/qemu/raw or qcow2).

Best Regards,
Strahil Nikolov

На 9 август 2020 г. 10:15:26 GMT+03:00, Eyal Shenitzky  
написа:
>Hi Jorge,
>
>Currently, there is no mechanism for doing this operation on the disk,
>but
>there is workaround such as:
>
>- Export the VM as OVA or to an export domain and import it back with
>the
>needed allocation method.
>
>On Thu, 6 Aug 2020 at 17:36, Jorge Visentini 
>wrote:
>
>> Hi oVirt land.
>>
>> Can I convert the disks of Thin Provision to Preallocated?
>>
>> Best Regards.
>> --
>> Att,
>> Jorge Visentini
>> +55 55 98432-9868
>> ___
>> Users mailing list -- users@ovirt.org
>> To unsubscribe send an email to users-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/privacy-policy.html
>> oVirt Code of Conduct:
>> https://www.ovirt.org/community/about/community-guidelines/
>> List Archives:
>>
>https://lists.ovirt.org/archives/list/users@ovirt.org/message/M5DGZFUB5KVW6LWQKRC5NFDUMOUN7RKD/
>>
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/56AYNQOQ245BT3GRTE3NWIIT3XADLCHN/


[ovirt-users] Re: Thin Provisioned to Preallocated

2020-08-09 Thread Eyal Shenitzky
Hi Jorge,

Currently, there is no mechanism for doing this operation on the disk, but
there is workaround such as:

 - Export the VM as OVA or to an export domain and import it back with the
needed allocation method.

On Thu, 6 Aug 2020 at 17:36, Jorge Visentini 
wrote:

> Hi oVirt land.
>
> Can I convert the disks of Thin Provision to Preallocated?
>
> Best Regards.
> --
> Att,
> Jorge Visentini
> +55 55 98432-9868
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/M5DGZFUB5KVW6LWQKRC5NFDUMOUN7RKD/
>


-- 
Regards,
Eyal Shenitzky
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/M3REFS7XBDXIP5WFVFPQ74BMXIVPRFZR/


[ovirt-users] Re: Thin Provisioned to Preallocated

2020-08-06 Thread thomas
If OVA export and import work for you, you get to chose between the two at 
import.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/A66DP3GH3C32MFPDUHAZR3GZLXOL7UXG/