Skip to main content

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 root privileges 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​

  1. Run on any node:

    vstack-cluster status

    The same command in the old form is ccrd_cli without parameters. The response is the same from any node: the cluster manager leader provides it.

  2. 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]
  3. Compare the values with the table.

In the outputWhat it means
Node ID and namenode number and name
state: ONLINE / OFFLINEthe node is connected to the cluster / is not connected
[enabled] / [disabled]the node is open / closed to pool placement
zpool_<pool> under a nodethe pool runs on this node; zpool_z01 is the z01 pool
cluster-managementthe cluster manager leader service: the node it is listed under is the leader
STARTEDthe pool is started
STARTINGthe pool is opening on the node
RECOVERY, RECOVERINGthe pool is failing over after a node failure and is being checked before it starts
STOPPING, STOPPEDthe pool is stopping / stopped
STALEthe pool state remains from a previous run of the cluster manager; the pool might not be running
a node without servicesnormal for a node that came back after a failure: pools do not return to it by themselves
the Services with errors: blockthe 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​

  1. Run on the node that the pool is listed under in the output of step 1:

    zpool status -x

    all pools are healthy means all pools of this node are healthy. Otherwise, the command shows only the unhealthy pools.

  2. View the details of one pool: zpool status <pool>, for example zpool status z01.

LineWhat 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 linesa 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​

  1. Run on the node:

    vstack-vm vm list
    VMID POOL STATUS REMOTE POOL_STATE
    000000000 z01 Started started
    000403405 z01 Offline started
    000403406 z01 Suspended started
    000500100 z02 Started remote
  2. 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 lineWhat it means
Started without remotethe VM runs on this node, and its disks are on a pool of this node
Started remotethe VM runs on this node, but its disks are on a pool of another node
Offlinethe 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
Suspendedthe VM is suspended: its memory is saved to the pool, and the VM itself is not running
POOL_STATE suspended or stoppedthe 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​

  1. Run on each node of the cluster:

    ls /dev/vmm

    The response lists the numbers of the VMs that currently run in the hypervisor of this node. No such file or directory or an empty response means no VM is running on the node.

  2. 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 … and ccrd_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 ccrd and do not stop the cluster with service 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.

Next​