我有多台配备 Fedora 35 和 RAID-1 MDADM 阵列的 PC。
其中,只有一个面临着一个奇怪的问题:
如果我让它关闭超过2~3天,它肯定会在下次重新启动时执行自动检查。
这是输出结果journalctl -b | grep -E "(md1|/dev/md)"
:
Mar 14 23:06:49 zx-E5430 kernel: md/raid1:md127: active with 2 out of 2 mirrors
Mar 14 23:06:49 zx-E5430 kernel: md127: detected capacity change from 0 to 209582080
Mar 14 23:06:51 zx-E5430 systemd-fsck[586]: /dev/md127: clean, 236394/6553600 files, 3281182/26197760 blocks
Mar 14 23:06:51 zx-E5430 kernel: EXT4-fs (md127): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
Mar 14 15:06:57 zx-E5430 kernel: EXT4-fs (md127): re-mounted. Opts: (null). Quota mode: none.
Mar 14 15:07:03 zx-E5430 systemd[1]: Started Timer to wait for more drives before activating degraded array md126..
Mar 14 15:07:04 zx-E5430 kernel: md/raid1:md126: active with 2 out of 2 mirrors
Mar 14 15:07:04 zx-E5430 kernel: md126: detected capacity change from 0 to 1743542272
Mar 14 15:07:04 zx-E5430 systemd[1]: [email protected]: Deactivated successfully.
Mar 14 15:07:04 zx-E5430 systemd[1]: Stopped Timer to wait for more drives before activating degraded array md126..
Mar 14 15:07:06 zx-E5430 systemd-fsck[847]: /dev/md126: clean, 24857/54493184 files, 4511205/217942784 blocks
Mar 14 15:07:06 zx-E5430 kernel: EXT4-fs (md126): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
Mar 14 15:07:09 zx-E5430 mdadm[914]: RebuildStarted event detected on md device /dev/md/fedora_localhost-live00
Mar 14 15:07:09 zx-E5430 kernel: md: data-check of RAID array md126
Mar 14 15:07:09 zx-E5430 mdadm[914]: RebuildFinished event detected on md device /dev/md/fedora_localhost-live00
Mar 14 15:07:15 zx-E5430 kernel: md: delaying data-check of md127 until md126 has finished (they share one or more physical units)
Mar 14 15:07:15 zx-E5430 mdadm[914]: RebuildStarted event detected on md device /dev/md/fedora_localhost-live00
Mar 14 15:52:15 zx-E5430 mdadm[914]: Rebuild20 event detected on md device /dev/md/fedora_localhost-live00
Mar 14 16:40:17 zx-E5430 mdadm[914]: Rebuild40 event detected on md device /dev/md/fedora_localhost-live00
请注意,日志中的时间间隙是由双系统引起的(Windows 7 通常使用本地时间而不是 UTC 时间),因此应该与此问题无关。
这是输出结果mdadm -D /dev/md126
:
/dev/md126:
Version : 1.2
Creation Time : Mon Aug 9 18:45:19 2021
Raid Level : raid1
Array Size : 871771136 (831.39 GiB 892.69 GB)
Used Dev Size : 871771136 (831.39 GiB 892.69 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Mon Mar 14 17:21:03 2022
State : active, checking
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Check Status : 57% complete
Name : fedora_localhost-live00
UUID : 55508b5a:e2b47b55:aae847c6:0704ee20
Events : 16456
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
2 8 18 1 active sync /dev/sdb2
我检查了一下/etc/cron.d
,没有发现与 MDADM 相关的条目。两个磁盘的SMART状态也都正常。
目前我只能通过以下命令手动取消检查:
sudo -i
echo idle > /sys/devices/virtual/block/md126/md/sync_action
echo idle > /sys/devices/virtual/block/md127/md/sync_action
有人可以告诉我 MDADM 这样做的原因是什么吗?
答案1
我遇到了同样的问题,我通过禁用 raid-check.timer 计时器解决了这个问题。我使用 cockpit Web 界面来完成此操作,以下命令也可以工作:
systemctl disable raid-check.timer