nvme_ns_mgmt_delete(2)

✨ nvme_ns_mgmt_delete(2) ✨

okay bestie, so this is a page from the libnvme API manual and it's all about saying bye-bye to a namespace πŸ‘‹πŸ¦‹


πŸ’… NAME πŸ’…

nvme_ns_mgmt_delete β€” delete a non attached namespace


πŸŽ€ SYNOPSIS πŸŽ€

int nvme_ns_mgmt_delete (int fd , __u32 nsid );

🌸 ARGUMENTS 🌸

  • fd β€” the file descriptor of your nvme device. like, the lil handle that says "yeah this is the drive we're talking to" πŸ’–
  • nsid β€” the namespace identifier you wanna delete. the one getting the boot πŸ₯Ύβœ¨

🌈 DESCRIPTION 🌈

so here's the tea, bestie πŸ«–: the recommendation is that a namespace you're about to delete is not attached to any controller. if your namespace is still attached, you're gonna wanna hit up nvme_ns_detach_ctrls first. like, detach it, then delete it. that's the order. no cap 🧚


⭐ RETURN ⭐

this function hands you back the nvme command status if a response was received (peep enum nvme_status_field for that, iykyk πŸ‘‘).

otherwise? it gives you -1 and sets errno. so yeah, check that errno, bestie, it's literally telling you what went wrong πŸ˜­πŸ’€


fr fr: if you're seeing -1, that's your sign to go read errno. it's giving "diagnostic information, read me" πŸ”₯

and that's the whole page, diva πŸ’– written for libnvme API manual, this lil entry is nvme_ns_mgmt_delete from July 2026 ✨ slay, go delete a namespace responsibly πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from