A volume can be seen as a hard drive that you can attach to a server or virtual machine. You can store data on it, host websites, and make use of many other possibilities, depending on your preferences.
Below, we explain how to delete a volume via the OpenStack Dashboard ‘Horizon’.
A volume cannot be deleted when:
- It is set as the boot source
- A snapshot of the volume exists
- The volume is being transferred to another project by means of a ‘volume transfer’
- The volume is part of a volume group
- The volume is attached to an instance
Detaching a volume and then deleting it via the OpenStack Dashboard Horizon
Step 1
Log in to the OpenStack Dashboard ‘Horizon’.
As indicated at the beginning of this article, a volume must meet certain requirements before it can be deleted.
You can detach a volume in the following two ways:
- Via the ‘Volume Overview’
- Via the ‘Instance Overview’.
Open the tabs below to follow, step by step and per section, how to perform this.
Detaching a volume and then deleting it via the volume overview
Step 1
In the left-hand menu, click ‘Volumes’ and then, in the submenu, click ‘Volumes’.
In this overview you can see that the ‘volume’ is attached to the instance ‘OpenStack-Clean’. Then, under ‘Action’, click the arrow to open the options menu. In this menu you’ll see that there is no ‘Delete Volume’ option. After following the next steps, the ‘Delete Volume’ option will become available and you will be able to delete the volume.

Next, under ‘Action’ click the arrow to open the options menu. In this menu, choose ‘Manage Attachments’.

Step 2
After clicking ‘Manage Attachments’, the following screen appears.
In this pop-up window, select multiple volumes if you have more than one, and then click ‘Detach Volume’ to detach the volumes.

Step 4
After clicking ‘Detach Volume’, a confirmation screen appears in which you must click ‘Detach Volume’ once more.

Step 5
Navigate back to the ‘Volume Overview’; here you will see that the volume is no longer attached to the instance. The field under ‘Attached To’ is empty, as shown below.
Now that the volume has been detached from the instance, you can delete it via the ‘Volume Overview’.
Click the arrow to the right of the volume, next to ‘Edit Volume’, as shown in the image below. In the menu that appears, you will now see that the ‘Delete Volume’ option is listed.

Step 6
After clicking ‘Delete Volumes’, a pop-up window appears in which you must confirm the deletion by clicking ‘Delete Volume’ once again. After confirming, the volume will be deleted.

Detaching a volume and then deleting it via the instance overview
Navigate to the ‘Volume Overview’. In the left-hand menu, click ‘Volumes’ and in the submenu click ‘Volumes’.
Here you can see that the volume is attached to the instance ‘OpenStack-Clean’. Then, under ‘Action’, click the arrow to open the options menu. In this menu you’ll see that there is no ‘Delete Volume’ option. After following the steps below, the ‘Delete Volume’ option will be available and you can delete the volume.

Step 2
Navigate to the ‘Instance Overview’. In the left-hand menu, click ‘Compute’ and in the submenu click ‘Instances’. Then, under ‘Action’, click the arrow to open the options menu. In this menu, choose ‘Detach Volume’.

Step 3
After choosing ‘Detach Volume’ via the menu shown in the screenshot above, a new pop-up window opens as below. In this window, click the arrow to the right of ‘Select a Volume’ and then select the volume you want to detach.

Step 4
Navigate back to the ‘Volumes’ overview; here you will see that the volume is no longer attached to the instance. The field under ‘Attached To’ is empty, as shown below.

Click the arrow to the right of the volume, next to ‘Edit Volume’, as shown in the image below. In the menu that appears, choose ‘Delete Volume’.

Step 5
After clicking ‘Delete Volume’, a pop-up window appears in which you must confirm the deletion by clicking ‘Delete Volume’ once again. After confirming, the volume will be deleted.

Step 2
In the ‘Volume Overview’, verify that the volume has indeed been deleted.

You have now detached a volume from an instance and deleted it.