github.com/hhrutter/nomad@v0.6.0-rc2.0.20170723054333-80c4b03f0705/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)` - When `sticky` is true, this specifies that the 42 Nomad client should make a best-effort attempt to migrate the data from a 43 remote machine if placement cannot be made on the original node. During data 44 migration, the task will block starting until the data migration has completed. 45 46 - `size` `(int: 300)` - Specifies the size of the ephemeral disk in MB. The 47 current Nomad ephemeral storage implementation does not enforce this limit; 48 however, it is used during job placement. 49 50 - `sticky` `(bool: false)` - Specifies that Nomad should make a best-effort 51 attempt to place the updated allocation on the same machine. This will move 52 the `local/` and `alloc/data` directories to the new allocation. 53 54 ## `ephemeral_disk` Examples 55 56 The following examples only show the `ephemeral_disk` stanzas. Remember that the 57 `ephemeral_disk` stanza is only valid in the placements listed above. 58 59 ### Sticky Volumes 60 61 This example shows enabling sticky volumes with Nomad using ephemeral disks: 62 63 ```hcl 64 ephemeral_disk { 65 sticky = true 66 } 67 ``` 68 69 [resources]: /docs/job-specification/resources.html "Nomad resources Job Specification"