---
name: "nvme_namespace_attach_ctrls"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_namespace_attach_ctrls"
---

# nvme\_namespace\_attach\_ctrls(2)

Attach namespace to controller(s)

## NAME

nvme\_namespace\_attach\_ctrls - Attach namespace to controller(s)

## SYNOPSIS

**int nvme\_namespace\_attach\_ctrls** **(int fd** *,* **\_\_u32 nsid** *,* **\_\_u16 num\_ctrls** *,* **\_\_u16 \*ctrlist** *);*

## ARGUMENTS

- fd

  File descriptor of nvme device

- nsid

  Namespace ID to attach

- num\_ctrls

  Number of controllers in ctrlist

- ctrlist

  List of controller IDs to perform the attach action

## RETURN

The nvme command status if a response was received (see *enum nvme\_status\_field*) or -1 with errno set otherwise.
