Bug 2086561 - Convert from Preallocated to Sparse doesn't change the actual disks' size
Summary: Convert from Preallocated to Sparse doesn't change the actual disks' size
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.5.0.8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.5.2
: ---
Assignee: Benny Zlotnik
QA Contact: Ilia Markelov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-16 12:37 UTC by sshmulev
Modified: 2022-08-30 08:47 UTC (History)
5 users (show)

Fixed In Version: ovirt-engine-4.5.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-30 08:47:42 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.5?
lsvaty: blocker-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 493 0 None open core: update actual size after conversion 2022-06-26 10:18:12 UTC
Red Hat Issue Tracker RHV-46065 0 None None None 2022-05-16 12:46:42 UTC

Description sshmulev 2022-05-16 12:37:11 UTC
Description of problem:
The target disk's actual size after the disk allocation policy convert is the same as before the convert action.
 

Version-Release number of selected component (if applicable):
Engine-4.5.0.7-0.9.el8ev
vdsm-4.50.0.13-1.el8ev

How reproducible:
100%

Steps to Reproduce:
1. Create an empty 5G disk cow+preallocated
2. Convert the disk to cow+Thin(sparse)
3. Check the actual_size of the disk

Actual results:
The actual size of the disk is 5G, identical to its' provisioned size before the convert.

Expected results:
The actual size of the disk after the convert should be smaller than 5G (according to the defaults it should be 2.5G)

Additional info:
The convert succeeds and it actually changes the allocation policy when checking in the DB of the disk, but the actual size which is the main functionality of the convert allocation policy does meet the expectations

Comment 2 sshmulev 2022-05-16 12:57:20 UTC
Fixing Engine version I tested this on:
Engine-4.5.0.6-0.7.el8ev

Comment 3 Ilia Markelov 2022-07-12 14:03:14 UTC
While verifying I've found that the actual size after the convert is now 134217728, which is much less than the 2.5G default size for the thin disk. Is it fine, or something is wrong?

For example I converted ISCSI-Cow-Preallocated-Enabled to ISCSI-Cow-Thin-Enabled and got this:

<backup>incremental</backup>
<content_type>data</content_type>
<format>cow</format>
...
<propagate_errors>false</propagate_errors>
<provisioned_size>5368709120</provisioned_size>
<shareable>false</shareable>
<sparse>true</sparse>
<status>ok</status>
<storage_type>image</storage_type>
<total_size>134217728</total_size>

Comment 4 Benny Zlotnik 2022-07-13 08:38:31 UTC
As discussed, the actual allocated size is 134217728, so that is the required size for the conversion to qcow, as measure by:
 $ qemu-img measure -f qcow2 -O qcow2 img

Comment 5 Ilia Markelov 2022-07-13 08:49:21 UTC
Verified.

The actual size of the disk after conversion is 134217728, which is smaller than 5G.

Versions:
engine-4.5.1.3-654.af4ac851f145.35.el8ev
vdsm-4.50.2-1.el8ev.x86_64

Comment 6 Sandro Bonazzola 2022-08-30 08:47:42 UTC
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.2 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.