mdadm 状态“活动”和状态“干净”有什么区别

Dan*_*iel 23 raid mdadm

我有两台具有不同 RAID5 阵列的不同计算机。当我运行命令时

mdadm --detail /dev/md0
Run Code Online (Sandbox Code Playgroud)

一个驱动器报告“活动”,而另一个报告“状态”字段的“干净”。有什么不同?我应该担心这两种状态吗?两者似乎都工作正常。

der*_*ert 20

来自Linux 内核文档中的Documentation/md.txt

clean - no pending writes, but otherwise active.
    When written to inactive array, starts without resync
    If a write request arrives then
      if metadata is known, mark 'dirty' and switch to 'active'.
      if not known, block and switch to write-pending
    If written to an active array that has pending writes, then fails.
active
    fully active: IO and resync can be happening.
    When written to inactive array, starts with resync
Run Code Online (Sandbox Code Playgroud)

所以,不,你不需要担心任何一种状态;两者都是正常操作。如果你看到了inactive,那你就不得不担心了。

mdadm包括一个 raid 监视器守护程序,它会提醒您(默认情况下通过电子邮件)您需要注意的任何情况,特别是出现故障的磁盘。您应该确保它已配置并正在运行。