NEXItaliano

NEXFS › Manual pages › nexfsctl(8)

NEXFSCTL(8) NEXFS Administration NEXFSCTL(8)

nexfsctl - administration of a NEXFS cluster: status, nodes, copies, maintenance, control store

nexfsctl [-c FILE] COMMAND [ARGUMENTS]

Talks to the meta nodes of the cluster, using the certificate from the configuration. Every command answers with a JSON object on one line (errors too: {"error": "...", "code": -N}). Exit code: 0 success, 1 error, 2 malformed command. Commands that change the cluster are accepted only from administrators: the meta nodes and the names listed in admins in their configuration.

a meta node answers; the majority answers; the status of the answering node.
the cluster status in a single call: ok, warning or error, the reasons, nodes, blocks, rebuild, space, traffic.
total and free space, files, number of copies, conversion in progress.

the number of copies for the cluster (1 to 4), applied to new blocks and, in the background, to existing ones.
the number of copies (1, 2 or 3) of a directory and everything below it.
rebalancing of copies across the data nodes, at a limited rate.

the data nodes with their status; the admitted names.
admits a certificate as a data node (or as a joining meta node), or withdraws the admission; a new name beyond the node limit of the edition is refused (-122). Clients appear as c/NAME, and revoke c/NAME removes one.
[--port N] [--disk DIR]... [--state-dir DIR] [--ca|--cert|--key FILE] [--encryption-key FILE] [--no-service]
adds THIS machine as a data node: writes the configuration (based on the FILE of a cluster node), prepares the directories, starts the service and waits for the node to register.
the node stops for a short while: its copies are not rebuilt elsewhere.
drains the node: its copies move to the others. With --dry-run it only tells whether it could (allowed, problems, warnings), changing nothing.
removes a drained, powered-off node (and its admission).
one more disk for THIS data node (as root, on the node). The folder is the root of a new disk, already mounted and empty, on a filesystem other than the other disks of the node. It goes at the end of disks in the configuration, the service may write it (owner nexfs, ReadWritePaths in the drop-in) and nexfsd restarts in an orderly way (not with --no-restart). At start the disk joins those of the node; new blocks are created on the disk with the most free space, those already there stay where they are. 16 disks at most.

The edition sets how many nodes the cluster can have, counting meta nodes, data nodes and clients: Free up to 4 without a license, a 30-day trial once per cluster, Base up to 32, Enterprise up to 128. Only new nodes are refused when the limit is reached; the license is in the control store.

edition, state (none, valid, expiring, expired, invalid), limit and nodes counted.
starts the 30-day trial (once per cluster).
installs the signed license downloaded from the NEX website.
removes the license: back to the Free edition.

the cluster members: whether each one votes, and the witness (learners, still catching up, are in status).
with the same options as node add: (and also --ca-key, like init) adds THIS machine as a meta node (and data node, with --disk); it receives the index and, once caught up, votes. It must first be admitted with node allow.
the state level of the metadata and how far all meta nodes can go; with --raise it raises it, only if every meta node answers and can apply it. It is done at the end of an upgrade (the meta_level_low reason of health, a notice, reminds you). Afterwards you do not go back to a version that does not know it.
the meta node leaves the cluster (never the leader, never the last voter).
the meta node does not vote until it returns.
after a full shutdown, if a meta node will not return: the nodes present restart from what they have on disk.

[--port N] [--disk DIR] [--state-dir DIR] [--ca|--cert|--key FILE] [--encryption-key FILE] [--ca-key FILE] [--no-service]
creates the cluster with the first node (meta and data) and the filesystem. --ca-key is the private key of the cluster CA: with it the node signs the certificates of the machines that join with nexfs-setup.
checks the store, the log, the term and vote file (raft/stato) and the blocks of this node, with the daemon stopped, without writing anything. It refuses while the nexfsd of this node runs (its directories are locked); --force checks anyway (the result may be wrong). Exit code 0 if nothing is damaged, 1 if something is.
check --repair [--yes]
after the check, repairs what is damaged, never deleting anything (what is taken away goes to DIR/repair-DATE/), and lets the cluster restore the copies. Without --yes it only shows the plan. Damaged blocks of a data disk become doubtful: when nexfsd starts, each one is rebuilt from another complete copy (a block whose only complete copy is the damaged one stays, and the daemon logs it). A damaged store or log of a metadata node is moved aside and the node is marked amnesiac: when nexfsd starts it catches up from the leader, and its vote does not count until then. This is done only when the other metadata nodes answer and are a majority on their own, with a leader, and never without a sound raft/stato: in that case the node must be rebuilt (meta remove from another node, then meta add with a new id and an empty state directory). It cannot be used with --force. Exit code 0 if every damage was repaired, 1 otherwise (the reasons in repair.refused).

the tables; the rows of a table.
writes, reads, removes.
the same, only if the key still holds the expected value.
the rows as JSON, one per line, and back.
notifications to subscribers.
expiring locks, with the fencing token.

nexfsd(8), nexfs-client(8); the NEXFS guides (installation, administration).

Roberto Arato, Arato Ingegneria — https://aratoingegneria.it

November 2026 nexfs 1.0.0~beta4