> Documentation index for agents: /hcp/3.3/en/llms.txt

# Drain a node before maintenance

Drain a node when it must be powered off or rebooted: to replace hardware or update the node OS. Maintenance mode drains the node: Center automatically moves the running virtual machines (VMs), their disks and pools away from the node and disables the node in the cluster. For the cluster, rebooting a node that is not drained is a failure: the node VMs are interrupted for several minutes — [Planned reboot and return of a node](/hcp/3.3/en/mechanics/node-reboot-return/index.md).

## Before you begin

- You need the **Maintain Cluster Node** privilege — by default, the **Cluster master** role has it.
- All cluster nodes are online, all pools are healthy, no other node is in maintenance.
- The cluster has failover tolerance (not N+0) — [Memory reserve for node failures](/hcp/3.3/en/mechanics/failover-reserve/index.md).
- DRS is on in the cluster — otherwise you have to move the VMs off the node manually — [DRS](/hcp/3.3/en/cluster/drs/index.md).

## 1. Put the node into maintenance mode

1. In the left menu, select **Provider Data Center** → the cluster name → **Server Nodes** and click the node ID.
2. Click **Actions** → **Enter Maintenance Mode** and check in the precheck what will be moved off the node and where.
3. If needed, select **I understand** and click **Enter Maintenance Mode**.

For details, refusal reasons and warnings, see [Put a node into maintenance mode](/hcp/3.3/en/cluster/node-maintenance/index.md).

## 2. Wait until the node is drained

1. Open **Actions** → **Maintenance Progress**.
2. If the DRS automation level is not **Fully Automated**, open the **Awaiting Confirmation** tab and click **Apply** for each recommendation.
3. If there are VMs on the **Action Required** tab, decide what to do with them: power them off or move them manually.
4. Wait until **In Maintenance Mode** appears in the **Maintenance** column of the **Server Nodes** table.

If the Center VM pool is on the node, the cluster moves it after the node is disabled: the web interface is unavailable for a few minutes.

## 3. Service the node

Power off or reboot the node and perform the work. A node in maintenance does not count as failed, its pools and VMs are already on other nodes. While the node is down, the pools work without its disk.

When the node is back, its disks return to the pools automatically, and the pools recover the data. Wait until in the **Pools** table (**Provider Data Center** → the cluster name → **Storage Resources**) the pools have **No** in **Resilvering** and **OK** in **Health** — [Storage redundancy and disk recovery](/hcp/3.3/en/mechanics/storage-redundancy/index.md).

## 4. Take the node out and return the load

1. On the node page, click **Actions** → **Exit Maintenance Mode**.
2. Select **Return VMs and pools** so that Center returns to the node everything it moved when entering, and click **Exit**.

Without **Return VMs and pools**, the load stays on other nodes. DRS can redistribute it.

## Check the result

- In the **Server Nodes** table, the node has **—** in **Maintenance** and **OK** in **Health**.
- With **Return VMs and pools**: on the cluster **Resources** tab, the node row shows its pools again. Objects that were not returned and the reasons are shown in **Maintenance Progress**.

## If maintenance mode is not available

If entering maintenance is refused and the cause cannot be removed — for example, the cluster is N+0, — the node can be drained manually, but with VM downtime:

1. Find the VMs of the node: **Provider Data Center** → **All Virtual Machines** → **Filters** → **Node**.
2. Move each running VM to another node by live migration — [Move a running VM to another node](/hcp/3.3/en/vms/migrate-vm-to-node/index.md).
3. Move the node pools with the **Transfer pool** action — [Start, stop, suspend and transfer a pool](/hcp/3.3/en/storage/manage-pool-state/index.md). Before the transfer, Center powers off the VMs of this pool that run on other nodes and does not start them automatically. Do not transfer the Center VM pool (usually `z01`) from the web interface — vStack support does it.
4. Closing the node for VM placement and opening it after the work is done by vStack support.

## Next

- [Replace a disk](/hcp/3.3/en/guides/replace-disk/index.md)
- [View a node: hardware, disks, performance](/hcp/3.3/en/cluster/view-node/index.md)

API methods: `node-maintenance-precheck`, `node-maintenance-enter`, `node-maintenance-get`, `node-maintenance-exit`, `vm-migrate`, `cluster-service-stop`, `cluster-service-start` — in the [API reference](/hcp/3.3/en/api/methods/index.md).
