# Ceph 集群标志及维护说明

* noup：OSD启动时，会将自己在MON上标识为UP状态，设置该标志位，则OSD不会被自动标识为up状态。
* nodown：OSD停止时，MON会将OSD标识为down状态，设置该标志位，则MON不会将停止的OSD标识为down状态，**设置noup和nodown可以防止网络抖动。**
* noout：设置该标志位，则mon不会从crush映射中删除任何OSD。**对OSD作维护时，可设置该标志位，以防止CRUSH在OSD停止时自动重平衡数据。**&#x4F;SD重新启动时，需要清除该flag。
* noin：设置该标志位，**可以防止数据被自动分配到OSD上。**
* norecover：**设置该flag，禁止任何集群恢复操作。在执行维护和停机时，可设置该flag。**
* nobackfill：**禁止数据回填。**
* noscrub：禁止清理操作。清理PG会在短期内影响OSD的操作。在低带宽集群中，清理期间如果OSD的速度过慢，则会被标记为down。可以该标记来防止这种情况发生。
* nodeep-scrub：禁止深度清理。
* norebalance：禁止重平衡数据。**在执行集群维护或者停机时，可以使用该flag。**
* pause：设置该标志位，**则集群停止读写，但不影响osd自检。**
* full：**标记集群已满，将拒绝任何数据写入，但可读。**

## 如何进行Ceph集群维护/关闭？ <a href="#ru-he-jin-hang-ceph-ji-qun-wei-hu-guan-bi" id="ru-he-jin-hang-ceph-ji-qun-wei-hu-guan-bi"></a>

以下总结了关闭Ceph集群进行维护所需的步骤。

1、停止客户端使用您的群集（仅当您要关闭整个群集时才需要执行此步骤）

**重要提示：在继续操作之前，请确保群集处于健康状态。**

现在，您必须设置一些OSD标志：

```bash
# ceph osd set noout
# ceph osd set nobackfill
# ceph osd set norecover
```

这些标志应该足以安全关闭集群电源，但是如果您想完全暂停集群，也可以在顶部设置以下标志：

```bash
# ceph osd set norebalance
# ceph osd set nodown
# ceph osd set pause
```

> 暂停群集意味着您看不到OSD何时出现。再次备份，不会发生地图更新。

2、关闭您的服务节点

3、关闭您的OSD节点

4、关闭您的监视器节点

5、关闭您的管理节点

维护后，以相反的顺序进行上述所有操作。


---

# 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://note.fastos.org.cn/ceph/jichu/ceph-ji-qun-biao-zhi-ji-wei-hu-shuo-ming.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.
