Delete a volume
DELETE /storage/volumes/{uuid}
Introduced In: 9.6
Deletes a volume. If the UUID belongs to a volume, all of its blocks are freed and returned to its containing aggregate. If a volume is online, it is offlined before deletion. If a volume is mounted, unmount the volume by specifying the nas.path as empty before deleting it using the DELETE operation.
Platform Specifics
-
Unified ONTAP: DELETE must be used to delete a volume.
Optional parameters:
-
force
- Bypasses the recovery-queue and completely removes the volume from the aggregate making it non-recoverable. By default, this flag is set to "false".
Related ONTAP commands
-
volume delete
-
volume clone delete
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
uuid |
string |
path |
True |
Unique identifier of the volume. |
force |
boolean |
query |
False |
Set the force flag to "true" to bypass the recovery queue, making the deleted volume non-recoverable.
|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
|
Response
Status: 200, Ok
Name | Type | Description |
---|---|---|
job |
Example response
{
"job": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"uuid": "string"
}
}
Response
Status: 202, Accepted
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
460770 |
[Job "jobid"] Job failed. |
524615 |
Failed to delete volume because it has one or more clones. |
917531 |
Cannot delete the root volume because the SVM contains other volumes. |
918667 |
Volume "name" in SVM "svm.name" cannot be taken offline because it is configured to hold audit logs. |
918693 |
Volume "name" in SVM "svm.name" cannot be taken offline because it is configured to hold audit logs. |
918701 |
The specified operation on the volume endpoint is not supported on this platform. |
13107349 |
Operation is only supported on flexible volumes and FlexGroup volumes. |
65537463 |
Volume encryption keys (VEK) cannot be created or deleted for data Vserver \"{0}\". External key management has been configured for data Vserver \"{0}\" but ONTAP is not able to encrypt or decrypt with the key manager. Resolve the external key manager key issues at the key manager's portal before creating any new encrypted volumes. |
65537529 |
Encrypted volumes cannot be created or deleted for Vserver \"{0}\" as a rekey operation for the vserver is in progress. Try creating the encrypted volume again after some time. If the problem persists, run the rekey operation again after some time. |
65537600 |
Encrypted volumes cannot be created or deleted for Vserver \"{0}\" while the enabled keystore configuration is being switched. If a previous attempt to switch the keystore configuration failed, or was interrupted, the system will continue to prevent encrypted volume creation for Vserver \"{0}\". Use the \"security key-manager keystore enable\" command to re-run and complete the operation. |
65539430 |
Cannot create or delete volumes on Vserver \"{0}\" while the keystore is being initialized. Wait until the keystore is in the active state, and rerun the volume operation. |
65539431 |
Cannot create or delete volumes on Vserver \"{0}\" while the keystore is being disabled. |
Also see the table of common errors in the Response body overview section of this documentation.
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
job_link
Name | Type | Description |
---|---|---|
_links |
||
uuid |
string |
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
returned_error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |