[openstack-dev] [nova][cinder] How to delete a volume which is attached to a server who was deleted

D'Angelo, Scott scott.dangelo at hpe.com
Wed Jun 22 12:33:46 UTC 2016


Please note that this Mailing List is not for usage questions. It is for development issues.

You can reset the state of the volume and then delete it (admin only):

cinder reset-state <vol_id>  #sets to available

________________________________
From: Will Zhou <zzxwill at gmail.com>
Sent: Wednesday, June 22, 2016 1:22:31 AM
To: OpenStack Development Mailing List (not for usage questions)
Subject: [openstack-dev] [nova][cinder] How to delete a volume which is attached to a server who was deleted

Hi all,

I'd like to delete a volume which is attached to a server who was deleted. It failed. How can I delete the volume? Thanks.

[root at b-node3 ~]# openstack volume delete aff1c13f-3c08-4230-9c1f-7d48e342054a
Invalid volume: Volume status must be available or error or error_restoring or error_extending and must not be migrating, attached, belong to a consistency group or have snapshots. (HTTP 400) (Request-ID: req-50033eb3-c8f2-41bb-8841-d8436cdb464d)

[root at b-node3 ~]# openstack volume list
+--------------------------------------+--------------+-----------+------+---------------------------------------------------------------+
| ID                                   | Display Name | Status    | Size | Attached to                                                   |
+--------------------------------------+--------------+-----------+------+---------------------------------------------------------------+
| aff1c13f-3c08-4230-9c1f-7d48e342054a | 1            | in-use    |    1 | Attached to e0929b6b-8880-45be-a400-23c06e399e64 on /dev/vdb  |
+--------------------------------------+--------------+-----------+------+---------------------------------------------------------------+

[root at b-node3 ~]# openstack server show e0929b6b-8880-45be-a400-23c06e399e64
+--------------------------------------+--------------------------------------------------------------+
| Field                                | Value                                                        |
+--------------------------------------+--------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                       |
| OS-EXT-AZ:availability_zone          | nova                                                         |
| OS-EXT-SRV-ATTR:host                 | b-node3                                                      |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | b-node3                                                      |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000083                                            |
| OS-EXT-STS:power_state               | 4                                                            |
| OS-EXT-STS:task_state                | None                                                         |
| OS-EXT-STS:vm_state                  | soft-delete                                                  |
| OS-SRV-USG:launched_at               | 2016-06-16T06:23:42.000000                                   |
| OS-SRV-USG:terminated_at             | None                                                         |
| accessIPv4                           |                                                              |
| accessIPv6                           |                                                              |
| addresses                            | public01=192.168.201.44                                      |
| config_drive                         |                                                              |
| created                              | 2016-06-16T06:22:41Z                                         |
| flavor                               | 1CPU_2GB (2)                                                 |
| hostId                               | 4e4564c50cedaa6451f4ffd5d0b835c12a92ef5f188d7a1a58e4e27f     |
| id                                   | e0929b6b-8880-45be-a400-23c06e399e64                         |
| image                                | CentOS-6.6-with-agent (3ab17999-374d-4638-a5ad-2dd3015cb8bc) |
| key_name                             | None                                                         |
| name                                 | f                                                            |
| os-extended-volumes:volumes_attached | [{u'id': u'aff1c13f-3c08-4230-9c1f-7d48e342054a'}]           |
| project_id                           | c172d37d71114546b4ea3d96c0b27876                             |
| properties                           |                                                              |
| security_groups                      | [{u'name': u'default'}]                                      |
| status                               | SOFT_DELETED                                                 |
| updated                              | 2016-06-22T06:23:43Z                                         |
| user_id                              | bf8316d6867d4ea6a043661375f4a7c6                             |
+--------------------------------------+--------------------------------------------------------------+




More information about the OpenStack-dev mailing list