lsm_fs_clone(3)

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

πŸ’– lsm_fs_clone β€” bestie, we're cloning a filesystem πŸ’–

okay so this is a page from the Libstoragemgmt C API Manual, section 3, and the function is called lsm_fs_clone. It's giving "duplicate my filesystem but make it ✨efficient✨". Let's get into it.


✨ NAME ✨

lsm_fs_clone β€” Clones an existing file system. That's it, that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

int lsm_fs_clone (lsm_connect *conn, lsm_fs *src_fs, const char *name,
lsm_fs_ss *optional_ss, lsm_fs **cloned_fs, char **job, lsm_flag flags);

πŸ’… ARGUMENTS πŸ’…

  • conn β€” a valid connection, bestie. Gotta have one. Valid connection.
  • src_fs β€” pointer of lsm_fs for the source file system. Like, the original. The blueprint. The main character we're copying. πŸ‘‘
  • name β€” a string. Human recognizable name for the new file system β€” but heads up, it might be altered or ignored by certain storage system. So don't get too attached to your naming skills, some storage systems just do their own thing. πŸ™ˆ
  • optional_ss β€” pointer of lsm_fs_ss. This is the file system snapshot to base the clone from. Set to NULL of not needed.. (yes that typo is canon, we don't fix what we don't own πŸ’€)
  • cloned_fs β€” output pointer of lsm_fs for the newlly created file system. Will be NULL if the storage system support asynchronous action on this. The returned value must be freed with a call to lsm_fs_record_free. Don't forget, or that's a memory leak and we don't do those. 🫢
  • job β€” output pointer of string. If the storage system support asynchronous action on this, a job will be created and could be tracked via lsm_job_status_fs_get. It's NULL if the storage system does not support asynchronous action on this.
  • flags β€” Reserved for future use, must be LSM_CLIENT_FLAG_RSVD. No freelancing with the flags, bestie. πŸŽ€

⭐ VERSION ⭐

1.0 β€” iconic from day one, honestly.


πŸ¦‹ DESCRIPTION πŸ¦‹

Create a point in time read writeable space efficient copy of the specified file system β€” also know as a read writeable snapshot. The new file system will reside in the same pool of the specified file system. Same pool, same energy, different filesystem. periodt. πŸ’œ


πŸ”₯ CAPABILITY πŸ”₯

LSM_CAP_FS_CLONE


🌈 RETURN 🌈

Error code as enumerated by lsm_error_number. Let's go through them:

  • LSM_ERR_OK
    • On success. slay. ✨
  • 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. So like, don't do that.
  • LSM_ERR_NOT_FOUND_FS
    • When file system not found. she's not here. 😭
  • LSM_ERR_NOT_ENOUGH_SPACE
    • Pool does not have enough space. The pool said no. πŸ’€
  • LSM_ERR_POOL_NOT_READY
    • Pool is not ready. Give her a minute. 🧚
  • LSM_ERR_NO_SUPPORT
    • Not supported. Not every storage system woke up and chose functionality, iykyk. πŸ™ˆ

πŸŽ€ SIGN-OFF πŸŽ€

This page lives under the Libstoragemgmt C API Manual, dated February 2026, and it's filed as lsm_fs_clone(3). Go clone something responsibly, bestie. mwah. πŸ’–πŸ’…

πŸ“¦ where this page comes from