---
name: "nvme_init_ns_detach_ctrls-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_init_ns_detach_ctrls-libnvme3"
---

# nvme\_init\_ns\_detach\_ctrls-libnvme3(2)

Initialize passthru command to detach namespace from controllers

## NAME

nvme\_init\_ns\_detach\_ctrls - Initialize passthru command to detach namespace from controllers

## SYNOPSIS

**void nvme\_init\_ns\_detach\_ctrls** **(struct libnvme\_passthru\_cmd \*cmd** *,* **\_\_u32 nsid** *,* **struct nvme\_ctrl\_list \*ctrlist** *);*

## ARGUMENTS

- cmd

  Passthru command to use

- nsid

  Namespace ID to detach

- ctrlist

  Controller list buffer to modify attachment state of nsid

## DESCRIPTION

Initializes the passthru command buffer for the Namespace Detach command (NVME\_NS\_ATTACH\_SEL\_CTRL\_DEATTACH).
