过去三个晚上,我的一个 USB 控制器半夜离线,导致 8 个磁盘中有 4 个离线。前两次,我能够使用 使其重新工作mdadm -A /dev/md0 -f /dev/sd[hgeflkji]
。今天早上我试过了,但不起作用。有什么想法吗?
[root@dl380g5 ~]# mdadm --examine /dev/sd[efghijkl] |egrep 'Event'
Events : 37261
Events : 37261
Events : 37261
Events : 37261
Events : 37249
Events : 37248
Events : 37249
Events : 37248
[root@dl380g5 ~]# mdadm -A /dev/md0 --force -v /dev/sd[hgeflkji]
mdadm: looking for devices for /dev/md0
mdadm: /dev/sde is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdf is identified as a member of /dev/md0, slot 3.
mdadm: /dev/sdg is identified as a member of /dev/md0, slot 1.
mdadm: /dev/sdh is identified as a member of /dev/md0, slot 0.
mdadm: /dev/sdi is identified as a member of /dev/md0, slot 7.
mdadm: /dev/sdj is identified as a member of /dev/md0, slot 6.
mdadm: /dev/sdk is identified as a member of /dev/md0, slot 5.
mdadm: /dev/sdl is identified as a member of /dev/md0, slot 4.
mdadm: added /dev/sdg to /dev/md0 as 1
mdadm: added /dev/sde to /dev/md0 as 2
mdadm: added /dev/sdf to /dev/md0 as 3
mdadm: added /dev/sdl to /dev/md0 as 4 (possibly out of date)
mdadm: added /dev/sdk to /dev/md0 as 5 (possibly out of date)
mdadm: added /dev/sdj to /dev/md0 as 6 (possibly out of date)
mdadm: added /dev/sdi to /dev/md0 as 7 (possibly out of date)
mdadm: added /dev/sdh to /dev/md0 as 0
mdadm: /dev/md0 assembled from 4 drives - not enough to start the array.
[root@dl380g5 ~]# mdadm --detail /dev/md0
mdadm: cannot open /dev/md0: No such file or directory
[root@dl380g5 ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
unused devices: <none>
[root@dl380g5 ~]# cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.2 name=fs2.internal.xxxxxxxxx.xxx:0 UUID=a3521a6d:596057f0:87205aac:3aab2ef2
[root@dl380g5 ~]#
答案1
根据我的经验,mdadm 将强制更新事件计数。我经常看到这种情况。请确保您使用的是最新版本的 mdadm。
如果其他所有方法都失败了,您可以执行 mdadm --create,但您必须 100% 确定使用正确的 mdadm 参数,否则您将陷入更深的困境。