mdadm falha após a atualização 10.04 - 12.04

3

Acabei de atualizar meu servidor Ubuntu (na função de NAS) de 10.04 para 12.04. Já que ambas são versões LTS, eu não esperava nenhum problema e ... não fiz nenhum backup. Meu mal.

Após a atualização, o servidor não apareceu, o resgate grub me cumprimentou.

Originalmente, eu tinha 4 matrizes RAID: Um, 10GB para o sistema / dev / md0, foi montado a partir de / dev / sd [bcdef] 1 no modo RAID1. Segundo, 10GB para cache, / dev / md1, foi montado a partir de / dev / sd [bcdef] 2 no modo RAID1 (?). Terceiro, / dev / md5, foi montado a partir de / dev / sd [bcdef] 6 no modo RAID5. Todas as partições 500GB cada. Por último, o / dev / md6 foi montado a partir de / dev / sd [bcdef] 5 no modo RAID6. Todas as partições 500GB cada.

Desde que eu não tenho 5TB (ou mesmo 3.5TB) de mídias para fazer um backup, eu instalei um sistema de servidor Ubuntu limpo em / dev / sda usando o mínimo de cd. Eu não era capaz de inicializar eighter, mas poderia ser culpa em parte do meu hardware, que é bastante antigo e não tem a opção de inicializar a partir do disco rígido diferente. Então eu corro o XUbuntu live cd, e com ele eu consegui montar uma das partições do sistema, e fiz um backup completo dos arquivos do sistema. Então eu instalei o 12.04 corretamente reconhecido durante a instalação / dev / sd [bcdef] 1 RAID1. Infelizmente, o sistema atualmente instalado apenas em / dev / sde1, ignorando o layout do ataque. Depois disso, o sistema não inicializou o eigher. Com medo de tocar em mais alguma coisa, peguei o XUbuntu live cd novamente e, a partir dele, pude reunir os seguintes dados diagnósticos.

Estou interessado em recuperar apenas / dev / md5 e / dev / md6.

Parece que o instalador mexeu com os superblocos em / dev / sde. Espero que não seja fatal ...

#sudo /usr/share/mdadm/mkconf
...

# definitions of existing MD arrays
ARRAY /dev/md124 UUID=01b9a5fe:1be857d7:c20db638:73a0ec38
ARRAY /dev/md127 UUID=00000000:00000000:00000000:00000000
   spares=2
ARRAY /dev/md/6 metadata=1.2 UUID=2a8fd2df:3ad53552:e8b80ecf:a46d93a2 name=pieciodysk:6
ARRAY /dev/md/5 metadata=1.2 UUID=a3945c40:73237cd6:3d61998e:8f773d03 name=pieciodysk:5
ARRAY /dev/md127 UUID=00000000:00000000:00000000:00000000
   spares=4
ARRAY /dev/md/6 metadata=1.2 UUID=2a8fd2df:3ad53552:e8b80ecf:a46d93a2 name=pieciodysk:6
   spares=4
ARRAY /dev/md/5 metadata=1.2 UUID=a3945c40:73237cd6:3d61998e:8f773d03 name=pieciodysk:5
   spares=4

fdsik / dev / sdb:

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c3e8a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048    19531775     9764864   fd  Linux raid autodetect
/dev/sdb2        19531776    21485567      976896   fd  Linux raid autodetect
/dev/sdb3        21485568  1953510662   966012547+   5  Extended
/dev/sdb5        21485631   987490082   483002226   fd  Linux raid autodetect
/dev/sdb6       987490146  1953510662   483010258+  fd  Linux raid autodetect

fdsik / dev / sdc:

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *          63    19535039     9767488+  fd  Linux raid autodetect
/dev/sdc2        19535040    21494969      979965   fd  Linux raid autodetect
/dev/sdc3        21494970  1953520064   966012547+   5  Extended
/dev/sdc5        21495033   987499484   483002226   fd  Linux raid autodetect
/dev/sdc6       987499548  1953520064   483010258+  fd  Linux raid autodetect

fdsik / dev / sdd:

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048    19531775     9764864   fd  Linux raid autodetect
/dev/sdd2        19531776    21485567      976896   fd  Linux raid autodetect
/dev/sdd3        21485568  1953510662   966012547+   5  Extended
/dev/sdd5        21485631   987490082   483002226   fd  Linux raid autodetect
/dev/sdd6       987490146  1953510662   483010258+  fd  Linux raid autodetect

fdsik / dev / sde:

Disk /dev/sde: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *          63    19535039     9767488+  fd  Linux raid autodetect
/dev/sde2        19535040    21494969      979965   fd  Linux raid autodetect
/dev/sde3        21494970  2930272064  1454388547+   5  Extended
/dev/sde5        21495033   987499484   483002226   fd  Linux raid autodetect
/dev/sde6       987499548  1953520064   483010258+  fd  Linux raid autodetect
/dev/sde7      1953520128  2930272064   488375968+  83  Linux

fdsik / dev / sdf:

Disk /dev/sdf: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3743db4a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1              63    19535039     9767488+  fd  Linux raid autodetect
/dev/sdf2        19535040    21494969      979965   fd  Linux raid autodetect
/dev/sdf3        21494970  1953520064   966012547+   5  Extended
/dev/sdf5        21495033   987499484   483002226   fd  Linux raid autodetect
/dev/sdf6       987499548  1953520064   483010258+  fd  Linux raid autodetect

/ dev / sda é um disco auxiliar, que não é usado para nada em particular.

sudo mdadm --examine / dev / sdb5

 /dev/sdb5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 2a8fd2df:3ad53552:e8b80ecf:a46d93a2
           Name : pieciodysk:6
  Creation Time : Sun Sep 12 19:36:21 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966004180 (460.63 GiB 494.59 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 64b1c028:14da81bd:06bfb40b:c30ff7d6

    Update Time : Tue Sep 11 17:05:27 2012
       Checksum : e4b0a0dd - correct
         Events : 1


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

sudo mdadm --examine / dev / sdc5

 /dev/sdc5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 2a8fd2df:3ad53552:e8b80ecf:a46d93a2
           Name : pieciodysk:6
  Creation Time : Sun Sep 12 19:36:21 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966004180 (460.63 GiB 494.59 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 6b8374d4:4a4f71a1:23f7fa5c:7a7953c1

    Update Time : Tue Sep 11 17:05:27 2012
       Checksum : aff689f7 - correct
         Events : 1


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

sudo mdadm --examine / dev / sdd5

 /dev/sdd5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 2a8fd2df:3ad53552:e8b80ecf:a46d93a2
           Name : pieciodysk:6
  Creation Time : Sun Sep 12 19:36:21 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966004180 (460.63 GiB 494.59 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 017925d6:8db5b2ca:8795d93e:c0205358

    Update Time : Tue Sep 11 17:05:27 2012
       Checksum : 53c72b78 - correct
         Events : 1


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

sudo mdadm --examine / dev / sde5

 /dev/sde5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 2a8fd2df:3ad53552:e8b80ecf:a46d93a2
           Name : pieciodysk:6
  Creation Time : Sun Sep 12 19:36:21 2010
     Raid Level : raid6
   Raid Devices : 5

 Avail Dev Size : 966004180 (460.63 GiB 494.59 GB)
     Array Size : 2898012288 (1381.88 GiB 1483.78 GB)
  Used Dev Size : 966004096 (460.63 GiB 494.59 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : a9a93188:1c1ae289:b56398c7:6be226cb

 Internal Bitmap : 2 sectors from superblock
    Update Time : Mon Sep 10 08:31:33 2012
       Checksum : c0a8031a - correct
         Events : 80390

         Layout : left-symmetric
     Chunk Size : 64K

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

sudo mdadm --examine / dev / sdf5

 /dev/sdf5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 2a8fd2df:3ad53552:e8b80ecf:a46d93a2
           Name : pieciodysk:6
  Creation Time : Sun Sep 12 19:36:21 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966004180 (460.63 GiB 494.59 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : d7b87b43:298cdd3d:3f900370:198f3f48

    Update Time : Tue Sep 11 17:05:27 2012
       Checksum : 555eaafb - correct
         Events : 1


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

sudo mdadm --examine / dev / sdb6

 /dev/sdb6:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : a3945c40:73237cd6:3d61998e:8f773d03
           Name : pieciodysk:5
  Creation Time : Sun Sep 12 19:36:39 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966020245 (460.63 GiB 494.60 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : a61e9d6f:35b53cb1:96105de8:60991128

    Update Time : Tue Sep 11 17:05:26 2012
       Checksum : 8aa72e70 - correct
         Events : 1


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

sudo mdadm --examine / dev / sdc6

 /dev/sdc6:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : a3945c40:73237cd6:3d61998e:8f773d03
           Name : pieciodysk:5
  Creation Time : Sun Sep 12 19:36:39 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966020245 (460.63 GiB 494.60 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 2006abf7:13538568:e5cf2d58:2961a894

    Update Time : Tue Sep 11 17:05:26 2012
       Checksum : a6653ae8 - correct
         Events : 1


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

sudo mdadm --examine / dev / sdd6

 /dev/sdd6:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : a3945c40:73237cd6:3d61998e:8f773d03
           Name : pieciodysk:5
  Creation Time : Sun Sep 12 19:36:39 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966020245 (460.63 GiB 494.60 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 1cf3988f:5259d109:9a8cd419:db31b135

    Update Time : Tue Sep 11 17:05:26 2012
       Checksum : 424ebb86 - correct
         Events : 1


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

sudo mdadm --examine / dev / sde6

 /dev/sde6:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : a3945c40:73237cd6:3d61998e:8f773d03
           Name : pieciodysk:5
  Creation Time : Sun Sep 12 19:36:39 2010
     Raid Level : raid5
   Raid Devices : 5

 Avail Dev Size : 966020245 (460.63 GiB 494.60 GB)
     Array Size : 3864080896 (1842.54 GiB 1978.41 GB)
  Used Dev Size : 966020224 (460.63 GiB 494.60 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : a496841f:489b48dc:e330989a:5991ff4f

 Internal Bitmap : 2 sectors from superblock
    Update Time : Mon Sep 10 08:31:33 2012
       Checksum : 3fd62187 - correct
         Events : 66542

         Layout : left-symmetric
     Chunk Size : 64K

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

sudo mdadm --examine / dev / sdf6

 /dev/sdf6:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : a3945c40:73237cd6:3d61998e:8f773d03
           Name : pieciodysk:5
  Creation Time : Sun Sep 12 19:36:39 2010
     Raid Level : -unknown-
   Raid Devices : 0

 Avail Dev Size : 966020245 (460.63 GiB 494.60 GB)
    Data Offset : 272 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 36e0774e:6d6fbde9:d979fbe2:9d91b3ba

    Update Time : Tue Sep 11 17:05:26 2012
       Checksum : 2f430bc0 - correct
         Events : 1


   Device Role : spare
   Array State :  ('A' == active, '.' == missing)
    
por Adam Ryczkowski 11.09.2012 / 20:46

1 resposta

3

O problema veio da combinação de dois eventos:

  1. O bug conhecido no kernel usado pelo mini-cd instalador do Ubuntu, que efetivamente apagou o superbloco em membros do raid (na verdade excluindo um, / dev / sde. Eu acho que é por causa de um problema do Ubuntu 12.04 com condição de corrida durante boot que impede que alguns discos fiquem visíveis para o mdadm - veja este link ).
  2. Outro bug no kernel usado pelo kernel do Ubuntu 12.04 (que pode afetar outros), que efetivamente redefiniu os superblocos nos membros do raid após a atualização.

A solução:

  1. Recupere a ordem correta dos membros do raid do syslog tirado do sistema quando estiver em bom estado (ou esteja preparado para permutar a ordem na etapa seguinte, desde que o raid seja restaurado)
  2. Emitir mdadm -C /dev/md5 -e 1.2 -l 5 -n 5 /dev/sd{b,f,c,e,d}6 --assume-clean --uuid=a3945c40:73237cd6:3d61998e:8f773d03 e mdadm -C /dev/md6 -e 1.2 -l 6 -n 5 /dev/sd{b,f,c,e,d}5 --assume-clean --uuid=2a8fd2df:3ad53552:e8b80ecf:a46d93a2 as raiz do Ubuntu 10.04 (não mais recente) CD ao vivo. (É claro que nomes de dispositivos de membros, UUIDs, número de dispositivos de ataque etc. serão diferentes em sua configuração.)
  3. Se o conteúdo dos ataques for válido - então estamos prontos. Não há necessidade de usar o obsoleto 10.04 por mais tempo.

Para mais informações, consulte esta questão de falha do servidor: Quais parâmetros para o mdadm, para recriar o dispositivo md com payload começando na posição 0x22000 no armazenamento de backup?

    
por Adam Ryczkowski 18.09.2012 / 13:25