lsm_volume_resize(3)

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

🌸 NAME 🌸

lsm_volume_resize β€” ok so bestie, this is the one that resizes an existing volume πŸ’–


✨ SYNOPSIS ✨

int lsm_volume_resize (lsm_connect *conn, lsm_volume *volume, uint64_t new_size, lsm_volume **resized_volume, char **job, lsm_flag flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • conn β€” a valid lsm_connect pointer, no funny business πŸ’…
  • volume β€” lsm_volume. This is the volume we're gonna re-size, periodt.
  • new_size β€” uint64_t. The new size of the volume, in bytes. Heads up though: the actual size might be bigger than what you asked for, because it gets based on array rounding to block size. So like, don't be shocked, it's giving "close enough" 😭
  • resized_volume β€” output pointer of the updated lsm_volume. It might be NULL if the storage system supports asynchronous action on this. And listen β€” that memory must be freed with a call to lsm_volume_record_free. Don't leave it hanging bestie πŸ™ˆ
  • job β€” output pointer of string. If the storage system supports asynchronous action on this, a job gets created and you can track it via lsm_job_status_volume_get. It'll be NULL if the storage system does not support asynchronous action on this.
  • flags β€” reserved for future use, must be LSM_CLIENT_FLAG_RSVD. Like, it has one job and one job only πŸ”₯

πŸ’œ VERSION πŸ’œ

1.0


πŸ¦‹ DESCRIPTION πŸ¦‹

So what this does is resize the specified volume. That's the whole vibe. ✨

But β€” and this is the important part β€” some pool might not allow volume resize at all. So please, please check lsm_pool_unsupported_actions_get for LSM_POOL_UNSUPPORTED_VOLUME_GROW and LSM_POOL_UNSUPPORTED_VOLUME_SHRINK before invoking this function. Do the vibe check first, then call. iykyk 🫢


πŸ‘‘ CAPABILITY πŸ‘‘

LSM_CAP_VOLUME_RESIZE


🌈 RETURN 🌈

Error code as enumerated by lsm_error_number. Here's the whole roster, no skips:

  • 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.
  • LSM_ERR_NOT_FOUND_POOL
    • When pool not found.
  • LSM_ERR_NOT_FOUND_VOLUME
    • When volume not found.
  • LSM_ERR_NOT_ENOUGH_SPACE
    • Pool does not have enough space. πŸ’€
  • LSM_ERR_POOL_NOT_READY
    • Pool is not ready for volume resizing.
  • LSM_ERR_NO_STATE_CHANGE
    • Requested size if identical to current size.
  • LSM_ERR_NO_SUPPORT
    • Not supported. 😭

and that's the whole page, bestie β€” written up in the Libstoragemgmt C API Manual, the lsm_volume_resize(3) one, dated February 2026. go resize something responsibly, ily 🫢✨

πŸ“¦ where this page comes from