Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i already read & tried different approaches for 2 days now but nothing seems to work. I have 2 HDDs, on each one is an partition with 200GB which i had in RAID1. Then i installed XBMC and tried to start the raid again. The Array starts, but it is missing the filesystem ( i think it was ext4), so mounting is not possible. Outputs:

ubuntu@ubuntu:~$ sudo fdisk -l

Platte /dev/sda: 1000.2 GByte, 1000204886016 Byte
255 Köpfe, 63 Sektoren/Spur, 121601 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf3b92028

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1   *           1       97379   782196786   83  Linux
/dev/sda2           97380      121601   194563215   fd  Linux raid autodetect

Platte /dev/sdb: 1500.3 GByte, 1500301910016 Byte
255 Köpfe, 63 Sektoren/Spur, 182401 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0c41a682

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sdb1   *           1        9362    75194336   83  Linux
/dev/sdb2            9362       10199     6724609    5  Erweiterte
/dev/sdb3           10200       34421   194563215   fd  Linux raid autodetect
/dev/sdb4           34515      182401  1187902327+  83  Linux
/dev/sdb5            9362       10199     6724608   82  Linux Swap / Solaris

Platte /dev/sde: 1977 MByte, 1977614336 Byte
64 Köpfe, 63 Sektoren/Spur, 957 Zylinder
Einheiten = Zylinder von 4032 × 512 = 2064384 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sde1               1         957     1929244+   6  FAT16

sda2 and sdb3 have been in an RAID1-Array.

ubuntu@ubuntu:~$ sudo mdadm -E -s
ARRAY /dev/md0 level=raid1 num-devices=1 UUID=5c001a6c:9e51fa30:e368bf24:bd0fce41
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=ed6394c7:53941634:e368bf24:bd0fce41

the raid with 1 device is from when i tried to make an array with 1 Disk to recover data (which didnt work out). i havent deleted the array yet because i dont know what will happen. i hope i didnt made it worse by that.

then i tried this guide: http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/

ubuntu@ubuntu:~$ sudo fsck.ext4 -v /dev/sdb3
e2fsck 1.41.11 (14-Mar-2010)
fsck.ext4: Superblock ungültig versuche es mit Backup-Blöcken...
fsck.ext4: Bad magic number in super-block beim Versuch, /dev/sdb3 zu öffnen

SuperBlock ist unlesbar bzw. beschreibt kein gültiges ext2
Dateisystem.  Wenn Gerät gültig ist und ein ext2
Dateisystem (kein swap oder ufs usw.) enthält,  dann ist der SuperBlock
beschädigt, und sie könnten e2fsck mit einem anderen SuperBlock:
    e2fsck -b 8193 <Gerät>


ubuntu@ubuntu:~$ sudo mke2fs -n /dev/sdb3
mke2fs 1.41.11 (14-Mar-2010)
Dateisystem-Label=
OS-Typ: Linux
Blockgröße=4096 (log=2)
Fragmentgröße=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
12165120 Inodes, 48640803 Blöcke
2432040 Blöcke (5.00%) reserviert für den Superuser
Erster Datenblock=0
Maximale Dateisystem-Blöcke=0
1485 Blockgruppen
32768 Blöcke pro Gruppe, 32768 Fragmente pro Gruppe
8192 Inodes pro Gruppe
Superblock-Sicherungskopien gespeichert in den Blöcken: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872

ubuntu@ubuntu:~$ sudo e2fsck -b 11239424 /dev/sdb3
e2fsck 1.41.11 (14-Mar-2010)
e2fsck: Das Argument ist ungültig beim Versuch, /dev/sdb3 zu öffnen

SuperBlock ist unlesbar bzw. beschreibt kein gültiges ext2
Dateisystem.  Wenn Gerät gültig ist und ein ext2
Dateisystem (kein swap oder ufs usw.) enthält,  dann ist der SuperBlock
beschädigt, und sie könnten e2fsck mit einem anderen SuperBlock:
    e2fsck -b 8193 <Gerät>

ubuntu@ubuntu:~$ sudo e2fsck -b 20480000 /dev/sdb3
e2fsck 1.41.11 (14-Mar-2010)
SuperBlock has an ungültig Journal (Inode 8).
Bereinige<j>? ja

*** ext3 journal has been deleted - filesystem is now ext2 only ***

Die Dateisystem Größe ( laut SuperBlock) ist 48827559 Blocks
Die physikalische Größe von Gerät ist 48640803 Blocks
Entweder der SuperBlock oder die Partionstabelle ist beschädigt!
Abbrechen<j>? ja

I really have no idea if it is the partition table or the superblocks. at first i think i should delete the array with the one device, how do i do that without breaking anything (than it is now :D )? and after that - what should i do next?

thanks in advance guys!


EDIT: i just found this https://bbs.archlinux.org/viewtopic.php?id=136766

i think i also messed something up when creating the array. but when i do sudo e2fsck -cc /dev/md0 it gives me the following error again:

ubuntu@ubuntu:~$ sudo e2fsck -cc /dev/md0
e2fsck 1.41.11 (14-Mar-2010)
e2fsck: Superblock ungültig versuche es mit Backup-Blöcken...
e2fsck: Bad magic number in super-block beim Versuch, /dev/md0 zu öffnen

SuperBlock ist unlesbar bzw. beschreibt kein gültiges ext2
Dateisystem.  Wenn Gerät gültig ist und ein ext2
Dateisystem (kein swap oder ufs usw.) enthält,  dann ist der SuperBlock
beschädigt, und sie könnten e2fsck mit einem anderen SuperBlock:
    e2fsck -b 8193 <Gerät>

do i have to run resize2fs so the physical and the size of the fs do match again? (i didnt run this command yet)? or is it enough to recreate the array?

share|improve this question
    
Oh, i forgot to say Hello Guys :) –  callmefunkeyescobar Mar 4 '13 at 12:51
    
Do NOT bypass md and touch the underlying disk directly! Also it would help if you prefix the commands with LC_ALL=C so they speak English. –  psusi Mar 4 '13 at 16:08
    
Do you still have the original ARRAY line from /etc/mdadm.conf? –  psusi Mar 4 '13 at 16:15

1 Answer 1

Maybe I am too stupid, but I didn't find the comment-button anywhere, am I only allowed to comment once when I am not registered?

Do you still have the original ARRAY line from /etc/mdadm.conf? – psusi

No, unfortunately everything of the old system is gone. I am doing a photorec right now and I already made a dd-image of one disk. Is it possible to work with the .img-file? (mounting the iso is not possible). I really think due to the different blocksizes of the physical and the filesystem that the partition-table is gone. should I try to rebuild it when photorec is done?

EDIT: SOLVED, got my data back. raid is still messed up but now i can rebuild it and then copy my data back on it. see thread here: http://ubuntuforums.org/showthread.php?t=2122138&p=12540725

So here is what i did:

  1. i made an DD-Image of one of the RAID1-Partitions (in this case /dev/sdb2).

  2. i downloaded and ran testdisk on the IMAGE, NOT the partition itself.

    sudo ./testdisk_static /path/to/dd-image

  3. hit enter, selected "none" at partition table type

  4. selected analysis and let it run, after that hit enter

  5. selected "deeper search" and stopped it by pressing enter as soon as an ext-4 entry showed up

  6. selected one of the ext4 entries and pushed "p" for listing files (note: if it says "filesystem damaged" you maybe have to let the deeper search run through and test every entry)

  7. selected the folders on the next page and copied it to another HDD

  8. done

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.