mdadm 2x Raid 5 丢失驱动器

mdadm 2x Raid 5 丢失驱动器

我希望有人可以引导我解决重建/同步问题。我在 mdadm 4 个磁盘中构建了 3 个 raid 5,每个 md0(活动,降级)、md1(活动、降级)和 md2(干净)中没有数据,所以我不关心它。

所有 12 个驱动器均连接至 LSI 9750-8i 卡。所有潜水都作为单个“单元”附加到这张卡上。一个驱动器出现故障并显示为 LSI 3dm2 接口缺失。在 Mdadm 中,阵列还将驱动器显示为“已删除”。

更复杂的是,第二个阵列也显示为活动状态,由于潜水“删除”而降级

我已关闭系统并用另一个新驱动器更换了出现故障的 3TB 驱动器。由于我知道故障前存在哪些驱动器,因此我知道哪两个驱动器不再属于阵列。 sdh = 已跳出阵列之一的驱动器。 sd0 = 已安装的新物理驱动器。超级块是持久的。

问题#1。我可以查询潜水器的序列号,但我似乎无法找出 sdh 最初属于哪个阵列,希望我可以将其添加回正确的阵列。

问题#2。根据 sdf 属于哪一个,将 sdo 添加到 md'x' 数组中。

LSI 3dm2 中报告了一些物理驱动器错误,但重新扫描后这些错误消失了,并且此级别的所有驱动器现在都报告“正常”。然而,这可能是 sdf 最初从阵列中“掉出”的问题的一部分?

我想,我必须使用 gpart 格式化 3TB 驱动器,然后将其添加到另一个阵列吗?我有生产 NAS 的备份。我不想因为犯错误而导致重建......

如果有人可以就如何去做提出一些建议,那就太好了! TIA

来自猫/proc

  [root@pithos dev]# cat /proc/mdstat   Personalities : [raid6] [raid5 [raid4]
   md0 : active raid5 sdc1[0] sdd1[4] sde1[2]
        8789025216 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/3] [U_UU]

   md1 : active raid5 sdf1[0] sdi1[4] sdg1[1]
       8789025216 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/3] [UU_U]

   md2 : active raid5 sdj1[0] sdm1[4] sdl1[2] sdk1[1]
       8789025216 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

 unused devices: <none>

中度

[root@pithos dev]# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Fri May 31 10:46:54 2013
     Raid Level : raid5
     Array Size : 8789025216 (8381.87 GiB 8999.96 GB)
  Used Dev Size : 2929675072 (2793.96 GiB 2999.99 GB)
   Raid Devices : 4
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Fri Jul  8 18:07:27 2016
          State : active, degraded
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           Name : pithos.dougallmedia.com:0  (local to host pithos.dougallmedia.com)
           UUID : f1e42a86:7fc791f8:7cf63ab8:065ffa92
         Events : 3543

    Number   Major   Minor   RaidDevice State
       0       8       33        0      active sync   /dev/sdc1
       1       0        0        1      removed
       2       8       65        2      active sync   /dev/sde1
       4       8       49        3      active sync   /dev/sdd1

MD1

[root@pithos dev]# mdadm -D /dev/md1
/dev/md1:
        Version : 1.2
  Creation Time : Fri May 31 17:44:49 2013
     Raid Level : raid5
     Array Size : 8789025216 (8381.87 GiB 8999.96 GB)
  Used Dev Size : 2929675072 (2793.96 GiB 2999.99 GB)
   Raid Devices : 4
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Tue Jul 12 11:31:52 2016
          State : clean, degraded
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           Name : pithos.dougallmedia.com:1  (local to host pithos.dougallmedia.com)
           UUID : 58ba8949:bed7be0b:ba4dcc3e:8e6bc5e2
         Events : 9779

    Number   Major   Minor   RaidDevice State
       0       8       81        0      active sync   /dev/sdf1
       1       8       97        1      active sync   /dev/sdg1
       2       0        0        2      removed
       4       8      129        3      active sync   /dev/sdi1


[root@pithos dev]# mdadm --assemble --scan -v
mdadm: looking for devices for /dev/md2
mdadm: Cannot assemble mbr metadata on /dev/sdo
mdadm: cannot open device /dev/dm-10: Device or resource busy
mdadm: cannot open device /dev/dm-9: Device or resource busy
mdadm: cannot open device /dev/dm-8: Device or resource busy
mdadm: cannot open device /dev/dm-7: Device or resource busy
mdadm: cannot open device /dev/dm-6: Device or resource busy
mdadm: cannot open device /dev/dm-5: Device or resource busy
mdadm: cannot open device /dev/md0: Device or resource busy
mdadm: cannot open device /dev/md1: Device or resource busy
mdadm: no recogniseable superblock on /dev/md2
mdadm: Cannot assemble mbr metadata on /dev/sdn
mdadm: cannot open device /dev/dm-4: Device or resource busy
mdadm: cannot open device /dev/dm-3: Device or resource busy
mdadm: cannot open device /dev/dm-2: Device or resource busy
mdadm: cannot open device /dev/dm-1: Device or resource busy
mdadm: cannot open device /dev/dm-0: Device or resource busy
mdadm: cannot open device /dev/sdk1: Device or resource busy
mdadm: cannot open device /dev/sdk: Device or resource busy
mdadm: cannot open device /dev/sdm1: Device or resource busy
mdadm: cannot open device /dev/sdm: Device or resource busy
mdadm: cannot open device /dev/sdl1: Device or resource busy
mdadm: cannot open device /dev/sdl: Device or resource busy
mdadm: cannot open device /dev/sdj1: Device or resource busy
mdadm: cannot open device /dev/sdj: Device or resource busy
mdadm: cannot open device /dev/sdg1: Device or resource busy
mdadm: cannot open device /dev/sdg: Device or resource busy
mdadm: cannot open device /dev/sdi1: Device or resource busy
mdadm: cannot open device /dev/sdi: Device or resource busy
mdadm: /dev/sdh1 has wrong uuid.
mdadm: Cannot assemble mbr metadata on /dev/sdh
mdadm: cannot open device /dev/sdd1: Device or resource busy
mdadm: cannot open device /dev/sdd: Device or resource busy
mdadm: cannot open device /dev/sde1: Device or resource busy
mdadm: cannot open device /dev/sde: Device or resource busy
mdadm: cannot open device /dev/sdf1: Device or resource busy
mdadm: cannot open device /dev/sdf: Device or resource busy
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: looking for devices for /dev/md1
mdadm: Cannot assemble mbr metadata on /dev/sdo
mdadm: cannot open device /dev/dm-10: Device or resource busy
mdadm: cannot open device /dev/dm-9: Device or resource busy
mdadm: cannot open device /dev/dm-8: Device or resource busy
mdadm: cannot open device /dev/dm-7: Device or resource busy
mdadm: cannot open device /dev/dm-6: Device or resource busy
mdadm: cannot open device /dev/dm-5: Device or resource busy
mdadm: cannot open device /dev/md0: Device or resource busy
mdadm: cannot open device /dev/md1: Device or resource busy
mdadm: no recogniseable superblock on /dev/md2
mdadm: Cannot assemble mbr metadata on /dev/sdn
mdadm: cannot open device /dev/dm-4: Device or resource busy
mdadm: cannot open device /dev/dm-3: Device or resource busy
mdadm: cannot open device /dev/dm-2: Device or resource busy
mdadm: cannot open device /dev/dm-1: Device or resource busy
mdadm: cannot open device /dev/dm-0: Device or resource busy
mdadm: cannot open device /dev/sdk1: Device or resource busy
mdadm: cannot open device /dev/sdk: Device or resource busy
mdadm: cannot open device /dev/sdm1: Device or resource busy
mdadm: cannot open device /dev/sdm: Device or resource busy
mdadm: cannot open device /dev/sdl1: Device or resource busy
mdadm: cannot open device /dev/sdl: Device or resource busy
mdadm: cannot open device /dev/sdj1: Device or resource busy
mdadm: cannot open device /dev/sdj: Device or resource busy
mdadm: cannot open device /dev/sdg1: Device or resource busy
mdadm: cannot open device /dev/sdg: Device or resource busy
mdadm: cannot open device /dev/sdi1: Device or resource busy
mdadm: cannot open device /dev/sdi: Device or resource busy
mdadm: /dev/sdh1 has wrong uuid.
mdadm: Cannot assemble mbr metadata on /dev/sdh
mdadm: cannot open device /dev/sdd1: Device or resource busy
mdadm: cannot open device /dev/sdd: Device or resource busy
mdadm: cannot open device /dev/sde1: Device or resource busy
mdadm: cannot open device /dev/sde: Device or resource busy
mdadm: cannot open device /dev/sdf1: Device or resource busy
mdadm: cannot open device /dev/sdf: Device or resource busy
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: looking for devices for /dev/md0
mdadm: Cannot assemble mbr metadata on /dev/sdo
mdadm: cannot open device /dev/dm-10: Device or resource busy
mdadm: cannot open device /dev/dm-9: Device or resource busy
mdadm: cannot open device /dev/dm-8: Device or resource busy
mdadm: cannot open device /dev/dm-7: Device or resource busy
mdadm: cannot open device /dev/dm-6: Device or resource busy
mdadm: cannot open device /dev/dm-5: Device or resource busy
mdadm: cannot open device /dev/md0: Device or resource busy
mdadm: cannot open device /dev/md1: Device or resource busy
mdadm: no recogniseable superblock on /dev/md2
mdadm: Cannot assemble mbr metadata on /dev/sdn
mdadm: cannot open device /dev/dm-4: Device or resource busy
mdadm: cannot open device /dev/dm-3: Device or resource busy
mdadm: cannot open device /dev/dm-2: Device or resource busy
mdadm: cannot open device /dev/dm-1: Device or resource busy
mdadm: cannot open device /dev/dm-0: Device or resource busy
mdadm: cannot open device /dev/sdk1: Device or resource busy
mdadm: cannot open device /dev/sdk: Device or resource busy
mdadm: cannot open device /dev/sdm1: Device or resource busy
mdadm: cannot open device /dev/sdm: Device or resource busy
mdadm: cannot open device /dev/sdl1: Device or resource busy
mdadm: cannot open device /dev/sdl: Device or resource busy
mdadm: cannot open device /dev/sdj1: Device or resource busy
mdadm: cannot open device /dev/sdj: Device or resource busy
mdadm: cannot open device /dev/sdg1: Device or resource busy
mdadm: cannot open device /dev/sdg: Device or resource busy
mdadm: cannot open device /dev/sdi1: Device or resource busy
mdadm: cannot open device /dev/sdi: Device or resource busy
mdadm: no recogniseable superblock on /dev/sdh1
mdadm: Cannot assemble mbr metadata on /dev/sdh
mdadm: cannot open device /dev/sdd1: Device or resource busy
mdadm: cannot open device /dev/sdd: Device or resource busy
mdadm: cannot open device /dev/sde1: Device or resource busy
mdadm: cannot open device /dev/sde: Device or resource busy
mdadm: cannot open device /dev/sdf1: Device or resource busy
mdadm: cannot open device /dev/sdf: Device or resource busy
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: cannot open device /dev/sda: Device or resource busy

答案1

问题#1。我可以查询潜水器的序列号,但我似乎无法找出 sdh 最初属于哪个阵列,希望我可以将其添加回正确的阵列。

使用mdadm -E /dev/sdh1(检查)。然后你可以使用mdadm --re-add ...--add

此外,如果您的其他磁盘运行状况良好,您可以简单地重建该磁盘,即使它已经有数据。

如果这不起作用,您可能必须mdadm --create --assume-clean ...在旧数据之上创建一个新数组,重新使用数据,这是危险的。请务必保存您的详细信息 ( -D) 并首先检查所有磁盘的输出。您必须显式设置在检查或详细输出中看到的许多内容,例如布局、级别、驱动器顺序、块大小等。为了安全使用--create,一定要好好测试一下覆盖层而不是让您的数据面临风险。使用--assume-clean意味着它将保留您的旧数据。

问题#2。根据 sdf 属于哪一个,将 sdo 添加到 md'x' 数组中。

mdadm -E即使您没有完成覆盖,您也可以在知道要将其添加到哪个数组后执行此步骤,而且它也只是mdadm --add /dev/md0 /dev/sdo

我还建议您经常在磁盘上运行智能长测试,这样您就可以在磁盘引起 raid 问题之前更换磁盘。 (希捷 Barracuda 3TB 磁盘也是非常不可靠...我的猜测是,这就是你所拥有的,这不是 mdadm 的错;添加智能测试也将有助于解决这些类型的问题。)

我建议您访问 irc.freenode.net #linux-raid 以获得针对此类问题的最佳实时帮助。

相关内容