OpenStack – Detaching volumes from an instance Since Cinder Volumes are persistent storage and the best way of thinking of them is as a USB drive, this means that 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 into the Ubuntu client that has access to Nova Client tools. These packages can be installed using the following commands:
Carry out the following steps to detach a volume using Nova Client:
|Related Article: OpenStack Interview Questions for Experienced|
sudo unmount /mnt1
|Related Article: Learn OpenStack|
Detaching cinder volume is no different from removing a USB stick from a computer. We first unmount the volume from our running instance. Then, we detach the volume from the running instance using nova volume-detach from Nova Client.
nova volume-detach has the following syntax:
nova volume-detach instance_id volume_id
instance_id is the ID from the Attached to column returned from nova volume-list for the instance we want to detach the volume from the volume id column from the nova volume-list command.
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
|OpenStack Training||Jan 22 to Feb 06|
|OpenStack Training||Jan 24 to Feb 08|
|OpenStack Training||Jan 29 to Feb 13|
|OpenStack Training||Jan 31 to Feb 15|
Ravindra Savaram is a Content Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.
Copyright © 2013 - 2022 MindMajix Technologies