Node utilities
You run the utilities on the node over SSH as root. Day-to-day work with the cluster — virtual machines (VMs), networks, pool transfers — happens in the Center web interface; on the node, the administrator checks the state, upgrades the OS and backs up the configuration. "Without support" means you can run the command yourself: it only reads the state or is part of a documented procedure. vStack support does everything else. To view the cluster state, see View the cluster state on a node.
| Utility | Purpose | Without support |
|---|---|---|
vstack-cluster | cluster manager: nodes, leader, pools | view only |
ccrd_cli | the same, old syntax | view only |
vstack-vm | node VM controller | view only |
vstack-nodeside | node controller: disks, hardware, metrics | view only |
vstack-net-cli | node network controller | no |
vStack.update.sh, vstackos.update.sh in newer releases | node OS upgrade | following the Update nodes to 3.2.6 procedure |
vstackos.config-backup.sh | node configuration collection | yes — Back up the node configuration |
zpool | ZFS pools on the node | only status and list |
vstack-cluster
The client of the cluster manager (ccrd). The leader executes the command, so the response is the same from any node. In commands, you specify a node by its number and a pool by its service name: the z01 pool corresponds to zpool_z01.
The utility is installed with the vStack-ccrd package in /usr/local/bin. It has no state of its own: it passes the command to ccrd and prints its response. The utility does not accept a node name instead of a number. The call format is vstack-cluster <command> [<action>] {<options>}. Help at any level is --help, for example vstack-cluster service move --help; the utility version is -v; another configuration file is -c <file>, which you usually do not need. You cannot select one node or pool in the status output — filter the output instead, for example vstack-cluster service status | grep zpool_z01.
| Command | What it does | Without support |
|---|---|---|
status | nodes and the pools on each of them; --json — the same in JSON | yes |
node list | node numbers | yes |
node status | node numbers, names and states | yes |
service list | service names | yes |
service status | service states and the nodes they run on | yes |
node disable | closes the node to pool placement; at the next change in cluster membership, pools leave all closed nodes, and if only one node is left open, all pools of the cluster move to it | no |
node enable | opens the node | no |
node exit | stops the node's pools and shuts down the cluster manager on it | no |
service start | opens the pool on a node | no |
service stop | closes the pool: its VMs are powered off | no |
service move | moves the pool to another node; the target node must be ONLINE and open; the VMs of the pool are interrupted while the pool moves; there is no rollback | no |
service enable, service disable | returns the pool to automatic placement / excludes it from automatic placement; after enable, the cluster manager can start the pool on its own right away | no |
The cluster manager itself manages the cluster-management service, which is the leader's address, and rejects manual commands for it.
| Return code | Meaning |
|---|---|
0 | completed |
5 | the cluster manager did not respond within 39 s: ZMQ socket error on receive |
6 | no connection to the cluster manager within 5 s: mgmt unreachable at <address> |
11 | an error from the cluster manager, failed service move checks, or a service with an error in status |
12 | an error in the arguments, for example an invalid node number, an unknown command or option; the utility prints the reason and the help |
1, 3, 4 | the response could not be parsed, or a connection error |
249, 251, 253 | no cluster manager address in the configuration, the configuration could not be parsed, the configuration file does not exist |
ccrd_cli
A wrapper around vstack-cluster with the old syntax: the output and return codes are the same.
| Command | What it does | Without support |
|---|---|---|
ccrd_cli without parameters | the same as vstack-cluster status | yes |
ccrd_cli --node --command status or list | node states or numbers | yes |
ccrd_cli --service --command status or list | service states or names | yes |
--command enable, disable, exit, start, stop | the same modifying vstack-cluster commands | no |
vstack-vm
The node VM controller. You start, stop and move VMs only in the Center web interface or API.
| Command | What it does | Without support |
|---|---|---|
status | whether the controller is running | yes |
vm list | the VMs of this node's pools and the VMs running on this node; how to read it — View the cluster state on a node | yes |
vm status --id=<number> | one line of vm list | yes |
vm config --id=<number> | the settings of a running VM in the hypervisor | yes |
pool list, pool status --id=<pool> | the pools the controller sees, and their states | yes |
inventory | the node's VMs and pools in JSON | yes |
vm start, stop, restart, suspend, resume, pause, unpause, unshare | change the VM state | no |
pool start, stop, suspend, resume, unshare | start, stop and suspend the pool's VMs | no |
start, stop | start and stop the controller itself | no |
vstack-nodeside
The node controller: disks, enclosures, hardware, metrics. Commands run directly on the node.
| Command | What it does | Without support |
|---|---|---|
status | whether the controller is running | yes |
disk list | node disks: device, type, serial number, size, pool, role | yes |
disk info --path=<device> | information about one disk | yes |
inventory | node hardware | yes |
metrics get, smart get, ipmi get | node metrics, disk SMART data, BMC sensors | yes |
disk use, unuse, spare, unspare, replace | connect and disconnect disks, mark spare disks, replace a disk in a pool | no |
ses<N> | enclosure slot indicator | no — you turn on the slot indicator in the Center web interface if physical disk management is enabled on the cluster |
start, stop, install | start, stop and configure the controller itself | no |
vstack-net-cli
The node network controller. You configure networks in the Center web interface. On the node, only vStack support works with this utility.
Update script
Updates the packages, the base system and the kernel of the node. It is located in /root/bin/. For the procedure and return codes, see Update nodes to 3.2.6.
| Option | What it does | Without support |
|---|---|---|
--controllers | updates the vStack packages | yes |
--base | updates the base system and the kernel; a reboot is required after it | yes |
--source release --version <version> | the vStack release repository and the release version | yes |
--source local | a local repository on the node | as instructed by support |
--repo-url <address> | another repository address, for example an internal mirror | as instructed by support |
--dry-run | shows the plan, changes nothing | yes |
--no-restart | does not restart services after the update | yes |
--reboot | reboots the node after the update; does not take effect with codes 6 and 7 | yes, if the node is drained |
--log <path> | writes the log to another file | yes |
-h, --help | help | yes |
--no-swap-encrypt | leaves the swap partitions as they are; without this option, the swap entries in /etc/fstab are switched to encryption with a one-time key (.eli) | no |
--no-kernel-backup, --no-fallback, --no-esp | disable boot protection: a copy of the previous kernel in <kernel directory>_prev, a one-time boot of the new kernel with automatic rollback to the previous one, and a boot loader update on the EFI partitions — the one the node booted from and those of all disks that hold the node root | no |
--allow-major-upgrade, --install-missing, --rename-map, --resume | upgrade between major versions; --resume continues an upgrade that stopped after the pkg transactions | no |
Before the update, the script copies the node configuration, and after the update it restores from the copy the accounts, the SSH settings, sysctl.conf, syslog.conf, hosts, ntp.conf, vstack-env.conf and the boot files loader.conf, loader.conf.local, device.hints. It does not restore the other files of the copy — compare them manually if needed.
| Path | What is there |
|---|---|
/var/backups/etc-<time>/ | a copy of /etc; the usr-local-etc and boot subdirectories hold copies of /usr/local/etc and of the boot files. The last five copies are kept |
/var/backups/vstack-env-<time>.conf | a copy of vstack-env.conf |
/var/backups/update-summary-<time>.txt | the final summary of the run |
/var/backups/swap-wipe.pending | swap partitions whose previous unencrypted contents have not been wiped yet; the wipe command is in the summary |
/var/log/vstack-os-update-<time>.log | the log of the run, if --log is not set |
/boot/nextboot.conf, /boot/loader.conf.d/zz-vstack-fallback.conf | the one-time boot of the new kernel and the rollback; after a successful boot, the node deletes them on its own |
vstackos.config-backup.sh
Collects the node configuration and changes nothing on the node except its own directory. For the procedure, see Back up the node configuration.
| Option | What it does |
|---|---|
--tag <label> | a label in the collection report |
-o, --out <directory> | another collection directory |
--copy-to <directory> | a second copy on a mounted medium, with checksum verification |
--tar | also pack the collection into an archive |
--verify <directory> | verify a finished copy against its manifest |
--dry-run | show the plan, write nothing |
--no-secrets | do not include password files and the node's private keys |
--with-logs, --with-smart, --full-sysctl | add logs, disk SMART data, all kernel parameters |
Return codes: 0 — the collection is clean, 2 — collected with warnings, 1 — the script did not start.
Node OS commands
| Command | What it shows | Without support |
|---|---|---|
zpool status, zpool status -x, zpool list | pools open on this node, their disks and recovery | yes |
ls /dev/vmm | VMs running in the hypervisor of this node | yes |
ifconfig lagg10, ifconfig lagg20 | link aggregation groups and LACP state | yes |
ntpq -p, date -u | time sources and node time | yes |
freebsd-version -kru, pkg query '%n %v', pkg check -d -a | kernel and package versions, dependency integrity | yes |
service <service> status | whether the service is running | yes |
zpool clear, online, offline, replace, import, export, upgrade | modify pools | no |
service ccrd … except status | stops the cluster manager on the node or the whole cluster | no |