lsm_volume_raid_create(3)
π 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β anlsm_volume_raid_type. which ones are actually supported? go check the returns of thelsm_volume_raid_create_cap_getfunction, she has the receipts πdisks[]β an array oflsm_diskpointers. the squad of disks you're bringing to the party.disk_countβ the count oflsm_diskin thedisksargument. so like, how many are in the squad. count them. fr.strip_sizeβ auint32_t. the strip size in bytes. and which strip sizes are supported? again,lsm_volume_raid_create_cap_getreturns, bestie, she's the source of truth β¨new_volumeβ output pointer oflsm_volumefor the newly created volume. this is the new baby πΆ and the returned value must be freed with a call tolsm_volume_record_free. do not forget. do not leave her hanging. free your memory, queen.flagsβ reserved for future use, must beLSM_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_connectpointer or invalid flags. basically when you handed her something she can't work with π
- when any argument is NULL or not a valid
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
- 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