Reboot your Proxmox servers without breaking Ceph

A quick note that will save you from damage and data loss in your Proxmox clusters running Ceph.

In a Proxmox cluster with distributed storage using Ceph , it’s important to follow certain preparation steps to avoid damage. The procedure below has been run many times on different Proxmox clusters (versions 5 to 9) between 2020 and 2026, with Ceph versions 14 to 20 (Tentacle).

First of all, don’t forget to back up your data regularly and to test the restore. The procedure below is not foolproof, so take your precautions. Many thanks to Matthieu , with whom I discovered and validated this procedure back in 2020-2021.

Prepare Ceph: enable “global flags”#

To enable the flags (which are options for the Ceph cluster), you can choose between the command line and the Proxmox web interface. Do all the steps with a single method, either through the web interface or via the command line, to avoid conflicts or redundant actions.

Proxmox web interface#

From the web interface of one of your cluster’s Proxmox nodes, enable the following two global flags, in the menu “Ceph > OSD > “Manage Global Flags” button:

  • noout: prevents Ceph from marking unavailable OSDs as “out”, thus avoiding triggering a massive redistribution. This is necessary because when servers are powered off, their OSDs are offline.
  • norebalance: disables the redistribution of PGs (Placement Groups) across OSDs. With fewer OSDs available, Ceph would automatically rebalance the PGs, which would cause unnecessary load and an increased risk in case of storage over-provisioning.

Note: enabling these options will put your Ceph cluster into a “HEALTH_WARN” state to signal both the presence of these options and the unavailability of the OSDs/hosts. This information is not critical on our end; feel free to check the Ceph logs during the maintenance operation to make sure no other alert slips in at the same time.

Command line#

Via SSH, log in as root on a Proxmox server in your cluster. Two commands are to be run on a single node of the Proxmox cluster to enable these flags across your entire Ceph cluster: ceph osd set noout and ceph osd set norebalance. The options produce no output, so run the ceph status command to see the state of the Ceph cluster. It should now be in the “HEALTH_WARN” state.

Reboot procedure#

Since Proxmox does not (yet) have a built-in maintenance mode, proceed as follows:

  1. Reboot the Proxmox servers one by one if you have small clusters (3 to 8 nodes), either by clicking the “reboot” button from the web interface, or via SSH by typing reboot. Don’t reboot all the servers at the same time, you risk breaking the quorum (corosync tool) and bringing down your infrastructure. Wait until you see the rebooted server back “up” in the web interface (or via the pvecm status command line).
  2. After each reboot, verify that all the OSDs of the rebooted server are operational (each OSD must have the status “up” and “in”). You can see this information either from the web interface (in Proxmox, select a server, then click “ceph” > “osd”), or via the command line ceph osd tree.
  3. Repeat steps 1 and 2 for each server to reboot.

Finalization#

The operation can be tedious if you have Proxmox clusters with many servers. When you have several dozen machines, you can reboot multiple nodes at the same time, but keep a close eye on the state of corosync and ceph.

Once all the Proxmox servers have been rebooted, disable the “global flags”. As at the beginning of the article, perform this either through the web interface or via the command line by typing ceph osd unset noout then ceph osd unset norebalance.

Monitor the state of the Ceph cluster while it performs a quick rebalance, via the ceph status command. The information is also visible in the Ceph dashboard of the Proxmox web interface. At the end of the procedure, you should return to a “HEALTH_OK” state.

This procedure should be performed regularly to keep your clusters up to date. The VMs will keep running normally, with no service interruption. Once the rebalance is finished, the cluster returns to a stable state with no data loss or unnecessary load.

Related articles

#tuto No image
#linux

Create Proxmox LXC containers with Terraform/OpenTofu

These days, task automation and the creation of immutable infrastructures are essential. With this in mind, the use of tools such as Terraform or its open-source fork OpenTofu becomes particularly interesting for the creation of LXC, automated and in mass.

Read more

Latest in #ceph

#blog No image

My homelab for 2024

Following on from the previous article (available at this address), I recently adopted an approach that had long been neglected, namely setting up a real homelab with dedicated machines. After much hesitation, I seized the opportunity that presented itself, believing that it was time to move towards this approach. So here we are with version 8 for 2024, comprising the following equipment: Mac Mini M1 ; MacBook Air M1 ; 4x Chuwi Larkbox X (Intel N100, 12 Gb de RAM DDR5 + 1 NVMe 512 Gb par hôte) ; My “old” PC tower, with a dual boot (Ubuntu LTS 22.04 et Windows 11). As my role and ambitions have evolved, I’ve found it necessary to adapt my hardware to ensure rapid and optimal operation. From now on, my main focus will be on automating platforms, from infrastructure to middleware.

Read more