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

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 |
    +--------------------------------------+--------------------------------------+----------------+--------------------------+------+
    | 0af232a6-517a-4c2f-bfed-2680a2f69c15 | 291984f8-67ed-4556-a0b1-f399076a0894 | error | instance-test1 | 1 |
    | 95d017a0-c88c-446d-abed-8da0c4e670d3 | 291984f8-67ed-4556-a0b1-f399076a0894 | 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 |

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

    | 291984f8-67ed-4556-a0b1-f399076a0894 | in-use | Cirros-Sample | 1 | - | true | 57c79315-1a17-4b1c-b408-0cbcf735529d |

  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 291984f8-67ed-4556-a0b1-f399076a0894

  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 |

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

    | 092a008e-eb35-4d6a-9570-2351f1264c32 | 291984f8-67ed-4556-a0b1-f399076a0894 | error | snapshot for cinder-test | 1 || 95d017a0-c88c-446d-abed-8da0c4e670d3 | 291984f8-67ed-4556-a0b1-f399076a0894 | 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 95d017a0-c88c-446d-abed-8da0c4e670d3
      $ cinder snapshot-delete 95d017a0-c88c-446d-abed-8da0c4e670d3

      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 291984f8-67ed-4556-a0b1-f399076a0894