lsm_volume_replicate - Man Page
Replicates a volume
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);
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.
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.
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
Error code as enumerated by 'lsm_error_number'.
A job is started. Please check the 'job' output pointer.
When any argument is NULL or not a valid lsm_connect pointer
or invalid flags or invalid replication type.
When volume not found.
When pool not found.
Pool does not have enough space.
Pool is not ready.