MDADM reconstruir o RAID 6 com 3 unidades 'com falha'

1

Eu encontrei o seguinte problema:

Meu Raid 6 (/ dev / md6) falhou depois que três discos caíram do array. Um dos discos deve ter saído por um tempo (no SMART, 5 dos 6 discos têm um uptime de 1 ano, o outro tem 8meses e 21dias)

Eu tentei primeiro adicionar as 3 unidades ausentes de volta ao array, mas sdf1 estava 'ocupado'. os outros dois eu poderia adicionar.

e ele disse que sdf1 estava ocupado (ou algo assim), então eu reiniciei. e tentei novamente.

a saída é agora:

root@server:~# mdadm --assemble --run --force --update=resync /dev/md6 /dev/sd[abcdef]1
mdadm: ignoring /dev/sdd1 as it reports /dev/sda1 as failed
mdadm: ignoring /dev/sde1 as it reports /dev/sda1 as failed
mdadm: ignoring /dev/sdc1 as it reports /dev/sda1 as failed
mdadm: Marking array /dev/md6 as 'clean'
mdadm: failed to RUN_ARRAY /dev/md6: Input/output error
mdadm: Not enough devices to start the array.

outras pistas:

mdadm --examine /dev/sd[a-f]1 | egrep 'Event|/dev/sd'
/dev/sda1:
         Events : 523989
/dev/sdb1:
         Events : 523989
/dev/sdc1:
         Events : 523989
/dev/sdd1:
         Events : 523989
/dev/sde1:
         Events : 523989
/dev/sdf1:
         Events : 0

e

root@server:~# mdadm --examine /dev/sd[abcdef]1
/dev/sda1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : f0f7a964:3a8f5f80:a539aff3:cab7a6a5
           Name : fileserver:6  (local to host fileserver)
  Creation Time : Mon Mar 16 15:07:55 2015
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 7813774957 (3725.90 GiB 4000.65 GB)
     Array Size : 15627548672 (14903.59 GiB 16002.61 GB)
  Used Dev Size : 7813774336 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 839401fb:04c596d0:78eca459:78d3d7fc

Internal Bitmap : 8 sectors from superblock
    Update Time : Tue Dec 15 12:46:10 2015
       Checksum : f1607072 - correct
         Events : 523989

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 4
   Array State : AAA.AA ('A' == active, '.' == missing)
/dev/sdb1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : f0f7a964:3a8f5f80:a539aff3:cab7a6a5
           Name : fileserver:6  (local to host fileserver)
  Creation Time : Mon Mar 16 15:07:55 2015
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 7813774957 (3725.90 GiB 4000.65 GB)
     Array Size : 15627548672 (14903.59 GiB 16002.61 GB)
  Used Dev Size : 7813774336 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : a887f904:144d0e39:b306b3a6:29f0a22b

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Jan  4 19:43:04 2016
       Checksum : dfc3e244 - correct
         Events : 523989

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAA.AA ('A' == active, '.' == missing)
/dev/sdc1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : f0f7a964:3a8f5f80:a539aff3:cab7a6a5
           Name : fileserver:6  (local to host fileserver)
  Creation Time : Mon Mar 16 15:07:55 2015
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 7813775360 (3725.90 GiB 4000.65 GB)
     Array Size : 15627548672 (14903.59 GiB 16002.61 GB)
  Used Dev Size : 7813774336 (3725.90 GiB 4000.65 GB)
    Data Offset : 258048 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 87c811fc:b96d2e28:459ae3a6:917b380e

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Jan  4 20:03:32 2016
       Checksum : a8c5591f - correct
         Events : 523989

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 5
   Array State : .AA..A ('A' == active, '.' == missing)
/dev/sdd1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : f0f7a964:3a8f5f80:a539aff3:cab7a6a5
           Name : fileserver:6  (local to host fileserver)
  Creation Time : Mon Mar 16 15:07:55 2015
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 7813774957 (3725.90 GiB 4000.65 GB)
     Array Size : 15627548672 (14903.59 GiB 16002.61 GB)
  Used Dev Size : 7813774336 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 18880035:fc631ea4:ee518ad5:b94d2720

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Jan  4 20:03:32 2016
       Checksum : 9e3a0a2d - correct
         Events : 523989

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : .AA..A ('A' == active, '.' == missing)
/dev/sde1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : f0f7a964:3a8f5f80:a539aff3:cab7a6a5
           Name : fileserver:6  (local to host fileserver)
  Creation Time : Mon Mar 16 15:07:55 2015
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 7813774957 (3725.90 GiB 4000.65 GB)
     Array Size : 15627548672 (14903.59 GiB 16002.61 GB)
  Used Dev Size : 7813774336 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 6da68475:bc853f0f:b05e6cd1:43f28656

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Jan  4 20:03:32 2016
       Checksum : 7c20988f - correct
         Events : 523989

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : .AA..A ('A' == active, '.' == missing)
/dev/sdf1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : f0f7a964:3a8f5f80:a539aff3:cab7a6a5
           Name : fileserver:6  (local to host fileserver)
  Creation Time : Mon Mar 16 15:07:55 2015
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 7813774957 (3725.90 GiB 4000.65 GB)
     Array Size : 15627548672 (14903.59 GiB 16002.61 GB)
  Used Dev Size : 7813774336 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : bef4edfe:272fcf21:2f23e64d:b811cb04

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Jan  4 19:43:04 2016
       Checksum : 42cc70aa - correct
         Events : 0

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : spare
   Array State : AAA.AA ('A' == active, '.' == missing)

Total de 6 drives de 4 TB. qualquer ajuda será muito apreciada

    
por Stefanvds 04.01.2016 / 14:07

1 resposta

3

Supondo que os dados nos discos estejam intactos (ou seja, as unidades foram expulsas da matriz por falhas transitórias), você pode reconstruir a matriz. Como cinco das seis unidades têm contagens de eventos idênticas, você provavelmente não perderá nenhum dado.

Existem duas maneiras de fazer isso:

  1. A maneira rápida e de alto risco: mdadm --assemble --force --run /dev/sd[abcde]1 . Se funcionar, isso fornecerá uma matriz em execução no modo degradado (um disco ausente), esperando que você adicione novamente o/dev/sdf e deixe-o reconstruir.

  2. A maneira lenta e segura: siga o procedimento de reparação em o wiki Linux RAID . O procedimento passo a passo completo é muito longo para ser reproduzido aqui, mas a chave é usar dmsetup para criar uma sobreposição para cada volume de componente de sua matriz RAID, permitindo que você faça reparos a seco para ver o que funciona , sem realmente gravar nos discos. Novamente, você estará trabalhando com as unidades /dev/sda1 a /dev/sde1 para montar novamente a matriz no modo degradado.

por 20.02.2016 / 02:27