ephemeral_disk Block
Placement | job -> group -> ephemeral_disk |
The ephemeral_disk
block describes the ephemeral disk requirements of the
group. Ephemeral disks can be marked as sticky and support live data migrations.
All tasks in this group will share the same ephemeral disk.
The ephemeral disk can be referenced under alloc/data/
. More information can
be found in the filesystem internals.
Each job's logs will be written to ephemeral disk space. See the logs documentation for more information.
ephemeral_disk
Parameters
migrate
(bool: false)
- Whensticky
is true, this specifies that the Nomad client should make a best-effort attempt to migrate the data from a remote machine if placement cannot be made on the original node. During data migration, the task will block starting until the data migration has completed. Migration is atomic and any partially migrated data will be removed if an error is encountered. Note that data migration will not take place if a client garbage collects a failed allocation or if the allocation has been intentionally stopped vianomad alloc stop
, because the original allocation has already been removed.size
(int: 300)
- Specifies the size of the ephemeral disk in MB. The current Nomad ephemeral storage implementation does not enforce this limit; however, it is used during job placement.sticky
(bool: false)
- Specifies that Nomad should make a best-effort attempt to place the updated allocation on the same machine. This will move thelocal/
andalloc/data
directories to the new allocation.
ephemeral_disk
Examples
The following examples only show the ephemeral_disk
blocks. Remember that the
ephemeral_disk
block is only valid in the placements listed above.
Sticky Volumes
This example shows enabling sticky volumes with Nomad using ephemeral disks: