Skip to content
SHC Docs

shc storage

The shc storage commands manage storage providers, the backends that hold deployment state (compose files, persistent volumes, generated files, and app definitions). SHC supports three provider kinds:

KindShared across nodesManaged by SHCTypical path
localNoNo/var/lib/shc or custom
nfsYesYes (singleton)/mnt/shc/nfs
cephfsYesYes (singleton)/mnt/shc/cephfs

Every deployment pins exactly one storage provider via shc install --storage <name> or defaults to the tenant/environment default.

  • Managed providers are brought up and torn down by SHC. There is at most one of each kind (nfs, cephfs) per cluster, and their names are reserved.
  • External providers are local-kind entries that point at an existing mount. They are the only kind you create with shc storage add.
  • Links associate a provider with specific nodes. Managed providers link themselves; external providers are linked via shc storage link.

List all storage providers known to the cluster.

Terminal window
shc storage ls
shc storage ls --type cephfs
shc storage ls --node node01
shc storage ls --managed
shc storage ls --external

Options:

FlagShortDescription
--typeFilter by provider kind (local, nfs, cephfs)
--node-nFilter to providers linked to a node
--managedShow only SHC-managed providers
--externalShow only external providers

Default columns are name, type, filesystem, managed, quota, snapshot, nodes (count of linked nodes), and path. Output format follows the global -o/--output flag (tty|text|json|yaml).

Show full details for one provider.

Terminal window
shc storage show local-ssd

Returns the provider id, path, filesystem, quota and snapshot capability, config blob, and the list of linked nodes.

Register an existing mount as an external local-kind provider.

Terminal window
shc storage add local-ssd --path /var/lib/shc-ssd
shc storage add local-ssd --path /var/lib/shc-ssd --node node01

Options:

FlagShortDescription
--path-pMount path on the target node (required)
--node-nNode to link; defaults to no link (link later with shc storage link)

Rules:

  • The name must not be one of the reserved managed-provider names local, nfs, cephfs.
  • For managed providers, use shc storage nfs enable or shc storage cephfs enable instead.

Remove a provider from the inventory.

Terminal window
shc storage rm local-ssd
shc storage rm local-ssd --force

By default the delete is refused if any stack still uses the provider. --force skips that check.

Attach or detach an external provider to one or more nodes.

Terminal window
shc storage link local-ssd node01 node02
shc storage unlink local-ssd node01

Both commands take the provider name followed by one or more node ids. Managed providers manage their own links.

Managed NFS is a single kernel NFS server exported from one cluster node, mounted by every other node at /mnt/shc/nfs. It is created and torn down by SHC.

Bring up managed NFS on the cluster.

Terminal window
shc storage nfs enable
shc storage nfs enable --export-path /mnt/shc/nfs --network 10.42.0.0/24

Options:

FlagDefaultDescription
--export-path/mnt/shc/nfsBase export path on the server node
--network(auto)CIDR allowed to mount the export

Tear down managed NFS. Fails if stacks still reference it.

Terminal window
shc storage nfs disable

Show NFS server role, export path, and per-node mount state.

Terminal window
shc storage nfs status
shc storage nfs status -v

Pin the NFS server role onto a node.

Terminal window
shc storage nfs join # pin local node
shc storage nfs join --node node02 # pin a specific node

Release the NFS server role from the pinned node. SHC will re-elect another voter as server.

Terminal window
shc storage nfs leave
shc storage nfs leave --node node02

Managed CephFS gives the cluster a replicated, distributed filesystem mounted at /mnt/shc/cephfs. Each node that contributes capacity runs one or more Ceph OSDs backed by a block device. Monitors and the MDS are placed on voter nodes.

Enable CephFS across the cluster. Requires at least one voter node.

Terminal window
shc storage cephfs enable

Note: multi-node enable (key distribution, monmap bootstrap, MDS/MGR deployment) is not yet automated — the command is wired up end-to-end and will succeed once the deployment path lands.

Tear down CephFS, stopping local monitors, MDS, and OSDs and removing the mount.

Terminal window
shc storage cephfs disable

Show cluster health, OSD counts, and per-node daemon state.

Terminal window
shc storage cephfs status

Contribute a local block device as a new OSD.

Terminal window
shc storage cephfs join --device /dev/sdb
shc storage cephfs join --device /dev/sdb --node node03

Options:

FlagShortDescription
--deviceBlock device to consume (required, e.g. /dev/sdb)
--node-nNode to add the OSD on; defaults to local

Remove an OSD from the cluster, waiting for rebalance by default.

Terminal window
shc storage cephfs leave --osd-id 3
shc storage cephfs leave --osd-id 3 --force

Options:

FlagShortDescription
--osd-idOSD id to remove (required)
--force-fSkip the wait for rebalance

shc node leave automatically drains and removes every local OSD before the node exits the cluster, so manual cephfs leave is only needed for capacity management.

Pin a storage provider at install time:

Terminal window
shc install nextcloud --storage cephfs
shc install nextcloud --storage local-ssd
shc install nextcloud --storage nfs --stack cloud --environment prod

If --storage is omitted, SHC picks the tenant/environment default. Swarm-mode stacks require a shared provider (nfs or cephfs); local is rejected for Swarm.

CommandDescription
shc storage lsList providers
shc storage show <name>Show one provider
shc storage add <name> --path ...Register an external local provider
shc storage rm <name>Remove a provider
shc storage link <name> <node>...Link external provider to nodes
shc storage unlink <name> <node>...Unlink external provider from nodes
shc storage nfs enableBring up managed NFS
shc storage nfs disableTear down managed NFS
shc storage nfs statusShow NFS status
shc storage nfs joinPin NFS server role to a node
shc storage nfs leaveRelease NFS server role from a node
shc storage cephfs enableBring up managed CephFS
shc storage cephfs disableTear down managed CephFS
shc storage cephfs statusShow CephFS status
shc storage cephfs join --deviceContribute a disk as an OSD
shc storage cephfs leave --osd-idRemove an OSD