Failed to delete volume because it has one or more clones

Recently I had this issue with AWS FSx, where I was not able to delete some of the volumes, and in the UI it showed me this message

Failed to delete volume because it has one or more clones. Delete or split the clones and try again.

Long story short, I had to login into the Netapp admin console, and delete them from there, but I had another issue, I was not able to split the clone, as their parent volume have been deleted.

Try to split a clone, as it was not online

FsxId05190788adb5c91a6::> volume clone split start -vserver svm1 -flexclone trident_pvc_50f52487_1e3d_4c54_963f_cdc07db73b57_1033 

Error: command failed: Volume trident_pvc_50f52487_1e3d_4c54_963f_cdc07db73b57_1033 is not online. It needs to be online for this operation.

Try to bring the volume back online fails, as it queued for delete.

FsxId05190788adb5c91a6::> vol modify -volume trident_pvc_50f52487_1e3d_4c54_963f_cdc07db73b57_1033 -state online

Error: command failed: This operation is not supported on a volume of type "DEL".

What eventually worked for me was to restore all deleted volumes first, and you need to be in privileged mode to do that,

FsxId05190788adb5c91a6::> set -privilege advanced
FsxId05190788adb5c91a6::*> vol recovery-queue recover-all 

Bring them online, and then you should be able to split them

FsxId05190788adb5c91a6::*> vol show 
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm1      svm1_root    aggr1        online     RW          1GB    971.3MB    0%
svm1      trident_pvc_156d4d48_99c3_4028_a48d_2eea8f991338 
                       aggr1        online     RW      31.75GB    30.07GB    5%
svm1      trident_pvc_50f52487_1e3d_4c54_963f_cdc07db73b57_1033 
                       aggr1        offline    RW      31.75GB          -     -
svm1      trident_pvc_54a7a090_61f9_4e1b_9743_4a054987e9df_1029 
                       aggr1        offline    RW      31.75GB          -     -
svm1      trident_pvc_75a72327_f79f_4e36_bc63_adf2163cc42a 
                       aggr1        online     RW      31.75GB    31.04GB    2%
svm1      trident_pvc_a05fe198_860a_442a_a0b9_585b3e014fb1_1032 
                       aggr1        offline    RW      31.75GB          -     -
svm1      trident_pvc_d0956967_3f68_4165_bbae_4e44f4b837cf_1028 
                       aggr1        offline    RW      31.75GB          -     -
svm1      trident_pvc_f09dfd7f_6995_4bcb_b10c_2980d240b6dd_1034 
                       aggr1        offline    RW      31.75GB          -     -
svm1      trident_pvc_fe24e6a4_d602_478a_aab2_dd532e8135ae_1027 
                       aggr1        offline    RW      31.75GB          -     -
9 entries were displayed.


FsxId05190788adb5c91a6::*> vol modify -state online -volume trident_pvc_50f52487_1e3d_4c54_963f_cdc07db73b57_1033
FsxId05190788adb5c91a6::*> vol clone split start -vserver svm1 -flexclone  trident_pvc_50f52487_1e3d_4c54_963f_cdc07db73b57_1033

Once you are done, the clone list should be empty,

FsxId05190788adb5c91a6::*> vol clone show
This table is currently empty.

And you SHOULD be able to delete all the volumes normally.

Leave a Reply

Your email address will not be published. Required fields are marked *