How to Create and Manage Volumes in OpenStack

Reading Time: 3 minutes

What is Volume?

Volumes in OpenStack are a way you can have extra storage for your instances. Volumes are block storage devices that you attach to instances to enable persistent storage. You can attach a volume to a running instance or detach a volume and attach it to another instance at any time. You can also create a snapshot from or delete a volume. Only admin users can create volume types.

  • Creating a Volume
  • Attaching a Volume to an Instance
  • Detaching a Volume to an Instance
  • Creating a Snapshot of a Volume
  • Editing a volume
  • Deleting a Volume

Creating a volume in Openstack:

  1. Log in to the dashboard.
  2. Select the project from the drop-down menu at the top left.
  3. Open the Volumes tab on the Project tab and click the Volumes category.

Attaching a volume to an instance:

After you create a volume, you can attach them to instances. You can attach a volume to one instance at a time.

  • Select the volume to add to an instance and click Manage Attachments.
  • In the Manage Volume Attachments, select an instance.
  • Click Attach Volume.

Detaching a volume from an instance:

  • open the Volumes tab and click the Volumes category.
  • Select the volume and click Manage Attachments.
  • Click Detach Volume and confirm your changes.

A message indicates the action was successful.

Creating a snapshot from a volume:

  • Open the Volumes tab and click the Volumes category.
  • Select a volume from which to create a snapshot.
  • In the Actions column, click Create Snapshot.
  • Enter a snapshot name and a brief description.

Confirm your changes. The dashboard shows the new volume snapshot in the Volume Snapshots tab.

Editing a volume in OpenStack:

  • Open the Volumes tab and click the Volumes category.
  • Select the volume that you want to edit.
  • In the Actions column, click Edit Volume.
  • In the Edit Volume, update the name and description of the volume.
  • Click Edit Volume.

Deleting a volume in Openstack:

When you delete an instance, the data in its attached volumes is not deleted.

  • Open the Volumes tab and click the Volumes category.
  • Select the check boxes for the volumes that you want to delete.
  • Click Delete Volumes and confirm your choice.

After the following above step Volume is deleted successfully.

Reference:

https://docs.openstack.org