lsm_volume_replicate(3)
π lsm_volume_replicate(3) β the Libstoragemgmt C API Manual π
okay bestie, sit down, hydrate, and let's talk about lsm_volume_replicate β the function that makes a whole entire copy of a volume. it's giving copy-paste but make it storage. no cap. π¦
β¨ 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 π
connβ a Validlsm_connectpointer. gotta be the real deal, not a vibe.poolβ the pointer of thelsm_poolwhere your new replicate target volume is gonna live. if it'sNULL, the target volume just chills in the same pool as the source volume. convenient bestie behavior tbh.rep_typeβ anlsm_replication_type. the valid values are literally these:LSM_VOLUME_REPLICATE_CLONEβ a point in time read writeable space efficient copy of data. also know as read writeable snapshot. it's the thrifty queen of replication. πLSM_VOLUME_REPLICATE_COPYβ a full bitwise copy of the data. occupies full space. no shortcuts, no diet version, the whole thing. π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. so like, almost twins. π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. synchronized queens, matching outfits, zero drama. β¨
volume_srcβ pointer of replication sourcelsm_volume. the original. the blueprint. the main character.nameβ a String. human recognizable name, might be altered or ignored by certain storage system. so don't get too attached to your naming choices okay πnew_replicantβ output pointer of new replication targetlsm_volume. will beNULLif storage system support asynchronous action on this. memory must be freed with a call tolsm_volume_record_free. do NOT forget the free bestie, that's a leak and leaks are not cute. π¨jobβ output pointer of string. if storage system support asynchronous action on this, a job will be created and could be tracked vialsm_job_status_volume_get.NULLif storage system does not support asynchronous action on this. it's the "we'll text you when it's done" option fr fr.flagsβ Reserved for future use, must beLSM_CLIENT_FLAG_RSVD. it's a placeholder, it's reserved, leave it alone. π«Ά
π¦ VERSION π¦
1.0
π DESCRIPTION π
Replicates a volume. that's the whole thing, that's the assignment.
To delete the new target volume, please use lsm_volume_delete.
And listen β if any volume is the replication source, it is only deletable when lsm_volume_child_dependency returns 0. translation: it has dependents, it stays. the children need it. π€
π 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. ate. πLSM_ERR_JOB_STARTEDβ A job is started. Please check the'job'output pointer. the work is happening in the background, go peek at it.LSM_ERR_INVALID_ARGUMENTβ When any argument isNULLor not a validlsm_connectpointer or invalid flags or invalid replication type. something you passed is a no from me. πLSM_ERR_NOT_FOUND_VOLUMEβ When volume not found. it's not here bestie, it's giving nowhere.LSM_ERR_NOT_FOUND_POOLβ When pool not found. same energy, different object.LSM_ERR_NOT_ENOUGH_SPACEβ Pool does not have enough space. the pool said "I have no room for this" and honestly relatable.LSM_ERR_POOL_NOT_READYβ Pool is not ready. give it a minute, it's still getting ready. π§LSM_ERR_NO_SUPPORTβ Not supported. the storage system looked at your request and said absolutely not.
β οΈ heads up:new_replicantmemory must be freed withlsm_volume_record_free, andflagshas to beLSM_CLIENT_FLAG_RSVDβ those aren't suggestions, they're the rules. π
okay that's the whole page, you understood all of it, I'm so proud, this is your academic weapon era πβ¨
signing off from the Libstoragemgmt C API Manual, this page dated February 2026 β mwah, go replicate something responsibly ππ π¦
π¦ where this page comes from
- fedora 43: libstoragemgmt-devel 1.10.3-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libstoragemgmt-devel 1.10.3-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms