Bug 1721599 - Cannot create volume with initial size on preallocated qcow volume
Summary: Cannot create volume with initial size on preallocated qcow volume
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: 4.40.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.4.0
: ---
Assignee: Daniel Erez
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-18 16:30 UTC by Daniel Erez
Modified: 2020-05-20 20:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 20:00:47 UTC
oVirt Team: Storage
Embargoed:
sbonazzo: ovirt-4.4?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 100942 0 'None' 'MERGED' 'blockVolume: Support initial size for cow-preallocated volume' 2019-12-09 13:31:47 UTC

Description Daniel Erez 2019-06-18 16:30:10 UTC
Description of problem:
'blockVolume -> calculate_volume_alloc_size' contains a validation to prevent specifying initial_size for preallocated volumes. It should be removed as creating qcow volumes on preallocated is needed for restoring from incremental backup.

Comment 1 Nir Soffer 2019-06-24 23:05:51 UTC
Daniel, can you describe the use case for this?

I think the only use case is restoring the base volume created using
preallocated qcow2 format, when the size of the volume is bigger than
the virtual size (due to qcow2 metadata).

For snapshots we always use sparse format and never pre-allocated, right?

Comment 2 Daniel Erez 2019-07-02 06:52:35 UTC
(In reply to Nir Soffer from comment #1)
> Daniel, can you describe the use case for this?
> 
> I think the only use case is restoring the base volume created using
> preallocated qcow2 format, when the size of the volume is bigger than
> the virtual size (due to qcow2 metadata).
> 
> For snapshots we always use sparse format and never pre-allocated, right?

Right, on snapshot creation, engine always creates a sparse format volume.

Comment 3 Avihai 2019-12-04 14:54:37 UTC
Hi Daniel,

Is there an easy user scenario to verify this bug?

Comment 4 Evelina Shames 2019-12-23 09:50:33 UTC
Hi Daniel,
Please provide a clear scenario for verification, thanks.

Comment 5 Daniel Erez 2020-01-05 16:54:46 UTC
(In reply to Evelina Shames from comment #4)
> Hi Daniel,
> Please provide a clear scenario for verification, thanks.

You can verify by creating a preallocated cow disk on a block domain with a specified initial size (and incremental backup enabled).
E.g.:

POST /ovirt-engine/api/disks
<disk>
    <sparse>false</sparse>
    <format>cow</format>
    <backup>incremental</backup>
    <initial_size>1024</initial_size>
    <provisioned_size>1024</provisioned_size>
    <storage_domains>
      <storage_domain>
      	<name>block</name>
      </storage_domain>
    </storage_domains>
</disk>

Comment 6 Evelina Shames 2020-01-06 08:46:10 UTC
Verified on engine-4.4.0-0.13.master.el7

Comment 7 Sandro Bonazzola 2020-05-20 20:00:47 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 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.