Skip to main content

Pool failover to another node

At any moment, a storage pool is open on one node — its current node. When this node fails, the cluster manager opens the pool on another node: no data is copied, the new node connects the same disks and continues to serve the pool. While the pool fails over, its virtual machines (VMs) are unavailable.

The cluster manager is a vStack OS service on every node; a leader that the nodes elect makes its decisions. Why a pool fails over only after the old node is fenced is explained in Fencing and quorum.

How it works​

Pool failover: the cluster leader checks the pool and starts it on the new node, the node reports to Center, Center starts the VMs of the pool

  1. Choosing a node. The leader considers only nodes that are reachable and open for placement. First come the preferred nodes of the pool from the cluster settings; otherwise, the node with the fewest pools. The leader does not take the free memory of the node into account.
  2. Check. The new node opens the pool without file systems, returns dropped-out disks to the pool and closes it. If there are not enough healthy disks, the pool does not open, and the step repeats.
  3. Start. The node opens the pool with file systems and activates the two floating addresses of the pool: one in the public access network (VM consoles and transfer streams go over it), the other in the isolated networks segment (VM disks go over it via NVMe-oF/TCP). The addresses move together with the pool.
  4. Pool services. The node starts the service VMs of the pool, among them the management VM that runs Center. Then the node reports to Center that the pool is started.
  5. Pool VMs. When Center learns about the new owner of the pool, it opens the Start VMs after pool failover task. It includes the pool VMs that should be running but are not: they were on the failed node, on another failed node, or powered off. When the VM controller on the new node starts accepting commands for the pool, Center starts them — up to 5 attempts per VM — VM auto-restart after a failure.

In the diagram, the leader first asks the new node to check the pool, then to start it. The new node opens the pool, starts its services and reports to Center. Then Center starts the other VMs of the pool.

If a user task was running on the pool — for example, a stop or a transfer, — Center closes it with the Pool failed over reason. If the node that took the pool fails too, a new failover task replaces the previous one, and its VMs move to the new one.

What happens to VMs and data​

WhatWhat happens to it
Pool VMs on the failed nodepowered off together with the node; Center starts them again
Pool VMs on other nodes — their disks are connected over the networklose access to their disks: the failed node provided this access. The VM terminates abnormally, and Center starts it again when the pool is running again
The management VM, if it is on this poolthe new node starts it on its own, before the other VMs
Data and snapshotsstay in place: the pool is the same, only the node changed

Duration​

WhatTime
The pool opens on the new nodeabout 1–2 minutes
Center begins starting the VMswhen the pool is ready to accept VM commands; attempts about once a minute
The Start VMs after pool failover task waits for VMsup to 30 minutes, then the VMs that did not start are Failed
The pool does not open5 attempts with a 100 s pause, then the cluster stops trying
A step on the node did not finish within 5 minutesthe cluster considers it hung and repeats it later

What you see​

  • Pools (Provider Data Center → the cluster → Storage Resources): the pool has a new Current node — right after the start or within a minute. A mark appears in Consuming when the VM controller on the new node starts accepting commands for the VMs of the pool. Health is Normal, or Warning if the pool is open without the disks of the failed node.
  • Pool VMs: Offline, then Starting and Started.
  • Pool page: next to the name — Failover in progress. Actions → Recovery Progress shows the VMs of the task on the Started, Starting, Waiting for retry and Failed tabs and the number of attempts. The VM list is shown to roles with the View All Tasks privilege.
  • Tasks: the Start VMs after pool failover task is open while the VMs start. It closes successfully or with the reason Failed to start <number> VMs; if auto-restart is off — at once, with the Auto-restart is off reason — View tasks and terminate a stuck one.
  • On the node, the vstack-cluster status command shows the pool service zpool_<pool>: RECOVERY and RECOVERING — check, STARTING — start, STARTED — started on the node shown.

How to check that the pool serves VMs​

Normal means that the pool is started and the node has not reported a fault. After a failover, check the pool against three signs:

  1. The pool has a mark in Consuming.

  2. The VMs of the pool are in the Started status and respond.

  3. On the node shown as Current node, the pool appears in the output of this command — the command only reads the state:

    zpool status <pool name>

If the signs disagree, contact vStack support and do not restart the pool yourself.

Limitations​

  • The pool does not return on its own to the returned node. To return it, use a planned transfer: Manual pool transfer.
  • Node memory is not taken into account when a node is chosen for a pool: the VMs of the pool may not fit — Cluster RAM has been depleted, Memory reserve for node failures.
  • Without auto-restart, the failover task closes at once, and the pool VMs are started manually.
  • The message to Center about the pool start is sent by the node once. If it is lost, Center learns about the pool from the VM controller of the node or from the once-a-minute check of the pool owner, and Current node updates later. The node sends the Health and usage of the pool once every two minutes.
  • The disks of the returned node are returned to the pools by the cluster on its own, but only if the connection to the node recovered within a few seconds. Otherwise, the pool stays in Warning — Pool health — Warning.
  • If the pool did not open after five attempts, the cluster stops trying. vStack support starts the pool — Pool does not start after a node reboot.

What not to do​

  • Do not import the pool manually on another node. If the old node still holds the pool, two nodes start writing to it, and the pool data is corrupted.
  • Do not return disks to the pool or clear pool errors manually. A pool that is failing over or recovering does this on its own; only vStack support runs manual commands on such a pool.
  • Do not stop the pool or start it again while it is in STARTING or RECOVERING: a retry starts the failover from the beginning.
  • Do not reboot the new node of the pool to speed up the failover. The pool starts failing over once more.

See also​