Recuperar o array RAID 10 do mdadm: listando todos como peças de reposição

3

Eu sou uma pessoa ruim e não fiz backup do meu RAID em outro lugar. Agora eu tenho uma matriz RAID10 que não é montada, e estou esperançoso de poder salvá-la. Aqui estão os detalhes:

Eu tenho cinco discos rígidos configurados como RAID10 (4 + 1 Spare). Por razões desconhecidas, duas falharam e minha reserva foi quebrada, e agora não consigo montá-las novamente.

Eu tenho algumas informações abaixo, notavelmente a saída do mdstat após a reinicialização [1], a saída de parar o array e tentar remontá-lo [2] e informações detalhadas do mdadm -E [3].

A literatura parece indicar que eu provavelmente posso forçar a recriação da matriz RAID usando --create e --assume-clean, mas estou preocupado que isso irá agravar meus dados.

Minhas ideias atuais são recriar a matriz em um estado degradado usando as unidades com os eventos correspondentes mais altos (sdc1, sdd1 e sde1, abaixo). Existe uma solução melhor?

megatron ~ # mdadm -E /dev/sd[bcdefghijklmnop]1 | egrep 'Event|/dev'
/dev/sdb1:
         Events : 494734
/dev/sdc1:
         Events : 502154
/dev/sdd1:
         Events : 502154
/dev/sde1:
         Events : 502154
/dev/sdf1:
         Events : 494756

[1] Esta é a saída do mdstat, após uma reinicialização:

megatron ~ # cat /proc/mdstat
Personalities : [linear] [raid0] [raid10] [raid6] [raid5] [raid4]
md0 : inactive sde1[3](S) sdf1[2](S) sdc1[1](S) sdd1[4](S) sdb1[0](S)
      7814052444 blocks super 1.2

unused devices: <none>

[2] Se eu parar o array e remontá-lo, recebo o seguinte:

megatron ~ # mdadm --assemble --scan --verbose
mdadm: looking for devices for /dev/md0
mdadm: no RAID superblock on /dev/sde2
mdadm: /dev/sde2 has wrong uuid.
mdadm: no RAID superblock on /dev/sde
mdadm: /dev/sde has wrong uuid.
mdadm: no RAID superblock on /dev/sdf
mdadm: /dev/sdf has wrong uuid.
mdadm: no RAID superblock on /dev/sdd
mdadm: /dev/sdd has wrong uuid.
mdadm: no RAID superblock on /dev/sdc
mdadm: /dev/sdc has wrong uuid.
mdadm: no RAID superblock on /dev/sdb
mdadm: /dev/sdb has wrong uuid.
mdadm: cannot open device /dev/sda3: Device or resource busy
mdadm: /dev/sda3 has wrong uuid.
mdadm: cannot open device /dev/sda2: Device or resource busy
mdadm: /dev/sda2 has wrong uuid.
mdadm: no RAID superblock on /dev/sda1
mdadm: /dev/sda1 has wrong uuid.
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: /dev/sda has wrong uuid.
mdadm: /dev/sde1 is identified as a member of /dev/md0, slot 3.
mdadm: /dev/sdf1 is identified as a member of /dev/md0, slot -1.
mdadm: /dev/sdd1 is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdc1 is identified as a member of /dev/md0, slot -1.
mdadm: /dev/sdb1 is identified as a member of /dev/md0, slot 0.
mdadm: added /dev/sdb1 to /dev/md0 as 0
mdadm: no uptodate device for slot 1 of /dev/md0
mdadm: added /dev/sde1 to /dev/md0 as 3
mdadm: added /dev/sdf1 to /dev/md0 as -1
mdadm: added /dev/sdc1 to /dev/md0 as -1
mdadm: added /dev/sdd1 to /dev/md0 as 2
mdadm: /dev/md0 assembled from 2 drives and 2 spares - not enough to start the array.

[3] Por último, a saída de mdadm -E / dev / sd [bcdefghijklmnop] 1 produz:

/dev/sdb1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 01516d30:2e2c0bc4:b743e476:12445ecf
           Name : megatron:1  (local to host megatron)
  Creation Time : Thu Feb  3 23:38:56 2011
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 2930269954 (1397.26 GiB 1500.30 GB)
     Array Size : 5860538368 (2794.52 GiB 3000.60 GB)
  Used Dev Size : 2930269184 (1397.26 GiB 1500.30 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 09ce480d:aad5f0ac:4cfbc777:7303d4a7

    Update Time : Tue Jul  9 20:16:22 2013
       Checksum : 8a17d4c9 - correct
         Events : 494734

         Layout : near=2
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAAA ('A' == active, '.' == missing)
/dev/sdc1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 01516d30:2e2c0bc4:b743e476:12445ecf
           Name : megatron:1  (local to host megatron)
  Creation Time : Thu Feb  3 23:38:56 2011
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 2930269954 (1397.26 GiB 1500.30 GB)
     Array Size : 5860538368 (2794.52 GiB 3000.60 GB)
  Used Dev Size : 2930269184 (1397.26 GiB 1500.30 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : d89673c0:5efc51a7:1589bbc2:d7002e7d

    Update Time : Wed Jul 10 00:14:04 2013
       Checksum : 57efa473 - correct
         Events : 502154

         Layout : near=2
     Chunk Size : 512K

   Device Role : spare
   Array State : ..AA ('A' == active, '.' == missing)
/dev/sdd1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 01516d30:2e2c0bc4:b743e476:12445ecf
           Name : megatron:1  (local to host megatron)
  Creation Time : Thu Feb  3 23:38:56 2011
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860538368 (2794.52 GiB 3000.60 GB)
  Used Dev Size : 2930269184 (1397.26 GiB 1500.30 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 08542b46:f4cfa093:31650e72:dd781e74

    Update Time : Wed Jul 10 00:14:04 2013
       Checksum : aa71a2c3 - correct
         Events : 502154

         Layout : near=2
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : ..AA ('A' == active, '.' == missing)
/dev/sde1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 01516d30:2e2c0bc4:b743e476:12445ecf
           Name : megatron:1  (local to host megatron)
  Creation Time : Thu Feb  3 23:38:56 2011
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 2930269954 (1397.26 GiB 1500.30 GB)
     Array Size : 5860538368 (2794.52 GiB 3000.60 GB)
  Used Dev Size : 2930269184 (1397.26 GiB 1500.30 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 8c655b9d:4630e93b:32eb61b8:f7a5f513

    Update Time : Wed Jul 10 00:14:04 2013
       Checksum : 55dcae05 - correct
         Events : 502154

         Layout : near=2
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : ..AA ('A' == active, '.' == missing)
/dev/sdf1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 01516d30:2e2c0bc4:b743e476:12445ecf
           Name : megatron:1  (local to host megatron)
  Creation Time : Thu Feb  3 23:38:56 2011
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 2930269954 (1397.26 GiB 1500.30 GB)
     Array Size : 5860538368 (2794.52 GiB 3000.60 GB)
  Used Dev Size : 2930269184 (1397.26 GiB 1500.30 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 3b54d74e:a1065dd6:d3e836ca:b340b56d

    Update Time : Tue Jul  9 20:17:04 2013
       Checksum : d63b6fa - correct
         Events : 494756

         Layout : near=2
     Chunk Size : 512K

   Device Role : spare
   Array State : .AAA ('A' == active, '.' == missing)
    
por Eddie Parker 10.07.2013 / 11:48

1 resposta

1

Duas unidades com falha na configuração RAID10 4 + 1 irão quebrar a matriz, sim: (

Parece uma sorte para você que três deles estejam em sincronia (como você diz, com 502154), então sim, você deve tentar remontar três deles. Parece muito esperançoso.

Claro, se você tiver 4 unidades extras, você deve fazer cópias antes de tentar, caso não corra tão bem ...

    
por 06.08.2013 / 17:51