[Yandex Cloud documentation](../../index.md) > [Yandex Managed Service for OpenSearch](../index.md) > [Concepts](index.md) > Maintenance

# Maintenance in Managed Service for OpenSearch

Maintenance includes:

* Automatic installation of OpenSearch updates and patches for host groups (including for stopped clusters).
* Scheduled [automatic storage expansion](storage.md#auto-rescale).
* Other maintenance activities.

A major DBMS version update is not part of maintenance. For more information about upgrading between major versions, see [OpenSearch version upgrade](../operations/cluster-version-update.md).

## Maintenance window {#maintenance-window}

You can set the maintenance window when [creating a cluster](../operations/cluster-create.md) or [updating its settings](../operations/update.md):

* The **At any time** option (default) allows performing maintenance at any time.
* The **By schedule** option allows you to select the day of the week and UTC time when the maintenance will be performed. For example, you can choose a time when the cluster is least loaded.

{% note info %}

To view maintenance task information, you need the `managed-opensearch.maintenanceTask.viewer` [role](../security/index.md#managed-opensearch-maintenanceTask-viewer) or higher.

To manage maintenance tasks, you need the `managed-opensearch.maintenanceTask.editor` [role](../security/index.md#managed-opensearch-maintenanceTask-editor) or higher.

{% endnote %}

## Maintenance workflow {#maintenance-order}

In Managed Service for OpenSearch single-host clusters, a single host undergoes maintenance. This means, if you restart such a cluster during maintenance, it will become unavailable.

In multi-host clusters, hosts undergo maintenance one by one. Such hosts are queued randomly. Any host that requires a restart during maintenance will be unavailable until maintenance is complete. If you access a cluster using the [FQDN of the OpenSearch host](../operations/connect/fqdn.md), the cluster may become unavailable. To make your application continuously available, access the cluster using a [special FQDN](../operations/connect/fqdn.md#special-fqdns) always pointing to the available host.