Hi Udara!

What version of OpenStack are you running against? The volume API that you use 
will depend, so I suggest that you refer to the comments in the 
VolumeAttachmentApi [1]. Also, the OpenStack Cinder API [2] should also be a 
good reference here.

Please let us know if you have any additional questions, thanks!

/jd

[1] 
https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java#L29
[2] 
https://github.com/jclouds/jclouds/blob/master/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApi.java

From: Udara Liyanage <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Wednesday, April 23, 2014 at 5:39 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Openstack attaching the volume to a random device name

Hi,

I use below codes to attach and volume to a instance in Openstack.

The device I input = /dev/sdc
The device I see when I debug = /dev/sdc
The device actually in the instance = vdb

What is the reason for this mismatch?

RestContext<NovaApi, NovaAsyncApi> nova = context.unwrap();
 VolumeAttachmentApi api = 
nova.getApi().getVolumeAttachmentExtensionForZone(region).get();
VolumeAttachment attachment = api.attachVolumeToServerAsDevice(volumeId, 
instanceId, device);


--
Udara S.S Liyanage.
Software Engineer at WSO2.
Commiter and PPMC Member of Apache Stratos.
Blog - http://udaraliyanage.wordpress.com<http://udaraliyanage.wordpress.com/>
phone: +94 71 443 6897

Reply via email to