Nomad
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.
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.
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"
}