LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-03-2009, 05:42 PM   #1
trostr
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Unable to recover files in corrupted raid1 array


Can anyone please help me with this intricate problem. I am a newbee and probably always will be.

I have had 2 HDD each of 1TB and 900 GBs of them in raid1. The different partitions on one of the disks were as follows:
sdb1 primary with root files (100 GB)
sdb2 extended
sdb5 was swap
sdb6 was the raid (md0)(900 GB).

I am running Ubuntu 8.04 server edition, kernel 2.6.24-19-server

My problem is that I for some reason checked the install process of the new Ubuntu server 9 and during the setup procedure from the CD I accidently went one step to far so the raid got erased (at least 6% which were enough). This resulted in that my raid drives (sdb6/md0 mounted as /home is not accessible anymore).

trond@server:/$ sudo fdisk -l

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5f22e748

Device Boot Start End Blocks Id System
/dev/sda1 1 182401 1465136001 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00085807

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 12158 97659103+ 83 Linux
/dev/sdb2 12159 121601 879100897+ 5 Extended
/dev/sdb5 121213 121601 3124642+ 82 Linux swap / Solaris
/dev/sdb6 12159 121211 875968159+ fd Linux raid autodetect

Partition table entries are not in disk order

Disk /dev/md0: 896.9 GB, 896991297536 bytes
2 heads, 4 sectors/track, 218992016 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table


sda is a 1,5GB disk inserted after the problem arose to make backup.
So I have checked around and this is the status on my system now:

trond@server:~$ sudo fsck /dev/md0
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/md0

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

And this one

trond@server:~$ sudo fsck /dev/sdb6
fsck 1.40.8 (13-Mar-2008)
fsck: fsck.mdraid: not found
fsck: Error 2 while executing fsck.mdraid for /dev/sdb6

And this one

trond@server:~$ sudo mdadm -D /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Wed Feb 11 00:26:12 2009
Raid Level : raid1
Array Size : 875968064 (835.39 GiB 896.99 GB)
Used Dev Size : 875968064 (835.39 GiB 896.99 GB)
Raid Devices : 1
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat May 2 23:42:42 2009
State : clean
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

UUID : 1bab3281:ef1b1a06:212472d8:04e5d955
Events : 0.2

Number Major Minor RaidDevice State
0 8 22 0 active sync /dev/sdb6

And this

trond@server:~$ sudo mke2fs -n /dev/md0
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
54755328 inodes, 218992016 blocks
10949600 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
6684 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

I have tried both testdisk and photorec also with deepscan on the disk but it returns 0 files and 0 headers found.

trond@server:~$ sudo testdisk -list
TestDisk 6.8, Data Recovery Utility, August 2007
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Please wait...
Disk /dev/sda - 1500 GB / 1397 GiB - CHS 182401 255 63, sector size=512
Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512

Disk /dev/sda - 1500 GB / 1397 GiB - CHS 182401 255 63
Partition Start End Size in sectors
1 P Linux 0 1 1 182400 254 63 2930272002
No partition is bootable
Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63
Partition Start End Size in sectors
1 * Linux 0 1 1 12157 254 63 195318207
2 E extended 12158 0 1 121600 254 63 1758201795
5 L Linux Swap 121212 0 1 121600 254 63 6249285
X extended 12158 0 2 121210 254 63 1751936444
Invalid RAID superblock
6 L Linux RAID 12158 2 1 121210 254 63 1751936319
6 L Linux RAID 12158 2 1 121210 254 63 1751936319

And this

trond@server:/Backup$ sudo debugfs /dev/sdb6
debugfs 1.40.8 (13-Mar-2008)
/dev/sdb6: Bad magic number in super-block while opening filesystem

Also tried this

trond@server:/$ umount /dev/md0
umount: /dev/md0 is not mounted (according to mtab)

trond@server:/$ sudo e2fsck -b 214990848 /dev/md0
e2fsck 1.40.8 (13-Mar-2008)
e2fsck: Device or resource busy while trying to open /dev/md0
Filesystem mounted or opened exclusively by another program?

I have also done a ddrescue of /dev/md0 to an image on my new disk sda without possibility to mount the image.

When I examine one of the disks under windows with WinHex the actual 3rd partition listed with filesystem ? have almost only hexes with 00 00 00 00 etc

I have found one thread with similar problem but different commando to cause problem, however this thread was not solved (http://www.linuxforums.org/forum/mis...-recovery.html)

Can anyone tell me why I cant access the files I had on the raid disk with the abovementioned powerful tools? I have not written data to the disk after the accident. I am happy to provide more info about logfiles or outputs of commands upon request.

Hope for your intellectual responses.
Best regards, Trond
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID1 - fixing a corrupted file system sheepshearer Linux - General 5 10-15-2012 04:43 AM
I don't think I crated a Raid1 array Jan Tanjo Linux - General 5 10-27-2006 08:17 AM
RAID1+LVM: data keeps getting corrupted Chojin Linux - Software 4 10-22-2006 09:55 AM
RAID1 failure - Need advice on ow to recover Ezplan Linux - Hardware 3 01-24-2006 09:10 AM
Recover/Rebuild SW Raid1? FoxNotch Linux - General 1 07-11-2004 10:04 AM


All times are GMT -5. The time now is 03:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration