From a5281acfb712f4434e28b118848fdbda16860d8d Mon Sep 17 00:00:00 2001 From: Pete Naylor <116301815+pete-naylor@users.noreply.github.com> Date: Mon, 23 Nov 2026 18:54:15 -0800 Subject: [PATCH 1/2] docs: Add disk-space guidance for rolling restarts with fully mounted searchable snapshots Co-Authored-By: Claude Sonnet 5.5 --- .../maintenance/ece/perform-ece-hosts-maintenance.md | 2 ++ .../full-cluster-restart-rolling-restart-procedures.md | 9 ++++++++- .../tools/snapshot-and-restore/searchable-snapshots.md | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md b/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md index 451642c6fe1..64d51d63c07 100644 --- a/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md +++ b/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md @@ -48,6 +48,8 @@ The following methods allow you to perform maintenance on individual hosts while The way that you disable container services differs based on the platform you used to deploy your ECE hosts. +If you restart the host without first moving its {{es}} nodes to other allocators, the nodes shut down with the host. Before you start, prepare each affected cluster as you would for a rolling restart. The [rolling restart procedure](../start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling) describes the allocation steps and the checks for nodes that hold fully mounted {{search-snaps}}. + #### For Docker-based installations: disable the Docker service [ece-perform-host-maintenance-docker-disable] This method lets you perform maintenance actions on hosts without first removing the associated host from your {{ece}} installation. It works by disabling the Docker daemon. The host remains a part of your ECE installation throughout these steps but will be offline and the resources it provides will not be available. diff --git a/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md b/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md index a0171c8a157..d212448be84 100644 --- a/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md +++ b/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md @@ -13,7 +13,7 @@ products: There may be situations where you want to perform a full-cluster restart, and others where you might want to perform a rolling restart. In the case of [full-cluster restart](#restart-cluster-full), you shut down and restart all the nodes in the cluster while in the case of [rolling restart](#restart-cluster-rolling), you shut down only one node at a time, so the service remains uninterrupted. ::::{warning} -Nodes exceeding the low watermark threshold will be slow to restart. Reduce the disk usage below the [low watermark](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-watermark-low) before restarting nodes. +Nodes exceeding the low watermark threshold will be slow to restart. Reduce the disk usage below the [low watermark](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-watermark-low) before restarting nodes. If a node that holds [fully mounted {{search-snaps}}](/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md#fully-mounted) is above the low watermark, its shards can also be allocated to other nodes after the restart, which then download them again from the snapshot repository. :::: @@ -125,6 +125,13 @@ Nodes exceeding the low watermark threshold will be slow to restart. Reduce the ## Rolling restart [restart-cluster-rolling] +If your data nodes hold [fully mounted {{search-snaps}}](/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md#fully-mounted), which have no replicas, a shard that is allocated to a different node is downloaded again from the snapshot repository. To give each node the best chance of getting its own shards back after the restart: + +* **Keep disk usage comfortably below the low watermark on every node that holds fully mounted indices.** A node above the [low watermark](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-watermark-low) can't receive shards, including its own, so they are allocated to other nodes instead. Before you start, check `GET _cat/allocation?v&h=node,disk.percent,disk.avail,disk.total` against your [disk-based shard allocation settings](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#disk-based-shard-allocation). The low watermark can be capped by a maximum headroom, so check the absolute free space as well as the percentage. If nodes are close to the watermark, free up space or add capacity before the maintenance. +* **Keep allocation restricted until the node has rejoined.** Restore `cluster.routing.allocation.enable` only after the restarted node appears in the `GET _cat/nodes` response. If you re-enable allocation while the node is still away, its fully mounted shards are allocated to other nodes immediately. +* **Check before you re-enable allocation.** Run the [cluster allocation explain API]({{es-apis}}operation/operation-cluster-allocation-explain) for one unassigned fully mounted shard. If the response shows the restarted node being rejected by the `disk_threshold` decider, resolve the disk space issue first. +* **Check before you move on.** After you re-enable allocation, confirm that the node's shards have started on it and that `GET _cat/recovery?v&active_only=true` shows no snapshot recoveries. If recoveries are starting on other nodes, pause the rolling restart and check disk usage against the watermarks. + 1. **Disable replica shard allocation.** When you shut down a data node, the allocation process waits for `index.unassigned.node_left.delayed_timeout` (by default, one minute) before starting to replicate the shards on that node to other nodes in the cluster, which can involve a lot of I/O. Since the node is shortly going to be restarted, this I/O is unnecessary. You can avoid racing the clock by [disabling allocation of replicas](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-allocation-enable) before shutting down [data nodes](../../distributed-architecture/clusters-nodes-shards/node-roles.md#data-node-role): diff --git a/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md b/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md index f8d98a7560a..6efd90798e5 100644 --- a/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md +++ b/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md @@ -43,7 +43,7 @@ You can control the allocation of the shards of {{search-snap}} indices using th The speed of recovery of a {{search-snap}} index is limited by the repository setting `max_restore_bytes_per_sec` and the node setting `indices.recovery.max_bytes_per_sec` just like a normal restore operation. By default `max_restore_bytes_per_sec` is unlimited, but the default for `indices.recovery.max_bytes_per_sec` depends on the configuration of the node. See [Recovery settings](elasticsearch://reference/elasticsearch/configuration-reference/index-recovery-settings.md#recovery-settings). -We recommend that you [force-merge]({{es-apis}}operation/operation-indices-forcemerge) indices to a single segment per shard before taking a snapshot that will be mounted as a {{search-snap}} index. Each read from a snapshot repository takes time and costs money, and the fewer segments there are the fewer reads are needed to restore the snapshot or to respond to a search. This is especially important for read performance on the [frozen data tier](/manage-data/lifecycle/data-tiers.md#frozen-tier). +We recommend that you [force-merge]({{es-apis}}operation/operation-indices-forcemerge) indices to a single segment per shard before taking a snapshot that will be mounted as a {{search-snap}} index. Each read from a snapshot repository takes time and costs money, and the fewer segments there are the fewer reads are needed to restore the snapshot or to respond to a search. This is especially important for read performance on the [frozen data tier](/manage-data/lifecycle/data-tiers.md#frozen-tier). ::::{tip} {{search-snaps-cap}} are ideal for managing a large archive of historical data. Historical information is typically searched less frequently than recent data and therefore may not need replicas for their performance benefits. @@ -179,6 +179,8 @@ Most cloud providers charge significant fees for data transferred between region It’s worth noting that if a searchable snapshot index has no replicas, then when the node hosting it is shut down, allocation will immediately try to relocate the index to a new node in order to maximize availability. For fully mounted indices this will result in the new node downloading the entire index snapshot from the cloud repository. Under a rolling cluster restart, this may happen multiple times for each searchable snapshot index. Temporarily disabling allocation during planned node restart will prevent this, as described in the [cluster restart procedure](../../maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling). +When allocation is re-enabled after the restart, {{es}} prefers to place each fully mounted shard back on the node that still holds its cached data. This only works if the node is eligible to receive the shard, so before a planned restart keep every node below the low watermark. Refer to the [rolling restart procedure](../../maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling) for the checks to run. + ## Back up and restore {{search-snaps}} [back-up-restore-searchable-snapshots] From 1379c0fda960e68f4ae402a6c61e7a3fa1e17ee9 Mon Sep 17 00:00:00 2001 From: Pete Naylor <116301815+pete-naylor@users.noreply.github.com> Date: Tue, 24 Nov 2026 11:09:34 -0800 Subject: [PATCH 2/2] docs: Address review feedback on rolling restart guidance Co-Authored-By: Claude Sonnet 5.5 --- .../ece/perform-ece-hosts-maintenance.md | 2 +- ...uster-restart-rolling-restart-procedures.md | 18 ++++++++++-------- .../searchable-snapshots.md | 6 +++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md b/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md index 64d51d63c07..5c254271a4e 100644 --- a/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md +++ b/deploy-manage/maintenance/ece/perform-ece-hosts-maintenance.md @@ -48,7 +48,7 @@ The following methods allow you to perform maintenance on individual hosts while The way that you disable container services differs based on the platform you used to deploy your ECE hosts. -If you restart the host without first moving its {{es}} nodes to other allocators, the nodes shut down with the host. Before you start, prepare each affected cluster as you would for a rolling restart. The [rolling restart procedure](../start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling) describes the allocation steps and the checks for nodes that hold fully mounted {{search-snaps}}. +If you restart the host without first moving its {{es}} nodes to other allocators, the nodes shut down with the host. Before you start, prepare each affected cluster as you would for a rolling restart. The [rolling restart procedure](../start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling-search-snaps) describes the allocation steps and the checks for nodes that hold fully mounted {{search-snaps}}. #### For Docker-based installations: disable the Docker service [ece-perform-host-maintenance-docker-disable] diff --git a/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md b/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md index d212448be84..78c6ed4ae2e 100644 --- a/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md +++ b/deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md @@ -13,7 +13,7 @@ products: There may be situations where you want to perform a full-cluster restart, and others where you might want to perform a rolling restart. In the case of [full-cluster restart](#restart-cluster-full), you shut down and restart all the nodes in the cluster while in the case of [rolling restart](#restart-cluster-rolling), you shut down only one node at a time, so the service remains uninterrupted. ::::{warning} -Nodes exceeding the low watermark threshold will be slow to restart. Reduce the disk usage below the [low watermark](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-watermark-low) before restarting nodes. If a node that holds [fully mounted {{search-snaps}}](/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md#fully-mounted) is above the low watermark, its shards can also be allocated to other nodes after the restart, which then download them again from the snapshot repository. +Nodes exceeding the low watermark threshold will be slow to restart. Reduce the disk usage below the [low watermark](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-watermark-low) before restarting nodes. :::: @@ -125,13 +125,6 @@ Nodes exceeding the low watermark threshold will be slow to restart. Reduce the ## Rolling restart [restart-cluster-rolling] -If your data nodes hold [fully mounted {{search-snaps}}](/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md#fully-mounted), which have no replicas, a shard that is allocated to a different node is downloaded again from the snapshot repository. To give each node the best chance of getting its own shards back after the restart: - -* **Keep disk usage comfortably below the low watermark on every node that holds fully mounted indices.** A node above the [low watermark](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-watermark-low) can't receive shards, including its own, so they are allocated to other nodes instead. Before you start, check `GET _cat/allocation?v&h=node,disk.percent,disk.avail,disk.total` against your [disk-based shard allocation settings](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#disk-based-shard-allocation). The low watermark can be capped by a maximum headroom, so check the absolute free space as well as the percentage. If nodes are close to the watermark, free up space or add capacity before the maintenance. -* **Keep allocation restricted until the node has rejoined.** Restore `cluster.routing.allocation.enable` only after the restarted node appears in the `GET _cat/nodes` response. If you re-enable allocation while the node is still away, its fully mounted shards are allocated to other nodes immediately. -* **Check before you re-enable allocation.** Run the [cluster allocation explain API]({{es-apis}}operation/operation-cluster-allocation-explain) for one unassigned fully mounted shard. If the response shows the restarted node being rejected by the `disk_threshold` decider, resolve the disk space issue first. -* **Check before you move on.** After you re-enable allocation, confirm that the node's shards have started on it and that `GET _cat/recovery?v&active_only=true` shows no snapshot recoveries. If recoveries are starting on other nodes, pause the rolling restart and check disk usage against the watermarks. - 1. **Disable replica shard allocation.** When you shut down a data node, the allocation process waits for `index.unassigned.node_left.delayed_timeout` (by default, one minute) before starting to replicate the shards on that node to other nodes in the cluster, which can involve a lot of I/O. Since the node is shortly going to be restarted, this I/O is unnecessary. You can avoid racing the clock by [disabling allocation of replicas](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-allocation-enable) before shutting down [data nodes](../../distributed-architecture/clusters-nodes-shards/node-roles.md#data-node-role): @@ -219,3 +212,12 @@ If your data nodes hold [fully mounted {{search-snaps}}](/deploy-manage/tools/sn ``` If you closed all {{ml}} jobs before stopping the nodes, open the jobs and start the datafeeds from {{kib}} or with the [open jobs]({{es-apis}}operation/operation-ml-open-job) and [start datafeed]({{es-apis}}operation/operation-ml-start-datafeed) APIs. + +### Avoid downloading fully mounted {{search-snaps}} again [restart-cluster-rolling-search-snaps] + +Fully mounted {{search-snaps}} have no replicas, so a shard that is allocated to a different node is downloaded again from the snapshot repository. To give each node the best chance of getting its own shards back after the restart: + +* **Keep disk usage comfortably below the low watermark on every node that holds fully mounted indices.** A node above the [low watermark](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-watermark-low) can't receive shards, including its own, so they are allocated to other nodes instead. Before you start, check `GET _cat/allocation?v&h=node,disk.percent,disk.avail,disk.total` against your [disk-based shard allocation settings](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#disk-based-shard-allocation). The low watermark can be capped by a maximum headroom, so check the absolute free space as well as the percentage. If nodes are close to the watermark, free up space or add capacity before the maintenance. +* **Re-enable allocation only after the node has rejoined.** Follow steps 6 and 7 in order: if you remove the `cluster.routing.allocation.enable` setting while the restarted node is still away, its fully mounted shards are allocated to other nodes immediately. +* **Check before you re-enable allocation.** Run the [cluster allocation explain API]({{es-apis}}operation/operation-cluster-allocation-explain) for one unassigned fully mounted shard. If the response shows the restarted node being rejected by the `disk_threshold` decider, resolve the disk space issue first. +* **Check before you repeat for the next node.** As part of step 8, confirm that the node's shards have started on it and that `GET _cat/recovery?v&active_only=true` shows no snapshot recoveries. If recoveries are starting on other nodes, pause the rolling restart and check disk usage against the watermarks. diff --git a/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md b/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md index 6efd90798e5..9a463c05f8b 100644 --- a/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md +++ b/deploy-manage/tools/snapshot-and-restore/searchable-snapshots.md @@ -43,7 +43,7 @@ You can control the allocation of the shards of {{search-snap}} indices using th The speed of recovery of a {{search-snap}} index is limited by the repository setting `max_restore_bytes_per_sec` and the node setting `indices.recovery.max_bytes_per_sec` just like a normal restore operation. By default `max_restore_bytes_per_sec` is unlimited, but the default for `indices.recovery.max_bytes_per_sec` depends on the configuration of the node. See [Recovery settings](elasticsearch://reference/elasticsearch/configuration-reference/index-recovery-settings.md#recovery-settings). -We recommend that you [force-merge]({{es-apis}}operation/operation-indices-forcemerge) indices to a single segment per shard before taking a snapshot that will be mounted as a {{search-snap}} index. Each read from a snapshot repository takes time and costs money, and the fewer segments there are the fewer reads are needed to restore the snapshot or to respond to a search. This is especially important for read performance on the [frozen data tier](/manage-data/lifecycle/data-tiers.md#frozen-tier). +We recommend that you [force-merge]({{es-apis}}operation/operation-indices-forcemerge) indices to a single segment per shard before taking a snapshot that will be mounted as a {{search-snap}} index. Each read from a snapshot repository takes time and costs money, and the fewer segments there are the fewer reads are needed to restore the snapshot or to respond to a search. This is especially important for read performance on the [frozen data tier](/manage-data/lifecycle/data-tiers.md#frozen-tier). ::::{tip} {{search-snaps-cap}} are ideal for managing a large archive of historical data. Historical information is typically searched less frequently than recent data and therefore may not need replicas for their performance benefits. @@ -177,9 +177,9 @@ Most cloud providers charge significant fees for data transferred between region :::: -It’s worth noting that if a searchable snapshot index has no replicas, then when the node hosting it is shut down, allocation will immediately try to relocate the index to a new node in order to maximize availability. For fully mounted indices this will result in the new node downloading the entire index snapshot from the cloud repository. Under a rolling cluster restart, this may happen multiple times for each searchable snapshot index. Temporarily disabling allocation during planned node restart will prevent this, as described in the [cluster restart procedure](../../maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling). +It’s worth noting that if a searchable snapshot index has no replicas, then when the node hosting it is shut down, allocation will immediately try to relocate the index to a new node in order to maximize availability. For fully mounted indices this will result in the new node downloading the entire index snapshot from the cloud repository. Under a rolling cluster restart, this may happen multiple times for each searchable snapshot index. Temporarily disabling allocation during planned node restart will prevent this, as described in the [cluster restart procedure](../../maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling-search-snaps). -When allocation is re-enabled after the restart, {{es}} prefers to place each fully mounted shard back on the node that still holds its cached data. This only works if the node is eligible to receive the shard, so before a planned restart keep every node below the low watermark. Refer to the [rolling restart procedure](../../maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling) for the checks to run. +When allocation is re-enabled after the restart, {{es}} prefers to place each fully mounted shard back on the node that still holds its cached data. This only works if the node is eligible to receive the shard, so before a planned restart keep every node below the low watermark. Refer to the [rolling restart procedure](../../maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling-search-snaps) for the checks to run. ## Back up and restore {{search-snaps}} [back-up-restore-searchable-snapshots]