---
title: "Create a new NVMeoF namespace."
method: POST
path: "/api/nvmeof/subsystem/{nqn}/namespace"
tags: ["NVMe-oF Subsystem Namespace"]
---

# Create a new NVMeoF namespace.

`POST /api/nvmeof/subsystem/{nqn}/namespace`

## Path parameters

- `nqn` string, required

## Request body

- object
  - `block_size` integer — NVMeoF namespace block size
  - `create_image` boolean — Create RBD image
  - `disable_auto_resize` string — Disable auto resize
  - `encryption_algorithm` string — Algorithm to use for encryption
  - `encryption_format` string[] — Encryption format(s) to use, LUKS1 or LUKS2, separated by commas
  - `force` boolean — Force create namespace even it image is used by other namespace
  - `gw_group` string — NVMeoF gateway group
  - `key_id` string[] — Key ID(s) to use for encryption pass phrases, separated by commas
  - `load_balancing_group` integer — Load balancing group
  - `location` string — Gateway location for namespace
  - `no_auto_visible` boolean — Namespace will be visible only for the allowed hosts
  - `nsid` string — Namespace ID
  - `rados_namespace` string — RADOS namespace name
  - `rbd_data_pool` string — RBD data pool name
  - `rbd_image_name` string, required — RBD image name
  - `rbd_image_size` integer — RBD image size
  - `rbd_pool` string — RBD pool name
  - `read_only` string — Read only namespace
  - `server_address` string — NVMeoF gateway address
  - `size` integer — Deprecated. Use `rbd_image_size` instead
  - `traddr` string — NVMeoF gateway address (deprecated)
  - `trash_image` boolean — Trash the RBD image when namespace is removed
  - `uuid` string — UUID

## Response `201`

Resource created.

- object

## Other responses

- `202` — Operation is still executing. Please check the task queue.
- `400` — Operation exception. Please check the response body for details.
- `401` — Unauthenticated access. Please login first.
- `403` — Unauthorized access. Please check your permissions.
- `500` — Unexpected error. Please check the response body for the stack trace.

---

[API](https://skmtc.net/ceph/apis/ceph-rest-api.md) · [All operations](https://skmtc.net/ceph/apis/ceph-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ceph/ceph-rest-api/revisions/b03ae23c3806/schema)
