Since Cinder Volumes are persistent storage and the best way of thinking of them is as a USB drive, this means you can only attach them to a single computer at a time. When you remove a USB drive from the computer, you can then move it to another one and attach it. The same principle works with Nova Volumes. To detach a volume, we use another Nova Client option volume-detach
.
To begin with, ensure you are logged in to the Ubuntu client that has access to Nova Client tools. These packages can be installed using the following commands:
sudo apt-get update sudo apt-get install python-novaclient
Carry out the following steps to detach a volume using Nova Client:
First, we identify the volumes attached to running instances, by running the command
nova volume-list
, as follows:nova volume-list
This brings back the following output:
On the instance that has the volume mounted, we must first
unmount
it as follows (if using the example before...