Nomad
Host volumes
Introduction
Host volumes mount paths from the Nomad client into allocations. Nomad is aware of host volume availability and makes use of it for job scheduling. However, Nomad does not know about the volume's underlying characteristics, such as if it is a standard folder on a local ext4 filesystem, if it is backed by a distributed networked storage such as GlusterFS, or if it is a mounted NFS/CIFS volume from a NAS or a public cloud service such as AWS EFS. Therefore, you can use host volumes for both local semi-persistent storage and for highly persistent networked storage. Host volumes may be dynamic or static.
Host volumes backed by local storage help persist data that is neither critical nor readily restorable. Examples include an on-disk cache that can be rebuilt, or a clustered application where a single node can rebuild its state from the rest of the cluster. When backed by networked storage such as NFS/CIFS-mounted volumes or distributed storage with GlusterFS or Ceph, host volumes provide a quick option to consume highly available and reliable storage.
Dynamic host volumes
Provision dynamic host volumes
with the volume create
command or
API. ACL policies
allow delegation of control for storage within a namespace to Nomad
Operators. The dynamic host volume plugin
specification allows you to
develop plugins specific to your local storage environment. For example, in an
on-prem cluster you could write a plugin to perform LVM thin-provisioning.
Static host volumes
Declare static host volumes in the Nomad agent's configuration file. You must restart the Nomad client to reconfigure them. These restarts make static host volumes impractical if you frequently change your storage configuration. Furthermore, it might require coordination between different personas to configure and consume host volumes. For example, a Nomad Administrator must modify Nomad's configuration file to add, update, and remove host volumes to make them available for consumption by Nomad Operators. Or, with networked host volumes, a Storage Administrator needs to provision the volumes and makes them available to the Nomad clients. A System Administrator then mounts them on the Nomad clients.