Scroll to navigation

lsm_volume_delete(3) Libstoragemgmt C API Manual lsm_volume_delete(3)

NAME

lsm_volume_delete - Delete a volume.

SYNOPSIS

int lsm_volume_delete (lsm_connect *conn, lsm_volume *volume, char **job, lsm_flag flags);

ARGUMENTS

Valid lsm_connect pointer.
Pointer of lsm_volume that is to be deleted.
Output pointer of string. If storage system support asynchronous action on this, a job will be created and could be tracked via lsm_job_status_get. NULL if storage system does not support asynchronous action on this.
Reserved for future use, must be LSM_CLIENT_FLAG_RSVD.

VERSION

1.0

DESCRIPTION

Deletes a volume/LUN and its data is lost! If specified volume is masked to any access_group, it cannot be deleted. You may use `lsm_access_groups_granted_to_volume` and `lsm_volume_unmask` before `lsm_volume_delete`. If specified volume is has child dependency, it cannot be deleted. You may use `lsm_volume_child_dependency` and `lsm_volume_child_dependency_delete` before `lsm_volume_delete`.

CAPABILITY

LSM_CAP_VOLUME_DELETE

RETURN

Error code as enumerated by 'lsm_error_number'.
* LSM_ERR_OK
On success.
* LSM_ERR_JOB_STARTED
A job is started. Please check the 'job' output pointer.
* LSM_ERR_INVALID_ARGUMENT
When any argument is NULL or not a valid lsm_connect pointer
or invalid flags.
* LSM_ERR_NOT_FOUND_VOLUME
When volume not found.
* LSM_ERR_POOL_NOT_READY
Pool is not ready.
* LSM_ERR_NO_SUPPORT
Not supported.
* LSM_ERR_HAS_CHILD_DEPENDENCY
Specified volume has child dependencies.

lsm_volume_delete April 2023