This procedure details the steps involved in attaching a Cinder volume to an existing compute instance using the cinder and nova command line interfaces.
Now that we have a usable volume, we can attach this to any instance. We do this by using the nova volume-attach command in Nova Client.
To begin with, assure that you are logged into the Ubuntu client that has access to the Nova Client tools. These packages can be installed using the following command:
Carry out the following steps to attach a volume to an instance using Nova Client:
The following output is generated:
/dev/vdc is specified here so as not to conflict with /dev/vdb, as the former refers to the same instance described previously.
Attaching a cinder-volume is no different from plugging in a USB stick on your own computer—we attach it, (optionally) format it, and mount it.
Under Nova Client, the option volume-attach takes the following syntax:
nova volume-attach instance_id volume_id device
instance_ id is the ID returned from the nova list for the instance that we want to attach the volume to. The volume_id is the name of the device within the instance that we will use to mount the volume that can be retrieved using nova volume-list. This device is the device that will be created on our instance that we use to mount the volume.
Openstack Sample Resumes
Get Updates on Tech posts, Interview & Certification questions and training schedules