使用 mdadm Rover ReadyNas 阵列

使用 mdadm Rover ReadyNas 阵列

我运行了一个带有 4 个驱动器和 raid5 的 ReadyNas。一个驱动器出现故障,我更换了它并开始重建。恢复完成后,另一个驱动器出现故障,NAS 停止工作。

我使用 ddrescue 从三个驱动器创建了映像(最后一个驱动器需要更多空间)。

当我尝试在我的计算机上组装 raid5 (opensuse tumbleweed) 时,我收到消息

linux:/mnt/ddrescue # mdadm --assemble --verbose /dev/md126  /dev/loop1 /dev/loop2 /dev/loop3 /dev/sda3
mdadm: looking for devices for /dev/md126
mdadm: /dev/loop1 is identified as a member of /dev/md126, slot 0.
mdadm: /dev/loop2 is identified as a member of /dev/md126, slot 1.
mdadm: /dev/loop3 is identified as a member of /dev/md126, slot -1.
mdadm: /dev/sda3 is identified as a member of /dev/md126, slot 3.
mdadm: added /dev/loop2 to /dev/md126 as 1 (possibly out of date)
mdadm: no uptodate device for slot 2 of /dev/md126
mdadm: added /dev/sda3 to /dev/md126 as 3
mdadm: added /dev/loop3 to /dev/md126 as -1
mdadm: added /dev/loop1 to /dev/md126 as 0
mdadm: /dev/md126 assembled from 2 drives and 1 spare - not enough to start the array.
  • Loop1 是第一个没有任何问题的驱动器
  • Loop2 是发生故障的驱动器
  • Loop3完成了重建,
  • /dev/sda3 也没有问题

我猜重建完成时出了问题,角色无法更改。有没有办法改变角色?


linux:/mnt/ddrescue # mdadm --examine hd0_image
loop1, hd0_image:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
           Name : 0e34c7aa:data-0
  Creation Time : Thu Nov  7 02:52:09 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 7804334065 sectors (3.63 TiB 4.00 TB)
     Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
  Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
    Data Offset : 261760 sectors
   Super Offset : 8 sectors
   Unused Space : before=261480 sectors, after=753 sectors
          State : clean
    Device UUID : e419c18d:188c104e:666f38c6:ab25a03d

    Update Time : Mon Apr 19 07:57:43 2021
  Bad Block Log : 512 entries available at offset 264 sectors
       Checksum : a161273b - correct
         Events : 56127

         Layout : left-symmetric
     Chunk Size : 64K

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

linux:/mnt/ddrescue # mdadm --examine hd1_image
loop2, hd1_image:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
           Name : 0e34c7aa:data-0
  Creation Time : Thu Nov  7 02:52:09 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 7804333681 sectors (3.63 TiB 4.00 TB)
     Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
  Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
    Data Offset : 261760 sectors
   Super Offset : 8 sectors
   Unused Space : before=261680 sectors, after=753 sectors
          State : clean
    Device UUID : 006a9bca:a8c77f7c:bfc822a6:8791589a

    Update Time : Mon Apr 19 07:55:37 2021
       Checksum : 49478213 - correct
         Events : 55443

         Layout : left-symmetric
     Chunk Size : 64K

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

linux:/mnt/ddrescue # mdadm --examine hd2_image
loop3, hd2_image:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x8
     Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
           Name : 0e34c7aa:data-0
  Creation Time : Thu Nov  7 02:52:09 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 7804334065 sectors (3.63 TiB 4.00 TB)
     Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
  Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
    Data Offset : 261760 sectors
   Super Offset : 8 sectors
   Unused Space : before=261480 sectors, after=753 sectors
          State : clean
    Device UUID : 867c1916:bc9627b3:c4d46505:e59c94a2

    Update Time : Mon Apr 19 07:57:43 2021
  Bad Block Log : 512 entries available at offset 264 sectors - bad blocks present.
       Checksum : 32f280ca - correct
         Events : 56127

         Layout : left-symmetric
     Chunk Size : 64K

   Device Role : spare
   Array State : A..A ('A' == active, '.' == missing, 'R' == replacing)

linux:/mnt/ddrescue # mdadm --examine /dev/sda3
/dev/sda3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
           Name : 0e34c7aa:data-0
  Creation Time : Thu Nov  7 02:52:09 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 7804333681 sectors (3.63 TiB 4.00 TB)
     Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
  Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
    Data Offset : 261760 sectors
   Super Offset : 8 sectors
   Unused Space : before=261672 sectors, after=753 sectors
          State : clean
    Device UUID : 9ef499c1:5373f99b:8923c2ad:09a32d0d

    Update Time : Mon Apr 19 07:57:43 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : da3a1870 - correct
         Events : 56127

         Layout : left-symmetric
     Chunk Size : 64K

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

相关内容