Files
nomad/website/content/docs/other-specifications/volume/index.mdx
Aimee Ukasick c12ad24de0 Docs: SEO updates to operations, other specs sections (#25518)
* seo operation section

* other specifications section

* Update website/content/docs/other-specifications/variables.mdx

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-05-22 07:47:05 -05:00

76 lines
2.1 KiB
Plaintext

---
layout: docs
page_title: Nomad volume specification
description: |-
Learn about the Nomad volume specification. Review an example volume specification. Create and register Container Storage Interface (CSI) and dynamic host volumes. Define capability, mount options, topology requests, secrets, and parameters.
---
# Nomad volume specification
This page provides reference information for the Nomad volume
specification. Create and register Container Storage Interface (CSI) and dynamic
host volumes using the [`volume create`][] and [`volume register`][] commands
and the equivalent API endpoints. Define capability, mount options, topology
requests, secrets, and parameters.
Some attributes are only be supported by one volume type or the other, or a
specific operation, while others may have a different meaning for each action,
so read the documentation for each attribute carefully.
* [CSI volume specification][csi_spec]
* [Dynamic host volume specification][dhv_spec]
Provide the file as either HCL or JSON to the commands and as JSON to
the API.
This example HCL configuration is for a CSI volume.
```hcl
id = "ebs_prod_db1"
namespace = "default"
name = "database"
type = "csi"
plugin_id = "ebs-prod"
snapshot_id = "snap-12345" # or clone_id, see below
capacity_max = "200G"
capacity_min = "100G"
capability {
access_mode = "single-node-reader-only"
attachment_mode = "file-system"
}
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
mount_options {
fs_type = "ext4"
mount_flags = ["noatime"]
}
topology_request {
required {
topology { segments { "rack" = "R2" } }
topology { segments { "rack" = "R1", "zone" = "us-east-1a"} }
}
preferred {
topology { segments { "rack" = "R1", "zone" = "us-east-1a"} }
}
}
secrets {
example_secret = "xyzzy"
}
parameters {
skuname = "Premium_LRS"
}
```
[`volume create`]: /nomad/docs/commands/volume/create
[`volume register`]: /nomad/docs/commands/volume/register
[csi_spec]: /nomad/docs/other-specifications/volume/csi
[dhv_spec]: /nomad/docs/other-specifications/volume/host