lsm_volume_replicate(3)

πŸ“¦
version 1.10.3 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– 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 Valid lsm_connect pointer. gotta be the real deal, not a vibe.
  • pool β€” the pointer of the lsm_pool where your new replicate target volume is gonna live. if it's NULL, the target volume just chills in the same pool as the source volume. convenient bestie behavior tbh.
  • rep_type β€” an lsm_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 source lsm_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 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. 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 via lsm_job_status_volume_get. NULL if 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 be LSM_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 is NULL or not a valid lsm_connect pointer 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_replicant memory must be freed with lsm_volume_record_free, and flags has to be LSM_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