Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1155275

Summary: [RFE] - Online update LUN size to the Guest after LUN resize
Product: Red Hat Enterprise Virtualization Manager Reporter: Amador Pahim <asegundo>
Component: ovirt-engineAssignee: shani <sleviim>
Status: CLOSED ERRATA QA Contact: Evelina Shames <eshames>
Severity: high Docs Contact:
Priority: high    
Version: 3.4.0CC: adevolder, ahadas, andrew, boruvka.michal, cnagarka, daniel-oliveira, derez, dfodor, emarcus, ffutigam, fsun, gchakkar, gianluca.cecchi, gveitmic, imomin, jiri.slezka, jortialc, lsurette, michal.skrivanek, mjankula, mkalinin, obockows, pelauter, pratshar, pvilayat, rhodain, rpai, sfishbai, sgoodman, sleviim, srevivo, tnisan, usurse, vvasilev
Target Milestone: ovirt-4.4.5Keywords: FutureFeature
Target Release: 4.4.5   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: vdsm-4.40.50.7 Doc Type: Enhancement
Doc Text:
With this update, you can synchronize a LUN's disk size on all hosts that are connected to the LUN's disk, and update its size on all running virtual machines to which it is attached. To refresh a LUN's disk size: 1. In the Administration portal, go to Compute>Virtual Machines and select a virtual machine. 2. In the Disks tab, click Refresh LUN. For connected virtual machines that are not running, update the disk on the virtual machines once they are running.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-14 11:39:53 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:
Bug Depends On:    
Bug Blocks: 1477496, 1539837, 1547336, 1944724    

Description Amador Pahim 2014-10-21 19:03:38 UTC
Description of problem:
After a LUN resize, Guest using it as a Direct LUN device is not able to see the new size. 

Version-Release number of selected component (if applicable):
rhevm-3.4.2-0.2.el6ev.noarch

How reproducible:
100%


Steps to Reproduce:
1. Attach a Direct LUN to a VM
2. On-line resize the LUN (on underlying storage)
3. Check the new size on the Guest: fdisk -l /dev/vdb

Actual results:

Guest OS is listing the old size.

Expected results:

Provide button called "Update Size" or so, for Direct LUNs under VM Disks sub-TAB, which will update the Direct LUN size for that VM.


Additional info:

To make the Guest OS recognize the new size, currently we need to run (on the Host running the VM):
 # multipathd -k"resize map 35005907f1cb9a3d9"
 # virsh -c qemu:///system blockresize  --path /dev/mapper/35005907f1cb9a3d9  --size 120G <guest_name>

Comment 1 Allon Mureinik 2015-01-27 23:20:58 UTC
Daniel, don't modern kernels (from the guest side) solve this?

Comment 2 Daniel Erez 2015-02-02 18:39:58 UTC
(In reply to Allon Mureinik from comment #1)
> Daniel, don't modern kernels (from the guest side) solve this?

afaik, it's mandatory, see bug 1176550

Comment 3 Daniel Erez 2015-02-08 15:01:05 UTC
*** Bug 1176550 has been marked as a duplicate of this bug. ***

Comment 7 Idan Shaby 2015-07-22 12:32:00 UTC
Right now, in order to get the new direct lun size in the guest, this is what we should do:

1. Run a GET request via the REST API to get the storage details about the host of the relevant VM. For example:
http://localhost:8080/api/hosts/<host_id>/storage

2. Get the LUN ID from the webadmin (Disks -> General -> LUN ID).

3. Get the VM ID from the webadmin (Virtual Machines -> General -> VM Id).

4. Run:
virsh -c qemu:///system blockresize --path /dev/mapper/<LUN_ID> --size <new_block_size>G <VM_ID>


And for the future:

- In the vdsm side, we already have a function called "diskSizeExtend" in vm.py that eventually calls the block resize in qemu.

- In the engine side, we already have ExtendVmDiskSizeVDSCommand that gets ExtendVmDiskSizeVDSCommandParameters and calls the disk resize in vdsm.

What we can do is creating a new parameters object for LUN disks that will hold the LUN ID, and use ExtendVmDiskSizeVDSCommand with minor changes in vdsm to call the block resize function in qemu, but this time on a direct LUN.

Comment 8 Allon Mureinik 2015-07-23 13:46:08 UTC
I'm pushing out this RFE based on the stage we're in, and resetting the acks so this is re-discussed in a future version planning.

Roman - can we get the steps described in comment 7 published in a KBase please?

Comment 19 Gianluca Cecchi 2017-03-02 14:51:01 UTC
Can we set a target release, hopefully 4.1.1 or 4.2?
Thanks,
Gianluca

Comment 20 Yaniv Kaul 2017-03-02 14:54:57 UTC
(In reply to Gianluca Cecchi from comment #19)
> Can we set a target release, hopefully 4.1.1 or 4.2?

Not without a patch for it ;-)

> Thanks,
> Gianluca

Comment 21 Gianluca Cecchi 2017-03-02 15:02:46 UTC
Ah, ok.
I thought one could set an attempt release for version even without a patch already in place.
Sorry

Comment 22 Yaniv Kaul 2017-03-02 15:05:46 UTC
(In reply to Gianluca Cecchi from comment #21)
> Ah, ok.
> I thought one could set an attempt release for version even without a patch
> already in place.
> Sorry

We could, but I rather do it when I know we'll have someone working on it. I don't want to give the false impression.

Comment 27 Yaniv Lavi 2018-06-04 08:41:53 UTC
This will be solved via Cinder integration.

Comment 39 shani 2020-12-22 12:18:07 UTC
Currently, this one can be done by using the refreshlun SDK command
http://ovirt.github.io/ovirt-engine-api-model/master/#services/disk/methods/refresh_lun.

It's also available from the UI:
Storage > Disks > {choose a direct LUN disk} > {3 dots menu} > Refresh LUN.

I'll work on adding that functionality to the VM resource (SDK and UI).

Comment 40 shani 2021-01-19 11:50:12 UTC
Comment 39 seems not to be updated/accurate.
By using refreshLUNs SDK, the LUN size is being updated on the UI & DB, but not on the running guest.

Work in progress.

Comment 44 Evelina Shames 2021-03-01 13:13:32 UTC
Verified on rhv-4.4.5-7

Comment 52 errata-xmlrpc 2021-04-14 11:39:53 UTC
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 (Moderate: RHV Manager (ovirt-engine) 4.4.z [ovirt-4.4.5] security, bug fix, enhancement), 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/RHSA-2021:1169