mdadm 在汇编操作期间未找到超级块

mdadm 在汇编操作期间未找到超级块

我有零填充的分区/dev/sda1,并将/dev/sdb1其放入 Linux RAID 中:

# mdadm --create /dev/md0 --level=1 --raid-disks=2 --metadata 1.0 /dev/sda1 /dev/sdb1
mdadm: array /dev/md0 started.
#
# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
      487360 blocks super 1.0 [2/2] [UU]

unused devices: <none>
#

如果这很重要的话,两者/dev/sda1都曾/dev/sdb1是另一面镜子的一部分。现在,当我使用 停止新创建的md0镜像mdadm --stop --scan并尝试使用 重新组装所有阵列后mdadm --assemble --scan/dev/md0在休息或镜像时不再发现:

# cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sda4[2] sdb4[1]
      892150784 blocks super 1.2 [2/2] [UU]
      bitmap: 0/7 pages [0KB], 65536KB chunk

md2 : active raid1 sda3[2] sdb3[1]
      29280256 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda2[2] sdb2[1]
      15617024 blocks super 1.2 [2/2] [UU]

unused devices: <none>
#

如果我尝试使用详细输出来组装数组,那么它会说, andmd0上没有超级块:/dev/sda1/dev/sdb1

# mdadm -vv --assemble /dev/md0
mdadm: looking for devices for /dev/md0
mdadm: no RAID superblock on /dev/md/3
mdadm: no RAID superblock on /dev/md/2
mdadm: no RAID superblock on /dev/md/1
mdadm: no RAID superblock on /dev/sde2
mdadm: no RAID superblock on /dev/sde1
mdadm: no RAID superblock on /dev/sde
mdadm: no RAID superblock on /dev/sr1
mdadm: no RAID superblock on /dev/sdc
mdadm: no RAID superblock on /dev/sdd
mdadm: cannot open device /dev/sr0: No medium found
mdadm: /dev/sdb4 has wrong uuid.
mdadm: /dev/sdb3 has wrong uuid.
mdadm: /dev/sdb2 has wrong uuid.
mdadm: no RAID superblock on /dev/sdb1
mdadm: no RAID superblock on /dev/sdb
mdadm: /dev/sda4 has wrong uuid.
mdadm: /dev/sda3 has wrong uuid.
mdadm: /dev/sda2 has wrong uuid.
mdadm: no RAID superblock on /dev/sda1
mdadm: no RAID superblock on /dev/sda
mdadm: no RAID superblock on /dev/loop0
#

但是,如果我检查 RAID1 成员上的超级块数据,就会发现它是存在的:

# mdadm --misc -E /dev/sda1
/dev/sda1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
     Array UUID : 5a0545c5:e5b8c31b:0982665c:0cdfe114
           Name : ubuntu:0  (local to host ubuntu)
  Creation Time : Wed Apr  7 14:21:25 2021
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 974816 (476.06 MiB 499.11 MB)
     Array Size : 487360 (476.02 MiB 499.06 MB)
  Used Dev Size : 974720 (476.02 MiB 499.06 MB)
   Super Offset : 974832 sectors
   Unused Space : before=0 sectors, after=104 sectors
          State : clean
    Device UUID : 51c870bf:c75f1072:ff17ffcb:0d794b70

    Update Time : Wed Apr  7 14:21:27 2021
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : c908caac - correct
         Events : 17


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
#
# mdadm --misc -E /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
     Array UUID : 5a0545c5:e5b8c31b:0982665c:0cdfe114
           Name : ubuntu:0  (local to host ubuntu)
  Creation Time : Wed Apr  7 14:21:25 2021
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 974816 (476.06 MiB 499.11 MB)
     Array Size : 487360 (476.02 MiB 499.06 MB)
  Used Dev Size : 974720 (476.02 MiB 499.06 MB)
   Super Offset : 974832 sectors
   Unused Space : before=0 sectors, after=104 sectors
          State : clean
    Device UUID : e8517473:237cf164:8fb85c22:5ef79704

    Update Time : Wed Apr  7 14:21:27 2021
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : 5a978f80 - correct
         Events : 17


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

什么可能导致这种行为?

答案1

如果您的 /etc/mdadm/mdadm.conf 文件指定具有不同元数据格式的数组,则 mdadm 将仅查找该数组而不会找到它。

相关内容