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 readerrno. 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
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· 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