Discussion:
[Libstoragemgmt-devel] [Question] Is there any other way to get the instance of storage volume in the array? the enumeration is too inefficiency
Qixiaozhen
2014-03-25 03:20:23 UTC
Permalink
Hi,all

Is there any other way to get the instance of storage volume much more efficiently in the array?

If lots of volumes in the SAN, the enumeration is too inefficiency.


The code( a smi-s plugin) in LSM that the clients get the instance of Volume lists here:

def _get_class(self, class_name, gen_id, ident):
instances = self._c.EnumerateInstances(class_name)
for i in instances:
if gen_id(i) == ident:
return i

raise LsmError(ErrorNumber.INVALID_ARGUMENT,
"Unable to find class instance " + class_name +
" with signature " + ident)

def _get_volume(self, volume_id):
"""
Get a specific instance of a volume by volume id.
"""
return self._get_class("CIM_StorageVolume", self._vol_id, volume_id)


Thanks,

Qi

-----------------------------------------------------------
Xiaozhen Qi
Huawei Technologies Co.,LTD.
IT Product Line CloudOS PDU
China, Xi'an
Mobile: +86-13609283376
Email: ***@huawei.com
Gris Ge
2014-03-25 04:01:44 UTC
Permalink
Post by Qixiaozhen
Hi,all
Is there any other way to get the instance of storage volume much more
efficiently in the array?
Greeting Xiaozhen Qi,

Thanks for bringing up this interesting question.

The code you are looking at is pretty old.
We have purged the _get_class() and _get_volume() for a while.

We have switched to new method of listing all volumes:
CIM_ComputerSystem
|
| CIM_HostedStoragePool
v
CIM_StoragePool
|
| CIM_AllocatedFromStoragePool
v
CIM_StorageVolume

For getting certain volume instance, please refer to this link[1] on our
discussion.
Generally:
1. Using CQL or WQL to find specified volume instance is hard to
maintain. Not all SMI-S provider support them.
2. We noticed EMC SMI-S provider is even slower on CQL than querying
all volume instances with PropertyList limit. Even EMC confirmed that
was a bug and fixed(I never got a chance to verify it).

So we decide to use this approach for querying certain volume instance:
_get_cim_instance_by_id() [2]
1. Enumerate all volume instance using PropertyList to improve
performance.
2. Filter out the requested volume instance.

I was told Huawei arrays will not benefit from PropertyList due to
internal implementation limits. Not sure if that bother you.

I would happy to work with you to find a better/quicker SNIA compliant way.

Any feedback will be appreciated.

Thanks.
Best regards.

[1] http://goo.gl/EbxbQO and http://goo.gl/upGoSW
[2] The _get_cim_instance_by_id() will be replaced soon in order support
interop. But the procedure of query certain volume instance will not
change. EnumerateInstances is not suggested for interop, we are
replacing any EnumerateInstances calls except for
CIM_RegisteredProfile.
--
Gris Ge
Qixiaozhen
2014-03-25 05:33:18 UTC
Permalink
Appreciate for your reply and kindly explanation, Gris.

The solution in your suggestion is the same with my thought. CIM_ComputerSystem --> CIM_StoragePool --> CIM_StorageVolume

I have get the latest code in sourceforge. URL: http://sourceforge.net/p/libstoragemgmt/code/ci/master/tree/lsm/lsm/

Thank you so much.
-----Original Message-----
Sent: Tuesday, March 25, 2014 12:02 PM
To: Qixiaozhen
(brian); Liuzhenghui; Zhangbo (L); Gaoxiaodong (Leo); weizhian; Liuwanzhi
Subject: Re: [Libstoragemgmt-devel] [Question] Is there any other way to get
the instance of storage volume in the array? the enumeration is too inefficiency
Post by Qixiaozhen
Hi,all
Is there any other way to get the instance of storage volume much more
efficiently in the array?
Greeting Xiaozhen Qi,
Thanks for bringing up this interesting question.
The code you are looking at is pretty old.
We have purged the _get_class() and _get_volume() for a while.
CIM_ComputerSystem
|
| CIM_HostedStoragePool
v
CIM_StoragePool
|
| CIM_AllocatedFromStoragePool
v
CIM_StorageVolume
For getting certain volume instance, please refer to this link[1] on our
discussion.
1. Using CQL or WQL to find specified volume instance is hard to
maintain. Not all SMI-S provider support them.
2. We noticed EMC SMI-S provider is even slower on CQL than querying
all volume instances with PropertyList limit. Even EMC confirmed that
was a bug and fixed(I never got a chance to verify it).
_get_cim_instance_by_id() [2]
1. Enumerate all volume instance using PropertyList to improve
performance.
2. Filter out the requested volume instance.
I was told Huawei arrays will not benefit from PropertyList due to internal
implementation limits. Not sure if that bother you.
I would happy to work with you to find a better/quicker SNIA compliant way.
Any feedback will be appreciated.
Thanks.
Best regards.
[1] http://goo.gl/EbxbQO and http://goo.gl/upGoSW [2] The
_get_cim_instance_by_id() will be replaced soon in order support
interop. But the procedure of query certain volume instance will not
change. EnumerateInstances is not suggested for interop, we are
replacing any EnumerateInstances calls except for
CIM_RegisteredProfile.
--
Gris Ge
Loading...