lsm_volume_resize - Man Page

Resize an existing volume.

Synopsis

int lsm_volume_resize (lsm_connect *conn, lsm_volume *volume, uint64_t new_size, lsm_volume **resized_volume, char **job, lsm_flag flags);

Arguments

conn

Valid lsm_connect pointer.

volume

lsm_volume. Volume to re-size

new_size

uint64_t. New size of volume in bytes, actual size might be bigger than requested and will be based on array rounding to block size,

resized_volume

Output pointer of updated lsm_volume. Might be NULL if storage system support asynchronous action on this. Memory must be freed with a call to lsm_volume_record_free.

job

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.

flags

Reserved for future use, must be LSM_CLIENT_FLAG_RSVD.

Version

1.0

Description

Resize the specified volume. Some pool might not allow volume resize, please check lsm_pool_unsupported_actions_get for LSM_POOL_UNSUPPORTED_VOLUME_GROW and LSM_POOL_UNSUPPORTED_VOLUME_SHRINK before invoking this function.

Capability

LSM_CAP_VOLUME_RESIZE

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_POOL
       When pool not found.
   * LSM_ERR_NOT_FOUND_VOLUME
       When volume not found.
   * LSM_ERR_NOT_ENOUGH_SPACE
       Pool does not have enough space.
   * LSM_ERR_POOL_NOT_READY
       Pool is not ready for volume resizing.
   * LSM_ERR_NO_STATE_CHANGE
       Requested size if identical to current size.
   * LSM_ERR_NO_SUPPORT
       Not supported.

Info

April 2023 Libstoragemgmt C API Manual