Skip to content

Volumes

A volume gives a workload storage that survives container restarts. Brig has two classes, declared per workload in the [[volume]] block.

[[volume]]
mount = "/var/lib/data"

A local volume (the default class) is a node-pinned Docker named volume. It persists across restarts of the container on the same node, but it does not move with the workload — if a replica is rescheduled to another node, it gets a fresh empty volume there. Each replica has its own. Good for caches, scratch space, and single-node stateful workloads pinned with placement.

A compact form is also accepted for local volumes only:

volumes = ["/var/lib/data", "/tmp/cache"]
[[volume]]
mount = "/var/lib/db"
class = "ebs"
size_gib = 100 # required for ebs; 1..16384

An ebs volume is a cloud block device. It can detach from a failed node and re-attach where the replica lands, so the data follows the workload. Because a block device mounts to one node at a time, treat ebs volumes as single-writer — pair them with instances = 1 or placement.together/same_node_only for databases.

FieldLocalEBS
mountrequired, absolute pathrequired, absolute path
class"local" (default)"ebs"
size_gibnot allowedrequired, 1–16384
survives node lossnoyes
per-replicayesone device, single-writer

Local volumes live and die with their node and aren’t tracked individually. Cloud volumes are first-class resources you can list, inspect, and delete:

Terminal window
brig volume list # id, workload, volume, class, size, AZ, state, node
brig volume inspect <volume-id> # full JSON detail
brig volume delete <volume-id> # only when unbound or in error

A cloud volume moves through these states:

StateMeaning
unboundProvisioned but not attached. Safe to delete.
provisioningBeing created at the cloud provider.
attaching / preparingAttaching to a node and setting up the block device.
attachedMounted and in use.
detachingBeing removed from a node.
errorFailed. Inspect for the reason; safe to delete.

brig volume delete refuses unless the volume is unbound or error — you can’t pull a disk out from under a running replica. Scale the workload to zero or remove the volume from its spec first.

Volumes are backed up with snapshots — point-in-time, encrypted tarballs streamed to your own S3 bucket. Add a policy inline:

[[volume]]
mount = "/var/lib/db"
class = "ebs"
size_gib = 100
snapshot_every = "24h" # minimum 1h
snapshot_keep = 7 # 1..365 retained
snapshot_destination = "prod" # a workspace destination; omit = default

See Snapshots for on-demand backups, schedules, and restore, and Snapshot destinations for configuring the bucket.