delonix volumes

Volumes nomeados e bind mounts: create, ls, inspect, rm, apply.

Named volumes and bind mounts: create, ls, inspect, rm, apply.

Wrapper fino sobre o VolumeStore. No container run, -v nome:/destino[:ro] resolve para um volume nomeado (criado on-demand) e -v /host:/destino[:ro] para um bind mount — a distinção é automática.

A thin wrapper over VolumeStore. In container run, -v name:/dest[:ro] resolves to a named volume (created on demand) and -v /host:/dest[:ro] to a bind mount — the distinction is automatic.

Usage: dlx volumes [OPTIONS] <COMMAND>

Commands:
  create    Create a named volume
  ls        List the volumes
  inspect   Details of a volume (includes real on-disk usage)
  describe  Readable detail of one or more volumes, `kubectl describe` style (for humans; use `inspect` for the usual compact view)
  rm        Remove a volume. Refuses while a container or a `kind: ShareVolume` still references it (use `--force` to remove it anyway)
  apply     Apply the `kind: Volume` documents from a manifest (idempotent by name)
  snapshot  Point-in-time snapshots of a volume (tar.gz under the volume; safe in rootless)
  help      Print this message or the help of the given subcommand(s)

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

volumes snapshot

Point-in-time snapshots of a volume (tar.gz under the volume; safe in rootless)

Usage: dlx volumes snapshot [OPTIONS] <COMMAND>

Commands:
  create   Create a snapshot NOW (default name: UTC timestamp)
  ls       List the snapshots of a volume
  restore  Restore a snapshot INTO the volume (replaces the current data — stop the consumers first)
  rm       Delete a snapshot
  help     Print this message or the help of the given subcommand(s)

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Tirar e listar snapshots de um volume
delonix volumes snapshot create dados antes-da-migracao
delonix volumes snapshot ls dados

volumes describe

Readable detail of one or more volumes, kubectl describe style (for humans; use inspect for the usual compact view)

Usage: dlx volumes describe [OPTIONS] <NAMES>...

Arguments:
  <NAMES>...  

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Detalhe de um volume (uso, quota, montagens)
delonix volumes describe dados

volumes create

Create a named volume

Usage: dlx volumes create [OPTIONS] <NAME>

Arguments:
  <NAME>  

Options:
      --driver <DRIVER>    `local` (default) or `nfs` [default: local]
      --l18n <en|pt>       Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
      --device <DEVICE>    Device/export (`nfs` driver)
      --options <OPTIONS>  Additional mount options (`nfs` driver)
      --quota <QUOTA>      Quota (e.g. `2g`) — only applied if `--quota` is given
  -h, --help               Print help

Exemplos

Com quota e driver nfs disponíveis
delonix volumes create dados --quota 10G

volumes ls

List the volumes

Usage: dlx volumes ls [OPTIONS]

Options:
      --l18n <en|pt>     Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -o, --output <OUTPUT>  Output format: `table` (default) or `json` (ADR-0005) [default: table] [possible values: table, json]
  -h, --help             Print help

Exemplos

delonix volumes ls

volumes inspect

Details of a volume (includes real on-disk usage)

Usage: dlx volumes inspect [OPTIONS] <NAME>

Arguments:
  <NAME>  

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

delonix volumes inspect dados

volumes rm

Remove a volume. Refuses while a container or a kind: ShareVolume still references it (use --force to remove it anyway)

Usage: dlx volumes rm [OPTIONS] <NAME>

Arguments:
  <NAME>  

Options:
  -f, --force         Remove it even with live references — DESTROYS the data of whatever is still using it
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

delonix volumes rm dados

volumes apply

Apply the kind: Volume documents from a manifest (idempotent by name)

Usage: dlx volumes apply [OPTIONS]

Options:
  -f, --file <FILE>   
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

delonix volumes apply -f delonix-manifest.yaml

LaboratórioLab

Prova que um volume nomeado sobrevive a um restart do container — ao contrário de escrever directamente no rootfs.

delonix volumes create dados
delonix container run -d --name db -v dados:/var/lib/data alpine sleep infinity
delonix container exec db sh -c 'echo ok > /var/lib/data/marca'
delonix container stop db && delonix container start db
delonix container exec db cat /var/lib/data/marca

Prove a named volume survives a container restart — unlike writing straight to the rootfs.

delonix volumes create data
delonix container run -d --name db -v data:/var/lib/data alpine sleep infinity
delonix container exec db sh -c 'echo ok > /var/lib/data/mark'
delonix container stop db && delonix container start db
delonix container exec db cat /var/lib/data/mark

DesafioChallenge

Tira um snapshot do volume dados depois de escrever nele, e usa volumes describe para veres o histórico de snapshots.

Take a snapshot of the data volume after writing to it, and use volumes describe to see the snapshot history.