Scroll to navigation

lsm_volume_replicate(3) Libstoragemgmt C API Manual lsm_volume_replicate(3)

NAME

lsm_volume_replicate - Replicates a volume

SYNOPSIS

int lsm_volume_replicate (lsm_connect *conn, lsm_pool *pool, lsm_replication_type rep_type, lsm_volume *volume_src, const char *name, lsm_volume **new_replicant, char **job, lsm_flag flags);

ARGUMENTS

Valid lsm_connect pointer.
Pointer of lsm_pool where the new replicate target volume stored in. If NULL, target volume will be reside in the same pool of source volume.
lsm_replication_type. Valid values are: * LSM_VOLUME_REPLICATE_CLONE
Point in time read writeable space efficient copy of
data. Also know as read writeable snapshot. * LSM_VOLUME_REPLICATE_COPY
Full bitwise copy of the data (occupies full space). * LSM_VOLUME_REPLICATE_MIRROR_ASYNC
I/O will be blocked until I/O reached source storage systems.
The source storage system will use copy the changes data to
target system in a predefined interval. There will be a small
data differences between source and target. * LSM_VOLUME_REPLICATE_MIRROR_SYNC
I/O will be blocked until I/O reached both source and
target storage systems. There will be no data difference
between source and target storage systems.
Pointer of replication source lsm_volume.
String. Human recognizable name, might be altered or ignored by certain storage system.
Output pointer of new replication target 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

Replicates a volume. To delete the new target volume, please use lsm_volume_delete. If any volume is the replication source, it is only deletable when lsm_volume_child_dependency returns 0.

CAPABILITY

LSM_CAP_VOLUME_REPLICATE LSM_CAP_VOLUME_REPLICATE_CLONE LSM_CAP_VOLUME_REPLICATE_COPY LSM_CAP_VOLUME_REPLICATE_MIRROR_ASYNC LSM_CAP_VOLUME_REPLICATE_MIRROR_SYNC

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 replication type.
* LSM_ERR_NOT_FOUND_VOLUME
When volume not found.
* 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.
* LSM_ERR_NO_SUPPORT
Not supported.

lsm_volume_replicate April 2023