github.com/ncodes/nomad@v0.5.7-0.20170403112158-97adf4a74fb3/website/source/docs/job-specification/ephemeral_disk.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "ephemeral_disk Stanza - Job Specification" 4 sidebar_current: "docs-job-specification-ephemeral_disk" 5 description: |- 6 The "ephemeral_disk" stanza describes the ephemeral disk requirements of the 7 group. Ephemeral disks can be marked as sticky and support live data 8 migrations. 9 --- 10 11 # `ephemeral_disk` Stanza 12 13 <table class="table table-bordered table-striped"> 14 <tr> 15 <th width="120">Placement</th> 16 <td> 17 <code>job -> group -> **ephemeral_disk**</code> 18 </td> 19 </tr> 20 </table> 21 22 23 The `ephemeral_disk` stanza describes the ephemeral disk requirements of the 24 group. Ephemeral disks can be marked as sticky and support live data migrations. 25 All tasks in this group will share the same ephemeral disk. 26 27 ```hcl 28 job "docs" { 29 group "example" { 30 ephemeral_disk { 31 migrate = true 32 size = "500" 33 sticky = true 34 } 35 } 36 } 37 ``` 38 39 ## `ephemeral_disk` Parameters 40 41 - `migrate` `(bool: false)` - Specifies that the Nomad client should make a 42 best-effort attempt to migrate the data from a remote machine if placement 43 cannot be made on the original node. During data migration, the task will 44 block starting until the data migration has completed. 45 46 - `size` `(int: 300)` - Specifies the size of the ephemeral disk in MB. 47 48 - `sticky` `(bool: false)` - Specifies that Nomad should make a best-effort 49 attempt to place the updated allocation on the same machine. This will move 50 the `local/` and `alloc/data` directories to the new allocation. 51 52 ## `ephemeral_disk` Examples 53 54 The following examples only show the `ephemeral_disk` stanzas. Remember that the 55 `ephemeral_disk` stanza is only valid in the placements listed above. 56 57 ### Sticky Volumes 58 59 This example shows enabling sticky volumes with Nomad using ephemeral disks: 60 61 ```hcl 62 ephemeral_disk { 63 sticky = true 64 } 65 ``` 66 67 [resources]: /docs/job-specification/resources.html "Nomad resources Job Specification"