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:
| Kind | Shared across nodes | Managed by SHC | Typical path |
|---|---|---|---|
local | No | No | /var/lib/shc or custom |
nfs | Yes | Yes (singleton) | /mnt/shc/nfs |
cephfs | Yes | Yes (singleton) | /mnt/shc/cephfs |
Every deployment pins exactly one storage provider via shc install --storage <name> or defaults to the tenant/environment default.
Concepts
Section titled “Concepts”- 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 withshc storage add. - Links associate a provider with specific nodes. Managed providers link themselves; external providers are linked via
shc storage link.
Inventory
Section titled “Inventory”shc storage ls
Section titled “shc storage ls”List all storage providers known to the cluster.
shc storage lsshc storage ls --type cephfsshc storage ls --node node01shc storage ls --managedshc storage ls --externalOptions:
| Flag | Short | Description |
|---|---|---|
--type | Filter by provider kind (local, nfs, cephfs) | |
--node | -n | Filter to providers linked to a node |
--managed | Show only SHC-managed providers | |
--external | Show 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).
shc storage show
Section titled “shc storage show”Show full details for one provider.
shc storage show local-ssdReturns the provider id, path, filesystem, quota and snapshot capability, config blob, and the list of linked nodes.
External Providers
Section titled “External Providers”shc storage add
Section titled “shc storage add”Register an existing mount as an external local-kind provider.
shc storage add local-ssd --path /var/lib/shc-ssdshc storage add local-ssd --path /var/lib/shc-ssd --node node01Options:
| Flag | Short | Description |
|---|---|---|
--path | -p | Mount path on the target node (required) |
--node | -n | Node 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 enableorshc storage cephfs enableinstead.
shc storage rm
Section titled “shc storage rm”Remove a provider from the inventory.
shc storage rm local-ssdshc storage rm local-ssd --forceBy default the delete is refused if any stack still uses the provider. --force skips that check.
shc storage link / shc storage unlink
Section titled “shc storage link / shc storage unlink”Attach or detach an external provider to one or more nodes.
shc storage link local-ssd node01 node02shc storage unlink local-ssd node01Both commands take the provider name followed by one or more node ids. Managed providers manage their own links.
NFS (Managed)
Section titled “NFS (Managed)”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.
shc storage nfs enable
Section titled “shc storage nfs enable”Bring up managed NFS on the cluster.
shc storage nfs enableshc storage nfs enable --export-path /mnt/shc/nfs --network 10.42.0.0/24Options:
| Flag | Default | Description |
|---|---|---|
--export-path | /mnt/shc/nfs | Base export path on the server node |
--network | (auto) | CIDR allowed to mount the export |
shc storage nfs disable
Section titled “shc storage nfs disable”Tear down managed NFS. Fails if stacks still reference it.
shc storage nfs disableshc storage nfs status
Section titled “shc storage nfs status”Show NFS server role, export path, and per-node mount state.
shc storage nfs statusshc storage nfs status -vshc storage nfs join
Section titled “shc storage nfs join”Pin the NFS server role onto a node.
shc storage nfs join # pin local nodeshc storage nfs join --node node02 # pin a specific nodeshc storage nfs leave
Section titled “shc storage nfs leave”Release the NFS server role from the pinned node. SHC will re-elect another voter as server.
shc storage nfs leaveshc storage nfs leave --node node02CephFS (Managed)
Section titled “CephFS (Managed)”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.
shc storage cephfs enable
Section titled “shc storage cephfs enable”Enable CephFS across the cluster. Requires at least one voter node.
shc storage cephfs enableNote: 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.
shc storage cephfs disable
Section titled “shc storage cephfs disable”Tear down CephFS, stopping local monitors, MDS, and OSDs and removing the mount.
shc storage cephfs disableshc storage cephfs status
Section titled “shc storage cephfs status”Show cluster health, OSD counts, and per-node daemon state.
shc storage cephfs statusshc storage cephfs join
Section titled “shc storage cephfs join”Contribute a local block device as a new OSD.
shc storage cephfs join --device /dev/sdbshc storage cephfs join --device /dev/sdb --node node03Options:
| Flag | Short | Description |
|---|---|---|
--device | Block device to consume (required, e.g. /dev/sdb) | |
--node | -n | Node to add the OSD on; defaults to local |
shc storage cephfs leave
Section titled “shc storage cephfs leave”Remove an OSD from the cluster, waiting for rebalance by default.
shc storage cephfs leave --osd-id 3shc storage cephfs leave --osd-id 3 --forceOptions:
| Flag | Short | Description |
|---|---|---|
--osd-id | OSD id to remove (required) | |
--force | -f | Skip 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.
Using a provider in a deployment
Section titled “Using a provider in a deployment”Pin a storage provider at install time:
shc install nextcloud --storage cephfsshc install nextcloud --storage local-ssdshc install nextcloud --storage nfs --stack cloud --environment prodIf --storage is omitted, SHC picks the tenant/environment default. Swarm-mode stacks require a shared provider (nfs or cephfs); local is rejected for Swarm.
Command summary
Section titled “Command summary”| Command | Description |
|---|---|
shc storage ls | List 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 enable | Bring up managed NFS |
shc storage nfs disable | Tear down managed NFS |
shc storage nfs status | Show NFS status |
shc storage nfs join | Pin NFS server role to a node |
shc storage nfs leave | Release NFS server role from a node |
shc storage cephfs enable | Bring up managed CephFS |
shc storage cephfs disable | Tear down managed CephFS |
shc storage cephfs status | Show CephFS status |
shc storage cephfs join --device | Contribute a disk as an OSD |
shc storage cephfs leave --osd-id | Remove an OSD |
See Also
Section titled “See Also”- File Locations — where provider data lives on disk
- App Commands —
--storageflag onshc install - Node Commands — join/leave and OSD drain behavior
- Data Model — deployment state layout