You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Udara Liyanage <ud...@gmail.com> on 2014/04/23 14:39:08 UTC

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
phone: +94 71 443 6897

Re: Openstack attaching the volume to a random device name

Posted by Jeremy Daggett <je...@RACKSPACE.COM>.
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 <ud...@gmail.com>>
Reply-To: "user@jclouds.apache.org<ma...@jclouds.apache.org>" <us...@jclouds.apache.org>>
Date: Wednesday, April 23, 2014 at 5:39 AM
To: "user@jclouds.apache.org<ma...@jclouds.apache.org>" <us...@jclouds.apache.org>>
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