Bug 1443147 - Cold Merge: Improve reduce when merging internal volumes
Summary: Cold Merge: Improve reduce when merging internal volumes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.17.28
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.3
: 4.19.16
Assignee: Ala Hino
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On: 1420405
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-18 15:11 UTC by Ala Hino
Modified: 2017-07-06 13:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:31:34 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 75851 0 master MERGED optimal-size: Add padding and limit optimal to minimum 2020-11-11 13:30:06 UTC
oVirt gerrit 76228 0 master MERGED tests: Add an option to specify volume type 2020-11-11 13:30:10 UTC
oVirt gerrit 76259 0 master MERGED tests: Replace hard-coded size values 2020-11-11 13:30:07 UTC
oVirt gerrit 76745 0 ovirt-4.1 MERGED tests: Add an option to specify volume type 2020-11-11 13:30:10 UTC
oVirt gerrit 76746 0 ovirt-4.1 MERGED optimal-size: Add padding and limit optimal to minimum 2020-11-11 13:30:06 UTC
oVirt gerrit 76747 0 ovirt-4.1 MERGED tests: Replace hard-coded size values 2020-11-11 13:30:06 UTC

Description Ala Hino 2017-04-18 15:11:06 UTC
Description of problem:
Currently, when reducing the volume during 'finalizeMerge' step, the volume is reduced to actual size + a chunk.

For internal volumes, don't add a chunk.

Steps to Reproduce:
1. Perform cold merge for internal volume (the new flow introduced in 4.1)

Actual results:
Volume is reduce to actual size + a chunk.

Expected results:
Volume to be reduced to actual size

Comment 1 Allon Mureinik 2017-04-18 16:19:04 UTC
Tentatively targeting for 4.1.3, let's see how risky/risk-free this is.

Comment 2 Nir Soffer 2017-04-18 17:08:56 UTC
Testing this change:

1. Perform a cold merge of internal volume

2. Activate the merged volume
   lvchange -ay vgname/lvname
   Activate also the next volumes in this chain, if this is not the base volume

3. Run qemu-img check on this volume:
   qemu-img check --output json /dev/vgname/lvname

Example:

# qemu-img check test.qcow2 --output json
{
    "image-end-offset": 262144,
    "total-clusters": 163840,
    "check-errors": 0,
    "filename": "test.qcow2",
    "format": "qcow2"
}

The actual size of the image is the image-end-offset value.

4. Check the size of the lv
   lvs -o size --units m vgname/lvname

The actual size of the lv should be this value rounded up to the next
extent (128m).

In this example, the lv size should be 128.00m.

Comment 3 Kevin Alon Goldblatt 2017-06-05 08:24:23 UTC
Verified with the following code:
--------------------------------------
ovirt-engine-4.1.3-0.1.el7.noarch
rhevm-4.1.3-0.1.el7.noarch
vdsm-4.19.16-1.el7ev.x86_64

Verified with the following scenario:
--------------------------------------
1. Created a VM with 1 thin ISCSI disk of 10G
2. lvs -o size --units m 5f6e0626-3a8c-41ed-b843-7a9290a4db5a/775ebda8-93bf-402c-8bfe-83f556a6e0ae
  LSize   
  1024.00m (Initial size of minimum thin ISCSI lv)
3. Created Snapshot
4. Write 2G of data to the active disk
5. [root@purple-vds1 ~]#  lvs -o size --units m 5f6e0626-3a8c-41ed-b843-7a9290a4db5a/6a5e2b37-09c7-4ea1-9ab1-6a41bb531bb7
  LSize   
  3072.00m (Initial size of minimum ISCSI lv + about 2G of data)
6. Delete the snapshot - Live Merge is successfull
7. Stop the VM
7. Start the VM again
8. lvs -o size --units m 5f6e0626-3a8c-41ed-b843-7a9290a4db5a/775ebda8-93bf-402c-8bfe-83f556a6e0ae
  LSize   
  3200.00m (Original Size of OS on base + about 2G of data + 128M chunk)

Moving to VERIFIED!

Comment 4 Kevin Alon Goldblatt 2017-06-29 12:11:19 UTC
Verified with the following code:
--------------------------------------
ovirt-engine-4.1.3-0.1.el7.noarch
rhevm-4.1.3-0.1.el7.noarch
vdsm-4.19.16-1.el7ev.x86_64

Verified with the following scenario:
--------------------------------------
1. Created a VM with 1 thin ISCSI disk of 10G
2. lvs -o size --units m 5f6e0626-3a8c-41ed-b843-7a9290a4db5a/775ebda8-93bf-402c-8bfe-83f556a6e0ae
  LSize   
  1024.00m (Initial size of minimum thin ISCSI lv)
3. Created Snapshot
4. Write 2G of data to the active disk
5. [root@purple-vds1 ~]#  lvs -o size --units m 5f6e0626-3a8c-41ed-b843-7a9290a4db5a/6a5e2b37-09c7-4ea1-9ab1-6a41bb531bb7
  LSize   
  3072.00m (Initial size of minimum ISCSI lv + about 2G of data)
6. Power off the VM
7. Delete the snapshot - Live Merge is successfull
8. Start the VM again
9. lvs -o size --units m 5f6e0626-3a8c-41ed-b843-7a9290a4db5a/775ebda8-93bf-402c-8bfe-83f556a6e0ae
  LSize   
  3200.00m (Original Size of OS on base + about 2G of data + 128M chunk)


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