Skip to main content

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.

UtilityPurposeWithout support
vstack-clustercluster manager: nodes, leader, poolsview only
ccrd_clithe same, old syntaxview only
vstack-vmnode VM controllerview only
vstack-nodesidenode controller: disks, hardware, metricsview only
vstack-net-clinode network controllerno
vStack.update.sh, vstackos.update.sh in newer releasesnode OS upgradefollowing the Update nodes to 3.2.6 procedure
vstackos.config-backup.shnode configuration collectionyes — Back up the node configuration
zpoolZFS pools on the nodeonly 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.

CommandWhat it doesWithout support
statusnodes and the pools on each of them; --json — the same in JSONyes
node listnode numbersyes
node statusnode numbers, names and statesyes
service listservice namesyes
service statusservice states and the nodes they run onyes
node disablecloses 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 itno
node enableopens the nodeno
node exitstops the node's pools and shuts down the cluster manager on itno
service startopens the pool on a nodeno
service stopcloses the pool: its VMs are powered offno
service movemoves 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 rollbackno
service enable, service disablereturns the pool to automatic placement / excludes it from automatic placement; after enable, the cluster manager can start the pool on its own right awayno

The cluster manager itself manages the cluster-management service, which is the leader's address, and rejects manual commands for it.

Return codeMeaning
0completed
5the cluster manager did not respond within 39 s: ZMQ socket error on receive
6no connection to the cluster manager within 5 s: mgmt unreachable at <address>
11an error from the cluster manager, failed service move checks, or a service with an error in status
12an 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, 4the response could not be parsed, or a connection error
249, 251, 253no 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.

CommandWhat it doesWithout support
ccrd_cli without parametersthe same as vstack-cluster statusyes
ccrd_cli --node --command status or listnode states or numbersyes
ccrd_cli --service --command status or listservice states or namesyes
--command enable, disable, exit, start, stopthe same modifying vstack-cluster commandsno

vstack-vm​

The node VM controller. You start, stop and move VMs only in the Center web interface or API.

CommandWhat it doesWithout support
statuswhether the controller is runningyes
vm listthe VMs of this node's pools and the VMs running on this node; how to read it — View the cluster state on a nodeyes
vm status --id=<number>one line of vm listyes
vm config --id=<number>the settings of a running VM in the hypervisoryes
pool list, pool status --id=<pool>the pools the controller sees, and their statesyes
inventorythe node's VMs and pools in JSONyes
vm start, stop, restart, suspend, resume, pause, unpause, unsharechange the VM stateno
pool start, stop, suspend, resume, unsharestart, stop and suspend the pool's VMsno
start, stopstart and stop the controller itselfno

vstack-nodeside​

The node controller: disks, enclosures, hardware, metrics. Commands run directly on the node.

CommandWhat it doesWithout support
statuswhether the controller is runningyes
disk listnode disks: device, type, serial number, size, pool, roleyes
disk info --path=<device>information about one diskyes
inventorynode hardwareyes
metrics get, smart get, ipmi getnode metrics, disk SMART data, BMC sensorsyes
disk use, unuse, spare, unspare, replaceconnect and disconnect disks, mark spare disks, replace a disk in a poolno
ses<N>enclosure slot indicatorno — you turn on the slot indicator in the Center web interface if physical disk management is enabled on the cluster
start, stop, installstart, stop and configure the controller itselfno

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.

OptionWhat it doesWithout support
--controllersupdates the vStack packagesyes
--baseupdates the base system and the kernel; a reboot is required after ityes
--source release --version <version>the vStack release repository and the release versionyes
--source locala local repository on the nodeas instructed by support
--repo-url <address>another repository address, for example an internal mirroras instructed by support
--dry-runshows the plan, changes nothingyes
--no-restartdoes not restart services after the updateyes
--rebootreboots the node after the update; does not take effect with codes 6 and 7yes, if the node is drained
--log <path>writes the log to another fileyes
-h, --helphelpyes
--no-swap-encryptleaves 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-espdisable 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 rootno
--allow-major-upgrade, --install-missing, --rename-map, --resumeupgrade between major versions; --resume continues an upgrade that stopped after the pkg transactionsno

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.

PathWhat 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>.confa copy of vstack-env.conf
/var/backups/update-summary-<time>.txtthe final summary of the run
/var/backups/swap-wipe.pendingswap partitions whose previous unencrypted contents have not been wiped yet; the wipe command is in the summary
/var/log/vstack-os-update-<time>.logthe log of the run, if --log is not set
/boot/nextboot.conf, /boot/loader.conf.d/zz-vstack-fallback.confthe 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.

OptionWhat 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
--taralso pack the collection into an archive
--verify <directory>verify a finished copy against its manifest
--dry-runshow the plan, write nothing
--no-secretsdo not include password files and the node's private keys
--with-logs, --with-smart, --full-sysctladd 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​

CommandWhat it showsWithout support
zpool status, zpool status -x, zpool listpools open on this node, their disks and recoveryyes
ls /dev/vmmVMs running in the hypervisor of this nodeyes
ifconfig lagg10, ifconfig lagg20link aggregation groups and LACP stateyes
ntpq -p, date -utime sources and node timeyes
freebsd-version -kru, pkg query '%n %v', pkg check -d -akernel and package versions, dependency integrityyes
service <service> statuswhether the service is runningyes
zpool clear, online, offline, replace, import, export, upgrademodify poolsno
service ccrd … except statusstops the cluster manager on the node or the whole clusterno