无法使用 mdadm 重新组装 RAID1 - 无法运行阵列,参数无效

无法使用 mdadm 重新组装 RAID1 - 无法运行阵列,参数无效

我正在尝试使用 mdadm 组装 RAID1 阵列。我希望能够调试此错误,但除了“无效参数”之外,我不确定错误实际上在哪里。

这是主日志。除了“参数无效”以外,我不知道错误是什么。之前在多次重启后它都能正常工作,但现在这次重启它就不能正常工作了。

> mdadm --assemble --scan
mdadm: looking for devices for /dev/md1
mdadm: UUID differs from /dev/md/0.
mdadm: no RAID superblock on /dev/sdi
mdadm: UUID differs from /dev/md/0.
mdadm: no RAID superblock on /dev/sdh
mdadm: UUID differs from /dev/md/0.
mdadm: no RAID superblock on /dev/sdg
mdadm: no RAID superblock on /dev/md/0
mdadm: /dev/sdi1 is identified as a member of /dev/md1, slot 1 replacement.
mdadm: /dev/sdh1 is identified as a member of /dev/md1, slot 1.
mdadm: /dev/sdg1 is identified as a member of /dev/md1, slot 0.
mdadm: added /dev/sdh1 to /dev/md1 as 1 (possibly out of date)
mdadm: added /dev/sdi1 to /dev/md1 as 1 (possibly out of date) replacement
mdadm: added /dev/sdg1 to /dev/md1 as 0
mdadm: failed to RUN_ARRAY /dev/md1: Invalid argument

这是我完全不明白的地方。它正在构建 /dev/md1,那么为什么它一直在谈论 /dev/md0 的 UUID?

我的 mdadm.conf 是:


#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR [email protected]

# definitions of existing MD arrays
#these are commented for some reason
#ARRAY /dev/md/1  metadata=1.2 UUID=450cec12:5c8a7248:3c93a59e:11ddc20e name=b:1
#ARRAY /dev/md/0  metadata=1.2 UUID=aa81a619:c1913636:1b48fbc0:11328059 name=b:0

# This file was auto-generated on Tue, 28 Jan 2020 20:33:10 -0500
# by mkconf $Id$
ARRAY /dev/md/0 metadata=1.2 name=b:0 UUID=aa81a619:c1913636:1b48fbc0:11328059
ARRAY /dev/md1 metadata=1.2 name=t:1 UUID=90370f2d:ca2757ed:46ff3b47:c8df472f

我之前是否在 mdadm.conf 中编辑了某些内容,导致此操作无法进行?例如,/dev/md/1 被注释掉了(这样可以吗?)。

答案1

这里的问题有点奇怪。我有一个备用硬盘,RAIDmdadm检测到有坏块。我发现发生了什么事情的方式如下:

mdadm --检查 /dev/md1 /dev/sdd1 /dev/sdb1 /dev/sde1

/dev/sdd1:
   ...
   Creation Time : Sat Feb  1 12:05:48 2020
   Raid Level : raid1
   Raid Devices : 2
   ...
   Bad Block Log : 512 entries available at offset 72 sectors
   ...
   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)


/dev/sdb1:
    ...
  Bad Block Log : 512 entries available at offset 72 sectors
    ...


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)


/dev/sde1:
         ...
  Bad Block Log : 512 entries available at offset 72 sectors - bad blocks present.
  ..
   Device Role : Replacement device 1
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

经过进一步思考,我发现,考虑到问题本身,我收到的错误消息根本没啥帮助。

当我从计算机上删除 /dev/sde,并卸载/停止并重新安装所有内容时,我必须将--add/dev/sdb1 返回,然后它执行其中一个重建过程(非常快),然后它就可以正常工作了。

相关内容