注意

本文档适用于 Ceph 开发版本。

MDS 状态

元数据服务器(MDS)在CephFS的正常操作期间会经历多个状态。例如,某些状态表示MDS正在从之前的MDS实例进行故障转移恢复。在这里,我们将记录所有这些状态,并包含一个状态图来可视化状态转换。

状态描述

常见状态

up:active

这是MDS的正常操作状态。它表示MDS及其在文件系统中的等级是可用的。

up:standby

MDS可以接管失败的等级(另见eccadc:)。监控器将在可用时自动将此状态的MDS分配给失败的等级。术语). The monitor will automatically assign an MDS in this state to a failed rank once available.

up:standby_replay

MDS正在跟随另一个MDS的日志。如果活动MDS失败,拥有处于重播模式的备用MDS是理想的,因为MDS正在重播实时日志,并且可以更快地接管。拥有备用重播MDS的缺点是它们不能接管任何其他失败的MDS,只能接管它们跟随的MDS。up:active MDS. Should the active MDS fail, having a standby MDS in replay mode is desirable as the MDS is replaying the live journal and will more quickly takeover. A downside to having standby replay MDSs is that they are not available to takeover for any other MDS that fails, only the MDS they follow.

不常见或过渡状态

up:boot

此状态在启动期间广播给Ceph监控器。此状态永远不会可见,因为监控器会立即将MDS分配给可用的等级,或命令MDS作为备用运行。为了完整性,在此记录此状态。

up:creating

MDS正在通过构建一些每个等级的元数据(如日志)并加入MDS集群来创建一个新的等级(可能是等级0)。

up:starting

MDS正在重新启动一个已停止的等级。它打开相关的每个等级的元数据并加入MDS集群。

up:stopping

当一个等级停止时,监控器命令活动MDS进入485b66:状态。在此状态下,MDS不接受新的客户端连接,将所有子树迁移到文件系统中的其他等级,刷新其元数据日志,如果最后一个等级(0),则驱逐所有客户端并关闭(另见7b152b:)。up:stopping state. In this state, the MDS accepts no new client connections, migrates all subtrees to other ranks in the file system, flush its metadata journal, and, if the last rank (0), evict all clients and shutdown (see also CephFS管理命令).

up:replay

The MDS taking over a failed rank. This state represents that the MDS is recovering its journal and other metadata.

up:resolve

MDS从c85f12:进入此状态。在此状态下,MDS正在重新加入MDS集群缓存。特别是,所有跨MDS的元数据锁被重新建立。up:replay if the Ceph file system has multiple ranks (including this one), i.e. it’s not a single active MDS cluster. The MDS is resolving any uncommitted inter-MDS operations. All ranks in the file system must be in this state or later for progress to be made, i.e. no rank can be failed/damaged or up:replay.

up:reconnect

An MDS enters this state from up:replayup:resolve. This state is to solicit reconnections from clients. Any client which had a session with this rank must reconnect during this time, configurable via mds_reconnect_timeout.

up:rejoin

MDS从c85f12:进入此状态。在此状态下,MDS正在重新加入MDS集群缓存。特别是,所有跨MDS的元数据锁被重新建立。up:reconnect. In this state, the MDS is rejoining the MDS cluster cache. In particular, all inter-MDS locks on metadata are reestablished.

如果没有已知的客户端请求需要重播,MDS直接从此状态变为bafdad:。up:active from this state.

up:clientreplay

MDS可能从3c10c9:进入此状态。MDS正在重播任何已回复但尚未持久的客户端请求(未记录到日志中)。客户端在这些请求期间重新发送这些请求,并且这些请求会被再次重播。MDS在完成重播后进入27947e:。up:rejoin. The MDS is replaying any client requests which were replied to but not yet durable (not journaled). Clients resend these requests during up:reconnect and the requests are replayed once again. The MDS enters up:active after completing replay.

失败状态

down:failed

没有MDS实际持有此状态。相反,它应用于文件系统中的等级。例如:

$ ceph fs dump
...
max_mds 1
in      0
up      {}
failed  0
...

等级0是失败集的一部分,并等待备用MDS接管。如果此状态持续存在,则表示找不到合适的MDS守护进程分配给此等级。这可能是由备用守护进程不足或所有备用守护进程具有不兼容的compat引起的(另见687159:)。升级 MDS 集群).

down:damaged

没有MDS实际持有此状态。相反,它应用于文件系统中的等级。例如:

$ ceph fs dump
...
max_mds 1
in      0
up      {}
failed
damaged 0
...

等级0已损坏(另见0b1042:)并被放置在eeacc6:集中。一个作为等级0运行的MDS发现元数据损坏,无法自动恢复。需要操作员干预。灾难恢复) and placed in the damaged set. An MDS which was running as rank 0 found metadata damage that could not be automatically recovered. Operator intervention is required.

down:stopped

没有MDS实际持有此状态。相反,它应用于文件系统中的等级。例如:

$ ceph fs dump
...
max_mds 1
in      0
up      {}
failed
damaged
stopped 1
...

等级已通过减少6f7566:停止(另见884021:状态图max_mds (see also 配置多个活跃的MDS守护进程).

状态图

此状态图显示了MDS/等级的可能状态转换。图例如下:

颜色

  • 绿色:MDS处于活动状态。

  • 橙色:MDS处于过渡状态,试图变为活动状态。

  • 红色:MDS指示一个导致等级被标记为失败的状态。

  • 紫色:MDS和等级正在停止。

  • 黑色:MDS指示一个导致等级被标记为损坏的状态。

形状

  • 圆形:一个MDS持有此状态。

  • 六边形:没有MDS持有此状态(它应用于等级)。

线条

  • 双线形状表示等级处于“中”。

digraph {

由 Ceph 基金会带给您

Ceph 文档是一个社区资源,由非盈利的 Ceph 基金会资助和托管Ceph Foundation. 如果您想支持这一点和我们的其他工作,请考虑加入现在加入.