View the cluster state on a node
View the cluster state on a node when the Center web interface is unavailable or when you need to check its data against the node. All commands on this page only read the state: you can run them at any time, including during an outage.
Before you begin
- You have SSH access with
rootprivileges to at least one node of the cluster. - You know that the commands below change nothing, while other commands of the same utilities do make changes. Starting, stopping and moving pools and virtual machines (VMs) on a node, and opening and closing nodes, is the job of vStack support.
1. View the nodes and pools
-
Run on any node:
vstack-cluster statusThe same command in the old form is
ccrd_cliwithout parameters. The response is the same from any node: the cluster manager leader provides it. -
Find the node lines and the service lines under them:
Node ID: 1; name: q321u001.example.com; state: ONLINE; [ enabled]Service name: zpool_z01; state: STARTED; [ enabled]Node ID: 2; name: q321u002.example.com; state: ONLINE; [ enabled]Service name: cluster-management; state: STARTED; [ enabled]Service name: zpool_z02; state: STARTED; [ enabled]Node ID: 3; name: q321u003.example.com; state: OFFLINE; [ enabled] -
Compare the values with the table.
| In the output | What it means |
|---|---|
Node ID and name | node number and name |
state: ONLINE / OFFLINE | the node is connected to the cluster / is not connected |
[enabled] / [disabled] | the node is open / closed to pool placement |
zpool_<pool> under a node | the pool runs on this node; zpool_z01 is the z01 pool |
cluster-management | the cluster manager leader service: the node it is listed under is the leader |
STARTED | the pool is started |
STARTING | the pool is opening on the node |
RECOVERY, RECOVERING | the pool is failing over after a node failure and is being checked before it starts |
STOPPING, STOPPED | the pool is stopping / stopped |
STALE | the pool state remains from a previous run of the cluster manager; the pool might not be running |
| a node without services | normal for a node that came back after a failure: pools do not return to it by themselves |
the Services with errors: block | the cluster manager could not read the pool state; this can happen while the cluster is starting up |
To find a pool that is not started: vstack-cluster service status shows all pools with their node numbers; at node: 1024 means the pool is not started anywhere.
If you get mgmt unreachable at … after 5 seconds or ZMQ socket error on receive after 39 seconds, the cluster manager is not responding. Repeat the command on two or three other nodes; if there is no response anywhere, see Cluster web interface and API are unavailable.
2. Check the pools on a node
-
Run on the node that the pool is listed under in the output of step 1:
zpool status -xall pools are healthymeans all pools of this node are healthy. Otherwise, the command shows only the unhealthy pools. -
View the details of one pool:
zpool status <pool>, for examplezpool status z01.
| Line | What to check |
|---|---|
state: | ONLINE — healthy; DEGRADED — running with incomplete redundancy; FAULTED, SUSPENDED, UNAVAIL — not working |
scan: | resilver in progress — the pool is restoring data to a returned or new disk; resilvered … with 0 errors — the restoration is complete |
| disk lines | a name like diskid/DISK-node3_da2 means disk da2 of node 3; a faulty disk has the state FAULTED, REMOVED, UNAVAIL or OFFLINE |
errors: | No known data errors — there are no data errors |
zpool shows only the pools open on this node. If the cluster manager shows a pool as STARTED on a node, but zpool list on that node does not find the pool, follow Pool health — Critical.
3. View the VMs on a node
-
Run on the node:
vstack-vm vm listVMID POOL STATUS REMOTE POOL_STATE000000000 z01 Started started000403405 z01 Offline started000403406 z01 Suspended started000500100 z02 Started remote -
Read the lines using the table. A VM number can be padded with zeros on the left; the management VM has the number
0.
| In the line | What it means |
|---|---|
Started without remote | the VM runs on this node, and its disks are on a pool of this node |
Started remote | the VM runs on this node, but its disks are on a pool of another node |
Offline | the VM does not run on this node. It might run on another node: the pool's node shows this status for all VMs of its pool that are started on other nodes |
Suspended | the VM is suspended: its memory is saved to the pool, and the VM itself is not running |
POOL_STATE suspended or stopped | the VM's pool is suspended or stopped |
One VM is often visible on two nodes: Offline on the pool's node and Started remote on the node where it runs. This is normal. If the command responds with Warning: 'vstack-vm' is not running, the VM controller is not running on the node — contact support.
4. Find where the VM actually runs
-
Run on each node of the cluster:
ls /dev/vmmThe response lists the numbers of the VMs that currently run in the hypervisor of this node.
No such file or directoryor an empty response means no VM is running on the node. -
Compare the responses of the nodes. Each number must be on exactly one node.
If a VM number is in /dev/vmm on two nodes, do nothing with the VM and contact vStack support immediately: File system errors in the guest after a node failure. Check where a VM runs only this way, not with vstack-vm vm list.
Check the result
You know which nodes are online and which of them is the leader, which node each pool runs on and whether it is healthy, and which node each VM runs on. If the cluster manager response differs from zpool or /dev/vmm, rely on zpool and /dev/vmm and find the symptom in Troubleshooting.
What not to do
- Do not start, stop or move pools with the
vstack-cluster service …andccrd_cli --service …commands. - Do not open or close nodes with the
vstack-cluster node …commands: at the next change in cluster membership, a closed node hands over all its pools. - Do not run
zpool clear,online,offline,replace,import,export. - Do not restart
ccrdand do not stop the cluster withservice ccrd …. - Do not start or stop VMs with the
vstack-vm vm …commands, and do not kill VM processes: you start and stop VMs in the Center web interface. - Do not reboot the node until the cause of the failure is clear.
vStack support does all of this.
The exception is the steps of the upgrade procedures and of enabling Internal Fabric: there, run these commands exactly as the step says — Update nodes to 3.2.6, Choose a path to 3.2, Enable Internal Fabric.
What to collect for support
Save the output of date -u, vstack-cluster status, zpool status, vstack-vm vm list and ls /dev/vmm from every node you can access. For everything else, see Collect data for support.