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

Symptoms:

  • 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

    You see output similar to:

    +--------------------------------------+--------------------------------------+----------------+--------------------------+------+
    | 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, available at VMware Downloads.

To work around this issue if you do not want 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. Run this command to list volumes:

    cinder list

    You see output similar to:

    $ cinder list

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

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

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

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

  2. Run this command to reset volume state:

    cinder reset-state --state available volume_id

    You see output similar to:

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

  3. Run this command to list volume snapshots:

    cinder snapshot-list

    You see output similar to:

    $ 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. Run this command if the snapshot is in error_deleting state to reset the state of snapshot:

      cinder snapshot-reset-state snapshot_id

    2. Delete the snapshot by running command:

      cinder snapshot-delete snapshot_id

      You see output similar to:

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

      a.
      cinder snapshot-delete snapshot_id

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

    cinder reset-state --state in-use volume_id

    You see output similar to:

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