Bug 1221603 - Configurable initial allocation size for volume on block storage in order to allow v2v to complete
Summary: Configurable initial allocation size for volume on block storage in order to ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ovirt-3.6.0-rc3
: 3.6.0
Assignee: Fred Rolland
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks: 952703 1236075
TreeView+ depends on / blocked
 
Reported: 2015-05-14 12:31 UTC by Arik
Modified: 2016-03-10 12:05 UTC (History)
22 users (show)

Fixed In Version: vdsm-4.17.10
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1273284 (view as bug list)
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:
frolland: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 46417 0 master MERGED hsm: Add initialSize argument to createVolume Never
oVirt gerrit 47381 0 master MERGED hsm: Remove support for size in sectors as int Never
oVirt gerrit 47418 0 ovirt-3.6 MERGED hsm: Remove support for size in sectors as int Never
oVirt gerrit 47419 0 ovirt-3.6 MERGED hsm: Add initialSize argument to createVolume Never

Description Arik 2015-05-14 12:31:46 UTC
Description of problem:
Currently when allocating a sparse volume on block based storage, it always allocates 1g on the storage and set the virtual size to the requested volume size.
Now consider the following case: we convert a VM from external system with a 10g virtual size and 5g actual size and the user asks that the target disk will reside in block storage and be sparsed. So we have two options:
1. Keeping the initial allocating to be 1g and then to extend the volume as we write to it. Might be possible, much more complex.
2. To make the initial allocation size configurable so instead of allocating 1g, we will initially allocate the actual size of the disk so virt-v2v will be able to write the converted data to the volume.

#2 seems to be much simpler, just adding a parameter for the initial allocation size to the Volume.create verb.

Comment 1 Allon Mureinik 2015-05-17 14:39:38 UTC
Just to get the terminology right - you want to create a QCow with an initial size of 10GB, right?

Comment 2 Arik 2015-05-17 14:48:07 UTC
(In reply to Allon Mureinik from comment #1)
> Just to get the terminology right - you want to create a QCow with an
> initial size of 10GB, right?

No, in the example above I want to create a QCow with an intial size of 5GB and that the disk will be marked somehow as one that can grow up to 10GB when the VM starts (with the watermark mechanism).

Comment 3 Allon Mureinik 2015-05-17 15:10:25 UTC
Talked to Arik f2f to clarify this. The requirement is to be able to define to properties for a volume - the virtual size and the initial allocation.
(Note this will also be needed for the upload image feature)

So, I can see two options here:
1. Add a parameter to createVolume (so you have virutalSize and initialSize instead of just size). Offhand, this doesn't seem to fit the SDM design.
2. Call createVolume and then allocate

Comment 4 Nir Soffer 2015-08-20 21:44:09 UTC
Adding initial size to createVolumeContainer is nice, and is also useful for
cloning disk structure when moving disks. I don't see any conflict with sdm
design.

This can also simplify internal flows in vdsm - instead of creating a volume
and extending it immediately, just create it in the right size. Why perform 
2 lvm operations when one does what you need?

Comment 5 Arik 2015-09-13 08:08:43 UTC
This is a must-have capability for 3.6 for the integration with virt-v2v.

Comment 6 Allon Mureinik 2015-09-13 09:36:47 UTC
Yaniv, this requires changing the API, which I'm not sure we'd want to do at this point of time.

Let's discuss?

Comment 7 Arik 2015-09-13 09:56:16 UTC
(In reply to Allon Mureinik from comment #6)
> Yaniv, this requires changing the API, which I'm not sure we'd want to do at
> this point of time.

The implication of not solving this issue is that customers that use block storage will not be able to set converted disks of VMs that are being imported from VMware to thin-provision.

Allon, I think that if we go with the second solution (the one that Nir commented on in comment 4) we can add the initial capacity as default-parameter so the API will not break. But anyway, even doing it as we talked several months ago (by doing 2 operations in AddDiskCommand) will be ok. I think that since block storage and thin-provision is probably the most popular settings, not supporting this will prevent many from using this new feature.

Comment 8 Moran Goldboim 2015-09-17 09:05:09 UTC
(In reply to Arik from comment #7)
> (In reply to Allon Mureinik from comment #6)
> > Yaniv, this requires changing the API, which I'm not sure we'd want to do at
> > this point of time.
> 
> The implication of not solving this issue is that customers that use block
> storage will not be able to set converted disks of VMs that are being
> imported from VMware to thin-provision.
> 
> Allon, I think that if we go with the second solution (the one that Nir
> commented on in comment 4) we can add the initial capacity as
> default-parameter so the API will not break. But anyway, even doing it as we
> talked several months ago (by doing 2 operations in AddDiskCommand) will be
> ok. I think that since block storage and thin-provision is probably the most
> popular settings, not supporting this will prevent many from using this new
> feature.

sounds like this functionality is something we would definitely need for 3.6, Allon what would be the safest way you see to introduce the functionality?

Comment 9 Allon Mureinik 2015-09-17 10:49:36 UTC
(In reply to Moran Goldboim from comment #8)
> (In reply to Arik from comment #7)
> > (In reply to Allon Mureinik from comment #6)
> > > Yaniv, this requires changing the API, which I'm not sure we'd want to do at
> > > this point of time.
> > 
> > The implication of not solving this issue is that customers that use block
> > storage will not be able to set converted disks of VMs that are being
> > imported from VMware to thin-provision.
> > 
> > Allon, I think that if we go with the second solution (the one that Nir
> > commented on in comment 4) we can add the initial capacity as
> > default-parameter so the API will not break. But anyway, even doing it as we
> > talked several months ago (by doing 2 operations in AddDiskCommand) will be
> > ok. I think that since block storage and thin-provision is probably the most
> > popular settings, not supporting this will prevent many from using this new
> > feature.
> 
> sounds like this functionality is something we would definitely need for
> 3.6, Allon what would be the safest way you see to introduce the
> functionality?

The SAFEST? Not to introduce it.
:-)

Fred - let's see if we can introduce this (vdsm+engine) in a way that doesn't destabilize the rest of the system.

Comment 11 Nir Soffer 2015-10-19 16:57:49 UTC
This is vdsm bug - the vdsm side is merged in ovirt-3.6 branch - this should
be MODIFIED now.

The engine patch should be tracked elsewhere.

Comment 12 Fred Rolland 2015-10-20 07:17:46 UTC
created new bug for engine :
https://bugzilla.redhat.com/show_bug.cgi?id=1273284

Comment 13 Elad 2015-11-05 09:00:45 UTC
Hi Fred, 

It seems that the fix introduced for this bug might touch some major operations like disk creation and copy. Can you please provide us the flows that will have to be tested in order to make sure that we don't have regressions?

Comment 14 Fred Rolland 2015-11-08 07:36:58 UTC
Hi,

There should not be any changes in these flows, but you should make some sanity in these area.
I would test disk creation on block storage with thin provisioning.

Of course, also there is a need to test the V2V flow.

Comment 15 Nisim Simsolo 2015-11-08 15:33:32 UTC
Currently there is no running v2v environment here in order to verify this issue.
Will be tested as soon as we have one.

Comment 16 Aharon Canan 2015-11-08 15:51:51 UTC
Following comments #14 and #15,

Storage testing is down, Will be marked as verified once V2V will be tested.

Nisim, can you please take care of this one?

Comment 17 Aharon Canan 2015-11-08 15:52:35 UTC
I meant done :)

Comment 18 Nisim Simsolo 2015-11-08 16:15:11 UTC
Sure

Comment 20 Nisim Simsolo 2015-12-21 16:09:15 UTC
Verified: 
rhevm-3.6.1.3-0.1.el6
sanlock-3.2.4-1.el7.x86_64
libvirt-client-1.2.17-13.el7_2.2.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.4.x86_64
vdsm-4.17.13-1.el7ev.noarch

VMware Version 6.0.0 Build 2594327

Verification scenario: 
1. Create VMware VM with 16GB iSCSI disk (thin provision type).
2. Install RHEL7 OS on that VM.
3. Create 10G file (copy 10G from /dev/zero to a file).
3. Power off VMware VM and import it using RHEVM, select iSCSI storage domain as a destination disk).
4. After import completed, run both VMs and compare the next things between source VM and imported VM:
Total disk size, virtual size, actual size, number of partitions, partitions size, available space on each partition and 10G files created.
5. Repeat test steps 1-4, this time use NFS storage domain as a destination disk.

Comment 21 Allon Mureinik 2016-03-10 10:44:55 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 22 Allon Mureinik 2016-03-10 10:48:43 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 23 Allon Mureinik 2016-03-10 12:05:11 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE


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