lsm_volume_mask(3)

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

πŸ’… lsm_volume_mask β€” a lil' page from the Libstoragemgmt C API Manual (section 3, bestie, we're in the library docs)

okay so. picture this: you got a volume, you got an access group, and they're just... not talking. tragic. lsm_volume_mask() is the function that fixes that, and I'm gonna walk you through it like we're texting at 2am. 🫢


✨ NAME ✨

lsm_volume_mask β€” grants access to a volume for the specified group. that's it. that's the whole job. iconic behavior honestly. πŸ‘‘


🌸 SYNOPSIS 🌸

int lsm_volume_mask (lsm_connect *conn, lsm_access_group *access_group,
lsm_volume *volume, lsm_flag flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • conn β€” a valid connection. like, a real one. don't be passing me garbage, bestie.
  • access_group β€” pointer of lsm_access_group. this is the group getting the access.
  • volume β€” pointer of lsm_volume. this is the volume being handed over.
  • flags β€” reserved for future use, must be LSM_CLIENT_FLAG_RSVD. it's giving "we made room for future plot twists." don't put anything else there fr fr.

πŸ¦‹ VERSION πŸ¦‹

1.0 ✨


πŸ’œ DESCRIPTION πŸ’œ

grants access to a volume for the specified group β€” also known as LUN masking or mapping. so if you've ever heard those two terms floating around and wondered "is that the same thing as this function?" β€” yes. yes it is. slay. πŸ’…


πŸ”₯ CAPABILITY πŸ”₯

LSM_CAP_VOLUME_MASK

that's the capability you gotta check for, okay? if it's not there, it's not happening.


🌈 RETURN 🌈

it returns an error code as enumerated by lsm_error_number. so like, the vibes get reported back to you in number form. here's the whole list, no skips, no shortcuts:

  • LSM_ERR_OK
    • on success. we ate. πŸ“
  • LSM_ERR_INVALID_ARGUMENT
    • when any argument is NULL or not a valid lsm_connect pointer, or invalid flags, or an invalid lsm_access_group pointer, or an invalid lsm_volume. basically if anything you handed over was sus, you get this.
  • LSM_ERR_NOT_FOUND_ACCESS_GROUP
    • when the access group is not found. she's not here. 😭
  • LSM_ERR_NOT_FOUND_VOLUME
    • when the volume is not found. also not here. πŸ’€
  • LSM_ERR_NO_STATE_CHANGE
    • when the specified volume is already masked to the specified access group. like bestie it's already done, nothing changed, go home. πŸ™ˆ
  • LSM_ERR_NO_SUPPORT
    • not supported. the system said "no <3" in the politest way possible.
lowkey important: LSM_ERR_NO_STATE_CHANGE isn't an error error, it's more like a "you're already holding the door open, why are you knocking" situation. but it IS what gets returned, so don't come for me.

and that's the whole page, no notes. 🧚 this lil' page came from the Libstoragemgmt C API Manual, dated February 2026, and honestly? she's short, she's sweet, she does exactly one thing and does it well. main character energy. periodt. πŸ‘‘πŸ’–βœ¨

πŸ“¦ where this page comes from