github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/other-specifications/volume/capability.mdx (about) 1 --- 2 layout: docs 3 page_title: capability Block - Volume Specification 4 description: The "capability" block allows for validating the capability of a volume. 5 --- 6 7 # `capability` Block 8 9 <Placement 10 groups={[ 11 ['volume', 'capability'], 12 ]} 13 /> 14 15 The `capability` block allows validating that a volume meets the requested 16 capabilities. 17 18 ```hcl 19 id = "ebs_prod_db1" 20 namespace = "default" 21 name = "database" 22 type = "csi" 23 plugin_id = "ebs-prod" 24 capacity_max = "200G" 25 capacity_min = "100G" 26 27 capability { 28 access_mode = "single-node-reader-only" 29 attachment_mode = "file-system" 30 } 31 ``` 32 33 You must provide at least one `capability` block, and you must provide a block 34 for each capability you intend to use in a job's [`volume`] block. 35 36 ## `capability` Parameters 37 38 - `access_mode` `(string: <required>)` - Defines whether a volume should be 39 available concurrently. Can be one of `"single-node-reader-only"`, 40 `"single-node-writer"`, `"multi-node-reader-only"`, 41 `"multi-node-single-writer"`, or `"multi-node-multi-writer"`. Most CSI plugins 42 support only single-node modes. Consult the documentation of the storage 43 provider and CSI plugin. 44 45 - `attachment_mode` `(string: <required>)` - The storage API that will be used 46 by the volume. Most storage providers will support `"file-system"`, to mount 47 volumes using the CSI filesystem API. Some storage providers will support 48 `"block-device"`, which will mount the volume with the CSI block device API 49 within the container. 50 51 ## `capability` Examples 52 53 The following examples only show the `capability` blocks. Remember that the 54 `capability` block is only valid in the placement shown above. 55 56 ### Multiple capabilities 57 58 This examples shows a volume that must satisfy multiple capability 59 requirements. 60 61 ```hcl 62 capability { 63 access_mode = "single-node-reader-only" 64 attachment_mode = "file-system" 65 } 66 67 capability { 68 access_mode = "single-node-writer" 69 attachment_mode = "file-system" 70 } 71 ``` 72 73 [`volume`]: /docs/job-specification/volume