Can't delete volume: LVM-volume is open

asked 2019-04-24 09:37:26 -0500

ICBeter gravatar image

I have a volume that is in error state:

root@controller:/opt/scripts# openstack volume show 3a8d5856-2f30-44ba-afc0-e019096111ee
+--------------------------------+--------------------------------------+
| Field                          | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2019-03-02T16:05:30.000000           |
| description                    |                                      |
| encrypted                      | False                                |
| id                             | 3a8d5856-2f30-44ba-afc0-e019096111ee |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | Volume1                              |
| os-vol-host-attr:host          | controller@lvm#LVM                   |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | f435b2a297284215b50e37b279239401     |
| properties                     |                                      |
| replication_status             | None                                 |
| size                           | 1                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | error                                |
| type                           | None                                 |
| updated_at                     | 2019-04-24T14:27:31.000000           |
| user_id                        | c5a14461c085467d8f55740fd55be070     |
+--------------------------------+--------------------------------------+

No problem, delete it. But that does not work:

root@controller:/opt/scripts# openstack volume delete 3a8d5856-2f30-44ba-afc0-e019096111ee
root@controller:/opt/scripts# openstack volume show 3a8d5856-2f30-44ba-afc0-e019096111ee
+--------------------------------+--------------------------------------+
| Field                          | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2019-03-02T16:05:30.000000           |
| description                    |                                      |
| encrypted                      | False                                |
| id                             | 3a8d5856-2f30-44ba-afc0-e019096111ee |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | Volume1                              |
| os-vol-host-attr:host          | controller@lvm#LVM                   |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | f435b2a297284215b50e37b279239401     |
| properties                     |                                      |
| replication_status             | None                                 |
| size                           | 1                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | error_deleting                       |
| type                           | None                                 |
| updated_at                     | 2019-04-24T14:28:57.000000           |
| user_id                        | c5a14461c085467d8f55740fd55be070     |
+--------------------------------+--------------------------------------+

cinder-volume.log says:

2019-04-24 16:28:57.833 14734 ERROR oslo_messaging.rpc.server Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvremove --config activation { retry_deactivation = 1} devices { ignore_suspended_devices = 1} -f cinder-volumes/volume-3a8d5856-2f30-44ba-afc0-e019096111ee
2019-04-24 16:28:57.833 14734 ERROR oslo_messaging.rpc.server Exit code: 5
2019-04-24 16:28:57.833 14734 ERROR oslo_messaging.rpc.server Stdout: u''
2019-04-24 16:28:57.833 14734 ERROR oslo_messaging.rpc.server Stderr: u'  Logical volume cinder-volumes/volume-3a8d5856-2f30-44ba-afc0-e019096111ee in use.\n'

and indeed the logical volume is open and no idea why:

root@controller:/opt/scripts# lvs | grep 3a8d5856-2f30-44ba-afc0-e019096111ee
  volume-3a8d5856-2f30-44ba-afc0-e019096111ee    cinder-volumes Vwi-aotz--   1.00g cinder-volumes-pool                                                0.00
root@controller:/opt/scripts# lsof | grep 3a8d5856-2f30-44ba-afc0-e019096111ee
root@controller:/opt/scripts#

What could I do?

edit retag flag offensive close merge delete

Comments

Somebody had a similar problem on an early version of OpenStack eight years ago (!). Stackexchange has a few suggestions.

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-24 20:35:40 -0500 )edit