Files
nomad/website/content/commands/volume/create.mdx
Allison Larson e16a3339ad Add CSI Volume Sentinel Policy scaffolding (#26438)
* Add ent policy enforcement stubs to CSI Volume create/register

* Wire policy override/warnings through CSI volume register/create

* Add new scope to sentinel apply

* Sanitize CSISecrets & CSIMountOptions

* Add sentinel policy scope to ui

* Update docs for new sentinel scope/policy

* Create new api funcs for CSI endpoints

* fix sentinel csi ui test

* Update sentinel-policy docs

* Add changelog

* Update docs from feedback
2025-08-07 12:03:18 -07:00

97 lines
3.4 KiB
Plaintext

---
layout: docs
page_title: 'nomad volume create command reference'
description: |
The `nomad volume create` command creates storage volumes that are either
Container Storage Interface (CSI) volumes or dynamic host volumes.
---
# `nomad volume create` command reference
The `volume create` command creates storage volumes as either [Container Storage
Interface (CSI)][csi] volumes or dynamic host volumes.
The `volume create` command can create dynamic host volumes if host volume
plugins are installed on the node, or CSI volumes if the CSI plugins implement
the [Controller][csi_plugins_internals] interface. The `volume create` command
automatically [registers][] the volume as well.
## Usage
```plaintext
nomad volume create [options] [file]
```
The `volume create` command requires a single argument, specifying the path to a
file containing a valid [volume specification][volume_specification]. Nomad
reads the file and submits the volume to the server for placement. If the
supplied path is "-", the volume file is read from STDIN. Otherwise the file is
read from the file at the supplied path.
When ACLs are enabled, this command requires a token with the appropriate
capability in the volume's namespace: the `csi-write-volume` capability for CSI
volumes or `host-volume-create` for dynamic host volumes.
## Options
- `-detach`: Return immediately instead of entering monitor mode for dynamic
host volumes. After creating a volume, Nomad prints the volume ID to the
screen, which you can use to examine the volume using the `volume status`
command. If `-detach` is omitted or false, the command monitors the state of
the volume until it has been fingerprinted by the client and is ready to be
scheduled. Not valid for CSI volumes.
- `-verbose`: Display full information when monitoring volume state. Used for
dynamic host volumes only. Not valid for CSI volumes.
- `-policy-override`: Sets the flag to force override any soft mandatory
Sentinel policies.
## Volume specification
Refer to the [CSI Volume Specification][csi_vol_spec] and the [Dynamic Host
Volume Specification][host_vol_spec] for further information.
## General options
@include 'general_options.mdx'
<!--
Redirection rules are applied server-side, so we can't redirect these sections
that used to be located in this page since they use URL fragments. Creating
these hidden anchors will at least point users to the new page, although not to
the exact section.
-->
<span id="volume-specification-parameters" />
<span id="id" />
<span id="namespace-1" />
<span id="name" />
<span id="type" />
<span id="plugin_id" />
<span id="snapshot_id" />
<span id="clone_id" />
<span id="capacity_min" />
<span id="capacity_max" />
<span id="capability" />
<span id="access_mode" />
<span id="attachment_mode" />
<span id="mount_options" />
<span id="fs_type" />
<span id="mount_flags" />
<span id="topology_request" />
<span id="secrets" />
<span id="parameters" />
<span id="topology_request-parameters" />
<span id="segments" />
<span id="unused-fields" />
[csi]: https://github.com/container-storage-interface/spec
[csi_plugins_internals]: /nomad/docs/architecture/storage/csi
[registers]: /nomad/commands/volume/register
[registered]: /nomad/commands/volume/register
[volume_specification]: /nomad/docs/other-specifications/volume
[csi_vol_spec]: /nomad/docs/other-specifications/volume/csi
[host_vol_spec]: /nomad/docs/other-specifications/volume/host