save matriz RAID de software com falha

0

Eu tenho uma máquina onde a placa sata falhou e me fez perder meu array de raid. Eu testei as unidades externamente e elas estão em boa forma. Eu movi as unidades para uma nova máquina (com portas sata onboard suficientes) e estou tentando recuperar o array, mas tive problemas. É um array RAID 5 com 4 drives. Parece que uma das unidades não está na matriz. Estou executando o Ubuntu 14.04 e o mdadm.conf atual ainda é o padrão. Eu tenho as informações antigas do mdadm.conf. Eu realmente gostaria de preservar os dados nas unidades. Sugestões?

Veja o que o mdadm tem a dizer:

cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : inactive sdd1[2] sde1[4] sdb1[5]
      5860537608 blocks super 1.2

-

sudo mdadm --examine /dev/sd[bcde]1
/dev/sdb1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x2
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
Recovery Offset : 1799197544 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 968168e5:6c695c7b:66a78ba1:9bccdc80

    Update Time : Sun Sep 29 16:09:54 2013
       Checksum : dd82d9a - correct
         Events : 47568

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : .AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 1da9199e:cc6fc424:128e502c:881d890a

    Update Time : Sun Sep 29 14:46:26 2013
       Checksum : 1923ec18 - correct
         Events : 47565

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 3688a662:e042319b:017fe47f:a73d04b2

    Update Time : Sun Sep 29 16:09:54 2013
       Checksum : 4f2dc2e7 - correct
         Events : 47568

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : .AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sde1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 173cc321:8c8b416a:635388f7:3dd0bb3e

    Update Time : Sun Sep 29 16:09:54 2013
       Checksum : e1b6266d - correct
         Events : 47568

         Layout : left-symmetric
     Chunk Size : 512K

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

Com o array parado

sudo mdadm --assemble --scan -v
mdadm: looking for devices for further assembly
mdadm: no RAID superblock on /dev/sde
mdadm: no RAID superblock on /dev/sdd
mdadm: no RAID superblock on /dev/sdc
mdadm: no RAID superblock on /dev/sdb
mdadm: no RAID superblock on /dev/sda5
mdadm: no RAID superblock on /dev/sda2
mdadm: no RAID superblock on /dev/sda1
mdadm: no RAID superblock on /dev/sda
mdadm: /dev/sde1 is identified as a member of /dev/md/mediaserver:0, slot 3.
mdadm: /dev/sdd1 is identified as a member of /dev/md/mediaserver:0, slot 1.
mdadm: /dev/sdc1 is identified as a member of /dev/md/mediaserver:0, slot 0.
mdadm: /dev/sdb1 is identified as a member of /dev/md/mediaserver:0, slot 2.
mdadm: added /dev/sdc1 to /dev/md/mediaserver:0 as 0 (possibly out of date)
mdadm: added /dev/sdb1 to /dev/md/mediaserver:0 as 2
mdadm: added /dev/sde1 to /dev/md/mediaserver:0 as 3
mdadm: added /dev/sdd1 to /dev/md/mediaserver:0 as 1
mdadm: /dev/md/mediaserver:0 assembled from 2 drives and 1 rebuilding - not enough to start the array.
mdadm: looking for devices for further assembly
mdadm: No arrays found in config file or automatically

-

sudo mdadm --detail --scan
ARRAY /dev/md127 metadata=1.2 spares=1 name=mediaserver:0 UUID=ef1b89aa:a2bbaab9:2ce4bdd0:47832afb

com base em uma sugestão dos comentários ... Eu tentei isso e recebi um novo erro.

sudo mdadm --assemble /dev/md127 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
mdadm: /dev/md127 assembled from 2 drives and 1 rebuilding - not enough to start the array.

executou o smartctl em todas as unidades e eles passaram

    
por daisychick 28.11.2014 / 06:16

1 resposta

0

Parece que o sdc1 não está montado. Eu também estou usando o mdadm, ele não funciona de forma confiável usando operações de digitalização - eu sempre as monto manualmente. Então tente o seguinte:

Verifique se sua matriz está parada:

mdadm --stop /dev/md127

Em seguida, remonte sua matriz com a seguinte linha:

mdadm --assemble /dev/md127 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

Agora verifique seu status:

mdadm --detail /dev/md127

Sua matriz provavelmente será sincronizada novamente.

    
por tombert 28.11.2014 / 07:15