Skip to content
SHC Docs

shc volume mount

expose a volume’s data at a path on the daemon host

Bind a volume’s data at a path under the daemon’s state directory and print that path.

A name no block volume carries, given with -s, is that deployment’s data mount of that name on the daemon’s host, such as host-srv-media for a compose that names the host path /srv/media.

The bind is read-only unless --read-write, which exposes the live data to writes. A block volume attached to the daemon’s node is bound when it is mounted there. One attached to another node can be bound only when its data is mounted on the daemon’s host, and is refused otherwise. A detached one is attached to the daemon’s node first, its device mounted, and detached again when the mount is released; one whose device another node holds open is refused.

The mount is leased: the daemon releases it when --ttl runs out (1h by default). Release it sooner with shc volume umount <handle>; shc volume mounts lists what is held.

shc volume mount <volume-id|name> [flags]
-h, --help help for mount
--read-write mount it writable; the default is read-only
--ttl duration how long the mount lives before the daemon releases it (default 1h, at most 24h)
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default")
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-s, --stack string stack name (default: $SHC_STACK)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)
  • shc volume - manage and inspect cluster block volumes