Hi Nir,

Thanks a lot for the response!

It could be that I misunderstand what you say, but I am not sure about if 
making one "Refresh all LUN sizes" button is better idea than one button per 
LUN. 
From what I learned from support, there are users with lots of LUNs per VM and 
huge amount of direct LUNs total. If someone resizes several LUNs at once, they 
are probably doing so from a script anyway and can make use of curl.

Thanks,
Fedor Gavrilov

----- Original Message -----
From: "Nir Soffer" <nsof...@redhat.com>
To: "Fedor Gavrilov" <fgavr...@redhat.com>
Cc: "devel" <devel@ovirt.org>, "Fred Rolland" <froll...@redhat.com>
Sent: Monday, June 10, 2019 7:33:45 PM
Subject: Re: [ovirt-devel] GetDeviceList and direct LUNs

On Mon, Jun 10, 2019 at 6:20 PM Fedor Gavrilov <fgavr...@redhat.com> wrote:

> Hi,
>
> I want to implement a feature that would allow one to manually refresh
> sizes for direct LUNs and I am not sure if existing code in the engine
> codebase is gonna help with that.
>
> RefreshLunsSizeCommand seems to be doing what is needed, but it operates
> on a premise that LUNs to refresh belong to a storage domain which makes
> most of its code irrelevant for purposes of direct LUNs.
> It seems that workhorse is GetDeviceList command, but from the code I
> can't quite understand if it's supposed to be used with external iSCSI
> targets. Especially 'VDS' part here confuses me since I am not sure what
> VDS we're talking about in the first place when using direct LUN.
>
> If GetDeviceList is of no use, is there anything else VDSM provides?
>

On vdsm side, you want to use Host.getDeviceList:
https://github.com/oVirt/vdsm/blob/2bce8e8bff09b9c2fe4854ad91c40fdf6b7a01e1/lib/vdsm/api/vdsm-api.yml#L8366

Specify the storage type and the WWN of the LUN, also knows as GUID in
vdsm/engine.

checkStatus must be False, it is needed only when adding a device to a VG.

The resize is performed in sdCache.refreshStorage(), effecting all storage
types and all devices, so you
want to call Host.getDeviceList() once with the list of GUIDs to refresh,
instead of once per GUID.

Adding Fred who worked on this feature.

Nir


>
> Thanks,
> Fedor Gavrilov
> _______________________________________________
> Devel mailing list -- devel@ovirt.org
> To unsubscribe send an email to devel-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/NOJ2UT6FP5VRTVFFZNMMB2JYNE25TIMQ/
>
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/YDQDJBH6WPN4KRMRSELKXCUQZQ5PRUOQ/

Reply via email to