Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1585030 - [downstream clone - 4.2.4] RAW-Preallocated disk is converted to RAW-sparse while cloning a VM in file based storage domain
[downstream clone - 4.2.4] RAW-Preallocated disk is converted to RAW-sparse w...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm (Show other bugs)
4.0.6
All Linux
medium Severity medium
: ovirt-4.2.4
: ---
Assigned To: Nir Soffer
Shir Fishbain
: ZStream
Depends On: 1429286
Blocks:
  Show dependency treegraph
 
Reported: 2018-06-01 03:53 EDT by RHV Bugzilla Automation and Verification Bot
Modified: 2018-06-27 06:03 EDT (History)
18 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1429286
Environment:
Last Closed: 2018-06-27 06:02:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3294111 None None None 2018-06-01 03:53 EDT
oVirt gerrit 86280 master MERGED sd: Move supportsSparseness to StorageDomainManifest 2018-06-01 03:53 EDT
oVirt gerrit 90000 master MERGED image: Keep volume preallocation during copyImage() 2018-06-01 03:53 EDT
oVirt gerrit 91982 ovirt-4.2 MERGED image: Keep volume preallocation during copyImage() 2018-06-13 02:28 EDT
oVirt gerrit 92184 ovirt-4.2.4 MERGED image: Keep volume preallocation during copyImage() 2018-06-13 03:51 EDT
Red Hat Product Errata RHEA-2018:2072 None None None 2018-06-27 06:03 EDT

  None (edit)
Description RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:02 EDT
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1429286 +++
======================================================================

Description of problem:

When we clone a VM with RAW-Preallocated disk, the newly created VM is having having RAW-Sparse instead of RAW-Preallocated .

We are doing qemu-img convert for copying the disk while cloning the VM.  The "qemu-img convert" can  automatically sparsifies any disk sector which contains all zeroes. So the new image will be equal to space actually used within the VM. So the behavior seems to be expected. But the user expect the disk space to be fully allocated on the storage when it show Preallocated disk type.
 

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.6.3-0.1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:

1. Create a VM with preallocated disk on file based storage domain.

2. Clone this VM.
 
3. Check the disk size of newly created image using qemu-img info .

Actual results:

Preallocated disk is converted to RAW-sparse while cloning a VM in file based storage domain

Expected results:

Cloned VM should have the same disk allocation as original VM.

Additional info:

(Originally by Nijin Ashok)
Comment 3 RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:09 EDT
We'll probably fix by fallocate() and not the regular 'dd' ?

(Originally by Yaniv Kaul)
Comment 4 RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:14 EDT
(In reply to Yaniv Kaul from comment #2)
> We'll probably fix by fallocate() and not the regular 'dd' ?

Agreed, do we have a RFE to block this bug on?

(Originally by ylavi)
Comment 5 RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:19 EDT
(In reply to Yaniv Dary from comment #3)
> (In reply to Yaniv Kaul from comment #2)
> > We'll probably fix by fallocate() and not the regular 'dd' ?
> 
> Agreed, do we have a RFE to block this bug on?

https://bugzilla.redhat.com/1391859

(Originally by Yaniv Kaul)
Comment 6 RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:23 EDT
This is partly a duplicate of 1532133.

We have several flows when cloning images:

- Collapsing the original chain to single volume - uses Volume.copy. It needs a
  similar fix to the one applied for bug 1532133.

- Copying all volumes to target image, cluster version 4.1 - uses SDM.copy_data
  these patches handle the vdsm side:
  https://gerrit.ovirt.org/#/q/topic:copy-data-prealloc
  More work is needed for engine side.

- Copying all volumes to target image, cluster version < 4.1 - uses Image.move,
  it is already fixed by the fix to bug 1532133.

(Originally by Nir Soffer)
Comment 7 RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:27 EDT
*** Bug 1403183 has been marked as a duplicate of this bug. ***

(Originally by Eyal Shenitzky)
Comment 8 RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:32 EDT
(In reply to Nir Soffer from comment #5)
> This is partly a duplicate of 1532133.
> 
> We have several flows when cloning images:
> 
> - Collapsing the original chain to single volume - uses Volume.copy. It
> needs a
>   similar fix to the one applied for bug 1532133.
> 
> - Copying all volumes to target image, cluster version 4.1 - uses
> SDM.copy_data
>   these patches handle the vdsm side:
>   https://gerrit.ovirt.org/#/q/topic:copy-data-prealloc
>   More work is needed for engine side.
> 
> - Copying all volumes to target image, cluster version < 4.1 - uses
> Image.move,
>   it is already fixed by the fix to bug 1532133.

This bug fix refers to the following flows:

- Clone VM
- Copy (floating/VM/template) disk
- Clone VM from a snapshot
- Import VM from an export domain
- Create VM template
- Create VM template from a snapshot

I've open new bug 1571285 to track the solution for cold storage migration that uses SDM.copy_data on vdsm - https://gerrit.ovirt.org/#/q/topic:copy-data-prealloc

(Originally by Eyal Shenitzky)
Comment 9 RHV Bugzilla Automation and Verification Bot 2018-06-01 03:53:37 EDT
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.2.z': '?'}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.2.z': '?'}', ]

For more info please contact: rhv-devops@redhat.com

(Originally by rhv-bugzilla-bot)
Comment 11 Shir Fishbain 2018-06-11 12:21:59 EDT
When creating new image, the new image is exactly the same as the original VM.
Comment 12 Shir Fishbain 2018-06-11 12:33:07 EDT
4.2.4.2-0.1 version
Comment 14 errata-xmlrpc 2018-06-27 06:02:46 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:2072

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