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

# nvme\_ns\_mgmt\_create(2)

Create a non attached namespace

## NAME

nvme\_ns\_mgmt\_create - Create a non attached namespace

## SYNOPSIS

**int nvme\_ns\_mgmt\_create** **(int fd** *,* **struct nvme\_id\_ns \*ns** *,* **\_\_u32 \*nsid** *,* **\_\_u32 timeout** *,* **\_\_u8 csi** *,* **struct nvme\_ns\_mgmt\_host\_sw\_specified \*data** *);*

## ARGUMENTS

- fd

  File descriptor of nvme device

- ns

  Namespace identification that defines ns creation parameters

- nsid

  On success, set to the namespace id that was created

- timeout

  Override the default timeout to this value in milliseconds; set to 0 to use the system default.

- csi

  Command Set Identifier

- data

  Host Software Specified Fields that defines ns creation parameters

## DESCRIPTION

On successful creation, the namespace exists in the subsystem, but is not attached to any controller. Use the **nvme\_ns\_attach\_ctrls** to assign the namespace to one or more controllers.

## RETURN

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