大网数据广告活动
服务器运维问答

Where is mdadm event log on Centos 7?

· 52CE 我爱测

I have a centos 7.2 server with software raid1 setup using mdadm. This morning I've noticed mdadm is "checking" array, but I have no idea why. There is no mail for root and I can't find any logfile of mdadm events. I have tried g…

问题原文

原帖链接 · Karolis · CC BY-SA 3.0

I have a centos 7.2 server with software raid1 setup using mdadm.

This morning I've noticed mdadm is "checking" array, but I have no idea why. There is no mail for root and I can't find any logfile of mdadm events. I have tried grepping /var/log/messages and journalctl, but I didn't find anything there either. There doesn't seem to be anything related to raid in /var/log/.

What is the default location of mdadm log in Centos?

# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md/0 level=raid1 num-devices=2 UUID=2abdcc7e:8940f8ca:d704759d:e17533da
ARRAY /dev/md/1 level=raid1 num-devices=2 UUID=a6018d37:ec249eb7:084e037d:c3500c57
ARRAY /dev/md/2 level=raid1 num-devices=2 UUID=5134811d:50c6e923:6432b424:a47c132d
ARRAY /dev/md/3 level=raid1 num-devices=2 UUID=fcbbd4b0:2989bd1e:11fe20d0:37009306
ARRAY /dev/md/4 level=raid1 num-devices=2 UUID=ad36eae9:8c5f0405:bd81613a:513a1602

thanks!

已采纳解答

原帖链接 · Karolis · CC BY-SA 3.0

When a disk fails, kernel logs the following to /var/log/messages

Oct 19 19:24:33 r5452 kernel: md/raid1:md2: Disk failure on sdb3, disabling device.#012md/raid1:md2: Operation continuing on 1 devices.

The error messages are also sent to the virtual console. On a headless server, it is possible to view them:

setterm -dump -file /tmp/screen.dump
cat /tmp/screen.dump

and example message will look like:

[  428.850203] md/raid1:md2: Disk failure on sdb3, disabling device.
[  428.850203] md/raid1:md2: Operation continuing on 1 devices.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-10-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。