`md(4)` 命令在开始或停止检查数组时打开屏幕

`md(4)` 命令在开始或停止检查数组时打开屏幕

每次md(或者是mdcheck?)执行 RAID 检查或暂停/继续检查时,我的设备的屏幕都会打开。

以下是相关syslog条目,屏幕于 6:15 亮起:

Jul  4 06:11:25 machine systemd[1]: Finished Daily apt download activities.
Jul  4 06:15:20 machine systemd[1]: Starting MD array scrubbing - continuation...
Jul  4 06:15:20 machine root: mdcheck continue checking /dev/md2 from 17114041344
Jul  4 06:15:20 machine kernel: [639971.327078] md: data-check of RAID array md2
Jul  4 06:15:24 machine rtkit-daemon[1997]: Supervising 5 threads of 3 processes of 1 users.
Jul  4 06:15:24 machine rtkit-daemon[1997]: Successfully made thread 225575 of process 1996 owned by '1000' RT at priority 5.
Jul  4 06:15:24 machine rtkit-daemon[1997]: Supervising 6 threads of 3 processes of 1 users.
Jul  4 06:17:01 machine CRON[225614]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

RAID 检查需要很长时间,可能大约 20 小时,因此会在几天的时间内自动分成多个部分,每个部分几个小时。在此期间,一旦检查开始/暂停/继续/结束,屏幕始终会打开。

聊天机器人向我建议的唯一合理原因是它可能是通知弹出窗口,但是当我从系统托盘中的“状态和通知”检查通知历史记录时,它是空的。

我通常通过执行来关闭屏幕DISPLAY=:0.0 xset dpms force off

我怎样才能避免这种情况发生?


更新:

进一步分析表明

echo check | sudo tee /sys/block/md1/md/sync_action
echo idle  | sudo tee /sys/block/md1/md/sync_action

两者都打开显示器。

mdcheck这是由systemd确实将这些标志写入/sys/block/mdX/md/sync_action然后导致问题触发的。

更新2:

我刚刚创建了一个新的 RAID 阵列,当发出命令时

sudo mdadm
   --create /dev/md3 
   --level=1 
   --raid-devices=2 
   /dev/by-id/wwn-0x500a0aaaaaaaaaaa-part1 
   /dev/by-id/wwn-0x500a0bbbbbbbbbbb-part1

并回答yesContinue creating array?当我按下回车键时,它就打开了屏幕。

这些是系统日志条目:

Jul 15 22:44:05 machine systemd-udevd[17072]: md3: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/md3' failed with exit code 1.
Jul 15 22:44:05 machine kernel: [17061.713250] md/raid1:md3: not clean -- starting background reconstruction
Jul 15 22:44:05 machine kernel: [17061.713253] md/raid1:md3: active with 2 out of 2 mirrors
Jul 15 22:44:05 machine udisksd[1921]: The function 'bd_md_examine' called, but not implemented!
Jul 15 22:44:05 machine udisksd[1921]: The function 'bd_md_examine' called, but not implemented!
Jul 15 22:44:05 machine kernel: [17061.717282] md3: detected capacity change from 0 to 7813574656
Jul 15 22:44:05 machine kernel: [17061.717426] md: resync of RAID array md3
Jul 15 22:44:10 machine rtkit-daemon[2680]: Supervising 5 threads of 3 processes of 1 users.
Jul 15 22:44:10 machine rtkit-daemon[2680]: Successfully made thread 17135 of process 2679 owned by '1000' RT at priority 5.
Jul 15 22:44:10 machine rtkit-daemon[2680]: Supervising 6 threads of 3 processes of 1 users.

更新3:

在向新数组填充数据并发出 后echo check > /sys/block/md3/md/sync_action,屏幕再次打开。

这些是系统日志条目:

Jul 16 18:52:23 machine kernel: [89559.476770] md: data-check of RAID array md3
Jul 16 18:52:28 machine rtkit-daemon[2680]: Supervising 5 threads of 3 processes of 1 users.
Jul 16 18:52:28 machine rtkit-daemon[2680]: Successfully made thread 85585 of process 2679 owned by '1000' RT at priority 5.
Jul 16 18:52:28 machine rtkit-daemon[2680]: Supervising 6 threads of 3 processes of 1 users.

这是md造成这种情况的原因,也可能与rtkit-daemon做一些事情有关。

相关内容