Bug 1443963

Summary: [RFE] Expose API to reduce a volume
Product: [oVirt] ovirt-engine Reporter: Allon Mureinik <amureini>
Component: BLL.StorageAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Shir Fishbain <sfishbai>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.1.8CC: bugs, derez, ebenahar, tnisan, ylavi
Target Milestone: ovirt-4.2.5Keywords: FutureFeature
Target Release: 4.2.5.1Flags: rule-engine: ovirt-4.2?
ebenahar: testing_plan_complete+
rule-engine: planning_ack?
rule-engine: devel_ack+
rule-engine: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.5.1 Doc Type: Enhancement
Doc Text:
Feature: Added 'reduce' action on disk in the API: POST /ovirt-engine/api/disks/cc9ce0d3-f651-4d86-94e6-0e4e5cfde3ce/reduce Reduces the size of the specified disk image. The action invokes 'lvreduce' on the logical volume (i.e. this is only applicable for block storage domains). This is applicable for floating disks and disks attached to non-running virtual machines. There is no need to specify the size as the optimal size is calculated automatically.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-31 15:30:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Allon Mureinik 2017-04-20 10:57:41 UTC
Description of problem:
Prior to oVirt 4.1.2, reducing the target volume of a merge operation was either not done (for older 4.1 DCs), or done inefficiently (for 4.0 and below DCs, see, e.g., bug 1443147).

It may be useful to expose an API to reduce pre-existing volumes that are over-extended.

Version-Release number of selected component (if applicable):
4.1.z

Comment 2 Allon Mureinik 2018-04-03 13:02:27 UTC
This is an enabler for the virt-v2v support for qcow2 in RHV. 
Moving back to 4.3, and if we need to push things out based on capacity, we need to pick others.

Comment 5 Shir Fishbain 2018-07-10 08:13:13 UTC
Is the reduce volume available through the UI?

Comment 6 Daniel Erez 2018-07-16 06:45:54 UTC
(In reply to Shir Fishbain from comment #5)
> Is the reduce volume available through the UI?

No, it can't be invoked manually from the UI. It's invoked either in live merge flow, or using the rest-api.

Comment 7 Shir Fishbain 2018-07-24 14:56:19 UTC
Tested basic feature functionality:
- Called reduce volume for floating and attached to VM disks 
- Verified that reduceVolume was called on vdsm.

Comment 8 Sandro Bonazzola 2018-07-31 15:30:01 UTC
This bugzilla is included in oVirt 4.2.5 release, published on July 30th 2018.

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