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

# nvme\_identify\_ns(2)

Retrieves nvme identify namespace

## NAME

nvme\_identify\_ns - Retrieves nvme identify namespace

## SYNOPSIS

**int nvme\_identify\_ns** **(int fd** *,* **\_\_u32 nsid** *,* **struct nvme\_id\_ns \*ns** *);*

## ARGUMENTS

- fd

  File descriptor of nvme device

- nsid

  Namespace to identify

- ns

  User space destination address to transfer the data

## DESCRIPTION

If the Namespace Identifier (NSID) field specifies an active NSID, then the Identify Namespace data structure is returned to the host for that specified namespace.

If the controller supports the Namespace Management capability and the NSID field is set to NVME\_NSID\_ALL, then the controller returns an Identify Namespace data structure that specifies capabilities that are common across namespaces for this controller.

See *struct nvme\_id\_ns* for details on the structure returned.

## RETURN

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