lsm_volume_raid_create(3)

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

πŸ’– lsm_volume_raid_create β€” bestie, let's build a RAID

okay so this one lives in the Libstoragemgmt C API Manual (section 3, the library-calls girlies) and it's called lsm_volume_raid_create. the whole vibe? you're making a RAID volume. that's it. that's the function. πŸŽ€


✨ NAME ✨

lsm_volume_raid_create β€” Create a RAID volume. literally what it says on the tin, no plot twist πŸ’…


🌸 SYNOPSIS 🌸

int lsm_volume_raid_create (lsm_connect *conn, const char *name,
lsm_volume_raid_type raid_type, lsm_disk *disks[], uint32_t disk_count,
uint32_t strip_size, lsm_volume **new_volume, lsm_flag flags);

πŸ¦‹ ARGUMENTS πŸ¦‹

here's the cast of characters, bestie, and every single one of them matters:

  • conn β€” a valid connection. like, it has to be real. no fake ones, no NULLs, we're not doing that today πŸ™ˆ
  • name β€” a string. a human-recognizable name, so like, something a person could read. but heads up πŸ‘€ certain storage systems might alter it or straight up ignore it. so don't get too attached to your naming choices, she's just a suggestion to some systems.
  • raid_type β€” an lsm_volume_raid_type. which ones are actually supported? go check the returns of the lsm_volume_raid_create_cap_get function, she has the receipts πŸ“‹
  • disks[] β€” an array of lsm_disk pointers. the squad of disks you're bringing to the party.
  • disk_count β€” the count of lsm_disk in the disks argument. so like, how many are in the squad. count them. fr.
  • strip_size β€” a uint32_t. the strip size in bytes. and which strip sizes are supported? again, lsm_volume_raid_create_cap_get returns, bestie, she's the source of truth ✨
  • new_volume β€” output pointer of lsm_volume for the newly created volume. this is the new baby πŸ‘Ά and the returned value must be freed with a call to lsm_volume_record_free. do not forget. do not leave her hanging. free your memory, queen.
  • flags β€” reserved for future use, must be LSM_CLIENT_FLAG_RSVD. that's it. that's the only legal value. don't try anything cute πŸ’€

⭐ VERSION ⭐

1.2 β€” yes, version 1.2, we're keeping track 🫢


πŸ”₯ DESCRIPTION πŸ”₯

so this one is only available for hardware RAID cards. software RAID? not today, babe. if you don't have the hardware, this function is not for you.

what it does: it creates a disk RAID pool and allocates the entire full space to the new volume. the whole thing. all of it. no crumbs left over πŸ‘‘


πŸ‘‘ CAPABILITY πŸ‘‘

you need LSM_CAP_VOLUME_RAID_CREATE for this. that's the vibe check this function has to pass. βœ…


πŸ’€ RETURN πŸ’€

returns an error code as enumerated by lsm_error_number. here's the full rundown, no skipping:

  • LSM_ERR_OK
    • on success. slay. πŸŽ‰
  • LSM_ERR_INVALID_ARGUMENT
    • when any argument is NULL or not a valid lsm_connect pointer or invalid flags. basically when you handed her something she can't work with 😭
  • LSM_ERR_NOT_FOUND_DISK
    • when disk not found. she looked. she couldn't find it. πŸ’€
  • LSM_ERR_DISK_NOT_FREE
    • when disk not free. that disk is taken, bestie, she's busy 🚫
  • LSM_ERR_NO_SUPPORT
    • not supported. it's giving "no ❀️" πŸ™ˆ

and that's the whole page, no cap. go make that RAID volume. free your new_volume when you're done. i'm so serious. πŸ’–

okay bye bestie, this was lsm_volume_raid_create(3) from the Libstoragemgmt C API Manual, version 1.2, dated February 2026 βœ¨πŸŽ€πŸ¦‹ mwah, go forth and create volumes 🫢

πŸ“¦ where this page comes from