CLI

mgx-cli ships in the node image and is on PATH on every node, control plane and data plane alike. Nodes are equivalent: they are members of one cluster, so whichever one you land on can drive the whole thing — there is no designated admin host to find first.

It talks to the same HTTP/S JSON RPC API the CSI driver uses, so anything the driver can do you can do by hand, and vice versa.

Start a session

sh
mgx-cli

It defaults to 127.0.0.1:8082 — the API on the node you are logged into. Log in to pick up the command set:

text
mgx-core:127.0.0.1:nologin> login admin --cluster main --ns main
Password:
 logged..
mgx-core:127.0.0.1:main:main:admin>

The password is MGX_GW_ADMIN_PASSWD from the node secrets — see Install the storage cluster.

Flags

FlagDefault
--host127.0.0.1API host. Point it at another node to drive that one.
--port8082API port.
--tls / --tls_verifynTLS, and whether to verify the certificate.
--timeout30Request timeout, seconds.
--verbosenLog the HTTP exchange — useful when an operation fails.
--homedir~/.mgxSession state and history.

Commands

login, logout, resource, help and quit are always there. Everything else is discovered from the API when you log in, one group per plugin core spawned — so the command set is the cluster's own surface rather than a version baked into the binary, and a control-plane node offers a different set from a data-plane node.

text
mgx-core:127.0.0.1:main:main:admin> help
mgx-core:127.0.0.1:main:main:admin> help cluster
GroupWhat it drives
clusterMembership and lifecycle: nodes, free nodes, plugins and the plugin repo, the VIP, versions, metrics
storageVolumes and volume configs — create, start, stop, resize, clean, delete
cacheCache pools, pool configs, node mounts
snapshotSnapshot configs, snapshots and restores
mgmtThe downstream pool registry a management plane keeps, and its request log
schedulerPlacement configs, and draining or uncordoning a node

help <group> lists what a group has, and -h on any command prints its flags:

text
mgx-core:127.0.0.1:main:main:admin> storage volume add -h