# Setting a Node to Maintenance Mode

To set a node to maintenance mode with ColumnStore, perform the following procedure.

## Setting the Server State in MaxScale

The server object for the node can be set to maintenance mode in MaxScale using [MaxScale's REST API](/docs/maxscale/reference/maxscale-rest-api.md):

* Use [MaxCtrl](/docs/maxscale/maxscale-management/administrative-tools-for-mariadb-maxscale-maxctrl.md) or another supported REST client.
* Set the server object to maintenance mode using the `set server` command.
* As the first argument, provide the name for the server.
* As the second argument, provide `maintenance` as the state.

For example:

```bash
maxctrl set server \
   mcs3 \
   maintenance
```

If the specified server is a primary server, then MaxScale will allow open transactions to complete before closing any connections.

If you would like MaxScale to immediately close all connections, the `--force` option can be provided as a third argument:

```bash
maxctrl set server \
   mcs3 \
   maintenance \
   --force
```

## Confirming Maintenance Mode is Set with MaxScale

Confirm the state of the server object in MaxScale using [MaxScale's REST API](/docs/maxscale/reference/maxscale-rest-api.md):

* List the servers using the `list servers` command, like this:

```bash
maxctrl list servers
```

If the node is properly in maintenance mode, then the `State` column will show `Maintenance` as one of the states.

## Performing Maintenance

Now that the server is in maintenance mode in MaxScale, you can perform your maintenance.

While the server is in maintenance mode:

* MaxScale doesn't route traffic to the node.
* MaxScale doesn't select the node to be primary during failover.
* The node can be rebooted.
* The node's services can be restarted.

## Clear the Server State in MaxScale

Maintenance mode for the server object for the node can be cleared in MaxScale using [MaxScale's REST API](/docs/maxscale/reference/maxscale-rest-api.md):

* Use [MaxCtrl](/docs/maxscale/maxscale-management/administrative-tools-for-mariadb-maxscale-maxctrl.md) or another supported REST client.
* Clear the server object's state using the `clear server` command.
* As the first argument, provide the name for the server.
* As the second argument, provide `maintenance` as the state.

For example:

```bash
maxctrl clear server \
   mcs3 \
   maintenance
```

## Confirming Maintenance Mode is Cleared with MaxScale

Confirm the state of the server object in MaxScale using [MaxScale's REST API](/docs/maxscale/reference/maxscale-rest-api.md):

* List the servers using the `list servers` command, like this:

```bash
maxctrl list servers
```

If the node is no longer in maintenance mode, the `State` column no longer shows `Maintenance` as one of the states.

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/analytics/mariadb-columnstore/management/node-maintenance-for-mariadb-enterprise-columnstore/set-a-node-to-maintenance-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
