How to delete a volume snapshot that is reporting "State Error" or "Error_Deleting" in VIO
search cancel

How to delete a volume snapshot that is reporting "State Error" or "Error_Deleting" in VIO

book

Article ID: 328181

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • The snapshot of an instance with attached volume is in error or error_deleting state. This can be seen both in Horizon and CLI.
  • Running the from the command:

    cinder snapshot-list

    Example Output

    +--------------------------------------+--------------------------------------+----------------+--------------------------+------+
    | ID | Volume ID | Status | Name | Size |
    +--------------------------------------+--------------------------------------+----------------+--------------------------+------+
    | ########-####-####-####-##########15 | ########-####-####-####-##########94 | error | instance-test1 | 1 |
    | ########-####-####-####-##########d3 | ########-####-####-####-##########94 | error_deleting | instance-test2 | 1 |

Cause

This issue occurs because VMware Cinder driver does not support deleting a volume snapshot irrespective of its state if the corresponding volume is not 'available'.

Resolution

This issue is resolved in VMware Integrated OpenStack 3.0.x.

Workaround

If unable to upgrade, detach or reset the volume to a volume state of Available. After deleting the snapshot, change the volume back to the in-use state.

Deleting the volume snapshot:
  1. List the volumes

    cinder list

    Example Output

    $ cinder list

    +--------------------------------------+---------+----------------+------+-------------+----------+--------------------------------------+

    | ID | Status| Name | Size | Volume Type | Bootable | Attachedto |

    +--------------------------------------+---------+----------------+------+-------------+-------------------------------------------------+

    | ########-####-####-####-##########94 | in-use | Cirros-Sample | 1 | - | true | ########-####-####-####-##########9d |

  2. Reset volume state:

    cinder reset-state --state available volume_id

    Example Output

    cinder reset-state --state available ########-####-####-####-##########94

  3. List volume snapshots:

    cinder snapshot-list

    Example Output

    $ cinder snapshot-list
    +---------------------------------------+--------------------------------------+----------------+--------------------------+------+

    ID | Volume ID | Status | Name | Size |

    +---------------------------------------+--------------------------------------+----------------+--------------------------+------+

    | ########-####-####-####-##########32 | ########-####-####-####-##########94 | error | snapshot for cinder-test | 1 || ########-####-####-####-##########d3 | ########-####-####-####-##########94 | error_deleting | snapshot for test | 1

  4. Delete the snapshot:

    1. If the snapshot is in error_deleting state to reset the state of snapshot, run:

      cinder snapshot-reset-state snapshot_id

    2. Delete the snapshot:

      cinder snapshot-delete snapshot_id

      Example Output

      $ cinder snapshot-reset-state ########-####-####-####-##########d3
      $ cinder snapshot-delete ########-####-####-####-##########d3


  5. To revert the state of volume to its original status (in-use):

    cinder reset-state --state in-use volume_id

    Example Output

    cinder reset-state --state in-use ########-####-####-####-##########94