---
name: "nvme_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_ns_attach"
---

# nvme\_ns\_attach(2)

Attach or detach namespace to controller(s)

## NAME

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

## SYNOPSIS

**int nvme\_ns\_attach** **(struct nvme\_ns\_attach\_args \*args** *);*

## ARGUMENTS

- args

  *struct nvme\_ns\_attach\_args* Argument structure

## RETURN

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