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

# nvme\_mi\_admin\_ns\_attach(2)

Attach or detach namespace to controller(s)

## NAME

nvme\_mi\_admin\_ns\_attach - Attach or detach namespace to controller(s)

## SYNOPSIS

**int nvme\_mi\_admin\_ns\_attach** **(nvme\_mi\_ctrl\_t ctrl** *,* **struct nvme\_ns\_attach\_args \*args** *);*

## ARGUMENTS

- ctrl

  Controller to send command to

- args

  Namespace Attach command arguments

## RETURN

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