Bug 1155275 - [RFE] - Online update LUN size to the Guest after LUN resize
Summary: [RFE] - Online update LUN size to the Guest after LUN resize
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.0
Hardware: All
OS: Linux
high
high
Target Milestone: ovirt-4.4.5
: 4.4.5
Assignee: shani
QA Contact: Evelina Shames
URL:
Whiteboard:
: 1176550 (view as bug list)
Depends On:
Blocks: 1539837 1547336 1944724 1477496
TreeView+ depends on / blocked
 
Reported: 2014-10-21 19:03 UTC by Amador Pahim
Modified: 2021-04-14 11:41 UTC (History)
34 users (show)

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.
Clone Of:
Environment:
Last Closed: 2021-04-14 11:39:53 UTC
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1177229 0 medium CLOSED Vm's disk names ('/dev/vdX') changed after direct lun resize - need to document that virtio-scsi disk can change numberi... 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1539837 0 high NEW [RFE][tracker][Cinder] - Improve integration and support with storage using cinderlib 2021-03-30 13:32:25 UTC
Red Hat Knowledge Base (Solution) 1230283 0 None None None Never
Red Hat Product Errata RHSA-2021:1169 0 None None None 2021-04-14 11:41:00 UTC
oVirt gerrit 112783 0 master MERGED webadmin: 'Refresh LUN' from VM Disks sub-tab 2021-02-23 12:48:02 UTC
oVirt gerrit 113039 0 master MERGED virt: expend diskSizeExtend for updating LUN disks 2021-02-15 06:20:42 UTC
oVirt gerrit 113440 0 master MERGED vm.py: require newDiskSize also for LUN update 2021-02-17 17:30:26 UTC

Internal Links: 1177229 1539837

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


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