Scroll to navigation

lsm_volume_create(3) Libstoragemgmt C API Manual lsm_volume_create(3)

NAME

lsm_volume_create - Creates a new volume

SYNOPSIS

int lsm_volume_create (lsm_connect *conn, lsm_pool *pool, const char *volume_name, uint64_t size, lsm_volume_provision_type provisioning, lsm_volume **new_volume, char **job, lsm_flag flags);

ARGUMENTS

Valid lsm_connect pointer.
Pointer of lsm_pool.
String. Human recognizable name, might be altered or ignored by certain storage systems.
uint64_t. Size of new volume in bytes, actual size might be bigger than requested and will be based on array rounding to block size,
lsm_volume_provision_type. Type of volume provisioning to use. Valid values are: * LSM_VOLUME_PROVISION_DEFAULT
Let storage system to decided. * LSM_VOLUME_PROVISION_FULL
Create new fully allocated volume. * LSM_VOLUME_PROVISION_THIN
Create new thin provisioning volume.
Output pointer of lsm_volume. Will be NULL if storage system support asynchronous action on this. Memory must be freed with a call to lsm_volume_record_free.
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_volume_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

Creates a new volume(also known as LUN).

CAPABILITY

LSM_CAP_VOLUME_CREATE

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 or invalid provisioning type.
* LSM_ERR_NOT_FOUND_POOL
When pool not found.
* LSM_ERR_NOT_ENOUGH_SPACE
Pool does not have enough space.
* LSM_ERR_POOL_NOT_READY
Pool is not ready for volume creation.
* LSM_ERR_NO_SUPPORT
Not supported.

lsm_volume_create April 2023