MDADM Raid 0 não monta: uma unidade tem um superbloco ruim

1

Sou bastante novo no mundo do Linux e do software-raid, mas encontrei um problema no qual espero que vocês possam me ajudar.

Alguns dias atrás o sistema não foi encerrado corretamente e quando eu inicializei o software mdadm não montava mais e recebi um erro que afirmava que / dev / sdb1 (que faz parte do meu array raid 0) tem um erro superbloco. Eu decidi ignorar a montagem desde que o meu sistema não depende disso. Então eu poderia fazer login e fazer alguns testes.

Meu array contém dois discos (sdb1 e sde1) que são definidos em RAID0. Ambas as unidades são idênticas.

Quando eu executo fsck /dev/sdb1 , recebo o erro de que meu superbloco tem mais blocos do que a unidade física.

$ fsck /dev/sdb1
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
The filesystem size (according to the superblock) is 488380672 blocks
The physical size of the device is 244190390 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? 

Minha outra unidade parecia estar OK, mas agora recebo o seguinte erro, presumo que tenha a ver com sdb1 ausente

$ fsck /dev/sde1
fsck from util-linux 2.20.1
fsck: fsck.linux_raid_member: not found
fsck: error 2 while executing fsck.linux_raid_member for /dev/sde1

No fdisk tudo parece estar bem, ou pelo menos como eles são antes ..

$ fdisk -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 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: 0x000a091a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   390721535   195109889    5  Extended
/dev/sda5          501760   390721535   195109888   8e  Linux LVM

Disk /dev/mapper/Server1-root: 193.6 GB, 193646821376 bytes
255 heads, 63 sectors/track, 23542 cylinders, total 378216448 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

Disk /dev/mapper/Server1-root doesn't contain a valid partition table

Disk /dev/mapper/Server1-swap_1: 2143 MB, 2143289344 bytes
255 heads, 63 sectors/track, 260 cylinders, total 4186112 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

Disk /dev/mapper/Server1-swap_1 doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
78 heads, 63 sectors/track, 397542 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: 0x00000300

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  1953525167   976761560   fd  Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
24 heads, 63 sectors/track, 1292014 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            2048  1953525167   976761560   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders, total 976773168 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   976773167   488385560   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
78 heads, 63 sectors/track, 397542 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: 0x00000300

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048  1953525167   976761560   fd  Linux raid autodetect

Quando eu executo dumpe2fs /dev/sdb1 i:

dumpe2fs 1.42 (29-Nov-2011)
Filesystem volume name:   <none>
Last mounted on:          /media/raid0
Filesystem UUID:          52e0e3eb-40d7-49fa-9b35-be6513a782d2
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash 
Default mount options:    (none)
Filesystem state:         not clean with errors
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              122101760
Block count:              488380672
Reserved block count:     4883806
Free blocks:              166355414
Free inodes:              121871448
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      907
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
RAID stride:              128
RAID stripe width:        256
Flex block group size:    16
Filesystem created:       Sun Apr 22 21:57:36 2012
Last mount time:          Thu May  3 00:01:08 2012
Last write time:          Tue May  8 20:33:15 2012
Mount count:              24
Maximum mount count:      35
Last checked:             Sun Apr 22 21:57:36 2012
Check interval:           15552000 (6 months)
Next check after:         Fri Oct 19 21:57:36 2012
Lifetime writes:          1809 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     28
Desired extra isize:      28
Default directory hash:   half_md4
Directory Hash Seed:      54b59b52-4cfc-4bea-8c5a-5fc730317f4f
Journal backup:           inode blocks

E um monte deles:

Group 0: (Blocks 0-32767) [ITABLE_ZEROED]
  Checksum 0x6848, unused inodes 0
  Primary superblock at 0, Group descriptors at 1-117
  Reserved GDT blocks at 118-1024
  Block bitmap at 1025 (+1025), Inode bitmap at 1041 (+1041)
  Inode table at 1057-1568 (+1057)
  23517 free blocks, 8182 free inodes, 1 directories

Quando eu executo cat /proc/mdstat i:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : inactive sdb[0](S)
      976761560 blocks super 1.2

md127 : inactive sde1[1](S)
      976760536 blocks super 1.2

unused devices: <none>

Então, de repente, eu tenho dois arrays de ataque agora ...

Eu tentei o método mencionado em este tópico onde eles sugerem usar setores de backup. Mas sem sorte, o erro sobre um superbloco é maior que a unidade física.

Vocês podem me ajudar? Estou com muito medo de perder meus dados agora ..

Edit: conteúdo do arquivo mdadm.conf adicionado

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
# MAILADDR

# definitions of existing MD arrays
#ARRAY /dev/md/0 metadata=1.2 UUID=7658dc76:c33da511:d40c5dee:c5d5143d name=Server1:0

# This file was auto-generated on Fri, 27 Apr 2012 18:38:03 +0200
# by mkconf $Id$
ARRAY /dev/md/0 metadata=1.2 UUID=7658dc76:c33da511:d40c5dee:c5d5143d name=Server1:0
ARRAY /dev/md/0 metadata=1.2 UUID=3720f7a5:ae73fb52:deee0813:677105ae name=Server1:0
    
por Erik Leutscher 08.05.2012 / 22:44

1 resposta

1

Pare de executar o fsck nos membros do raid, não deve haver um sistema de arquivos lá e você pode facilmente destruir o superbloco RAID que está lá.

Há algo realmente errado com a sua configuração de RAID para começar, é assim que sua tabela de partição deve ficar.

root@mark21:~# fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 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: 0x0000ffc4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1240233983   620115968   fd  Linux raid autodetect

Parece que você formatou o dispositivo SD com um sistema de arquivos depois que você fez parte de um conjunto RAID, que está completamente quebrado. Você deveria formatar e usar o dispositivo MD.

    
por ppetraki 09.08.2012 / 18:27