How can i get the "location" of the volume created

Asked by Senhua Huang

I have a deployment of 4 compute hosts, which run both compute and volume service. I am trying to determine the identity of the host(s) on which a volume is created. Basically, after I create a volume, I want to know where among the 4 hosts the volume is located. Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Cinder Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mike Perez (thingee) said :
#1

Doing a call to cinder rest api of either of the following:

1) Show details of a volume http://docs.openstack.org/api/openstack-block-storage/2.0/content/Show_Volume.html
2) List details of all volumes http://docs.openstack.org/api/openstack-block-storage/2.0/content/List_Volumes_Details.html

Revision history for this message
Shanthakumar K (shantha-kumar) said :
#2

If you are provisioning the LVm volume, below mentioned is best way for you

You can find information in "cinder-scheduler log"

1. Filtered host will give you information

---> [host 'grzrc3@driver-2': free_capacity_gb: 54]

PS: I your case, u need to get all the host in above filter.

2. Choosing Weighedhost will choose the best host for provision volume

---> Choosing WeighedHost [host: grzrc3@driver-2, weight: 54.0]

2013-05-14 09:56:17 DEBUG [cinder.scheduler.filter_scheduler] Filtered [host 'grzrc3@driver-2': free_capacity_gb: 54]
2013-05-14 09:56:17 DEBUG [cinder.scheduler.filter_scheduler] Choosing WeighedHost [host: grzrc3@driver-2, weight: 54.0]

Hope this would resolve you query.

Can you help with this problem?

Provide an answer of your own, or ask Senhua Huang for more information if necessary.

To post a message you must log in.