---
title: "Creates a single volume with given spec."
method: POST
path: "/osd-volumes"
tags: ["volume", "create"]
---

# Creates a single volume with given spec.

`POST /osd-volumes`

## Request body

- VolumeCreateRequest — VolumeCreateRequest is a structure that has the locator, source and spec to create a volume
  - `locator` VolumeLocator — VolumeLocator is a structure that is attached to a volume and is used to carry opaque metadata.
    - `name` string — User friendly identifier
    - `volume_labels` object — A set of name-value pairs that acts as search filters
  - `source` Source — Source is a structure that can be given to a volume to seed the volume with data.
    - `parent` string — A volume id, if specified will create a clone of the parent.
    - `seed` string — Seed will seed the volume from the specified URI Any additional config for the source comes from the labels in the spec
  - `spec` VolumeSpec
    - `aggregation_level` integer — Aggregatiokn level Specifies the number of parts the volume can be aggregated from.
    - `block_size` integer — BlockSize for the filesystem.
    - `cascaded` boolean — Cascaded is true if this volume can be populated on any node from an external source.
    - `compressed` boolean — Compressed is true if this volume is to be compressed.
    - `cos` integer
    - `dedupe` boolean — Dedupe specifies if the volume data is to be de-duplicated.
    - `encrypted` boolean — Encrypted is true if this volume will be cryptographically secured.
    - `ephemeral` boolean — Ephemeral storage
    - `format` integer
    - `group` Group — Group represents VolumeGroup / namespace All volumes in the same group share this object.
      - `id` string — Id common identifier across volumes that have the same group.
    - `group_enforced` boolean — GroupEnforced is true if consistency group creation is enforced.
    - `ha_level` integer — HaLevel specifies the number of copies of data.
    - `io_profile` integer
    - `journal` boolean — Journal is true if data for the volume goes into the journal.
    - `nfs` boolean — Nfs is true if this volume can be accessed via nfs.
    - `passphrase` string — Passphrase for an encrypted volume
    - `replica_set` ReplicaSet — ReplicaSet set of machine IDs (nodes) to which part of this volume is erasure coded - for clustered storage arrays
      - `nodes` string[]
    - `scale` integer — Scale allows autocreation of volumes.
    - `shared` boolean — Shared is true if this volume can be remotely accessed.
    - `size` integer — Size specifies the thin provisioned volume size.
    - `snapshot_interval` integer — SnapshotInterval in minutes, set to 0 to disable snapshots
    - `snapshot_schedule` string — SnapshotSchedule a well known string that specifies when snapshots should be taken.
    - `sticky` boolean — Sticky volumes cannot be deleted until the flag is removed.
    - `volume_labels` object — VolumeLabels configuration labels

## Response `200`

volume create response

- VolumeCreateResponse
  - `id` string — ID of the newly created volume
  - `volume_response` VolumeResponse
    - `error` string

## Other responses

- `default` — unexpected error

## Changes

- **2017-12-05** `d79082f863d1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/libopenstorage/apis/osd-api/changes/osd-volumes/post.md)

---

[API](https://skmtc.dev/libopenstorage/apis/osd-api.md) · [All operations](https://skmtc.dev/libopenstorage/apis/osd-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/libopenstorage/osd-api/revisions/d79082f863d1/schema)
