Koozali.org: home of the SME Server

please help. RAID 5 crashed after power failure. How do I recover the data?

Offline SoftDux

  • *****
  • 240
  • +0/-0
    • http://www.SoftDux.com
yup, and the damage due to lost data is worth MUCH MUCH more than just replacing the HDD :(

Offline SoftDux

  • *****
  • 240
  • +0/-0
    • http://www.SoftDux.com
Something that came to mind:

If my system is in degraded RAID 5, with 2 out of 3 drives working, then why can't I boot up? I thought RAID stripes the parity over all the drives for that exact purpose?

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
If my system is in degraded RAID 5, with 2 out of 3 drives working, then why can't I boot up? I thought RAID stripes the parity over all the drives for that exact purpose?


Sry - I have little time to reply/help now - irresistible family time 8) :D

BUT ... what you have now is a DEAD RAID5  :shock:
(from what I deduct now)
- You had a 4 drive RAID5
- it went degraded when you sent back that IDE drive
- it went dead (fails to autoassemble) when it couldn't find the 3rd drive i.e sda2 (or disk 1 in the conf printout)

In your configuration the RAID1 is boot area only
...after the kernel is loaded it can't contiunue, does panic, because root "/" cannot be found (as it is on md2 which does not get assembled ... see above)

Please have a closer look at that (non performing) drive.
- If possible use a new mdadm on a live linux cd for sleuthing
(keep in mind that the arrangement of your disks is nonstandard and the uuid fails to show correctly)
- Check why you have "all of a sudden" 488397168 sectors on one disk (hpa)

Regards
Reinhold

« Last Edit: January 26, 2008, 05:25:16 PM by Reinhold »
............

Offline SoftDux

  • *****
  • 240
  • +0/-0
    • http://www.SoftDux.com
I never had a 4 drive RAID. Forget about the 4th HDD. I only had 3 drives when I setup the RAID, with the sme nospare option.

I have a spare 320GB (busy empty'ing it right now) - can I add this to the system, partition it same as the rest, & rebuilt the RAID?

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
Hi SoftDux,

In this case let's force with just 2 drives...
(I do still recommend to boot a live cd with a newer mdadm - (SME has 1.2 instead of a current 2.6 :-(  )

sudo mdadm --assemble --scan

...and if that fails (likely) we just push it through
sudo mdadm --assemble --force /dev/md2

If/when md2 does assemble you may just mount and save your data
...if you had an lvm on top just follow the lvm link above starting at "Recovering LVM Setup"

Regards
Reinhold

P.S.: sudo is there just in case - you need to be root for this
P.P.S.: you can ignore md1 - no data from you inside
............

Offline SoftDux

  • *****
  • 240
  • +0/-0
    • http://www.SoftDux.com
RAID 5 crashed after power failure. How do I recover the data? [SOLVED]
« Reply #20 on: February 18, 2008, 08:02:18 AM »
I have solved the problem, and about 90% of my data is back!! :)

After reading a lot on stuff on the net, and playing around with SysrescueCD, I've discovered that I can recreate the HDD partition tables, without formatting them, and then I could rebuild the RAID5 array. So, I've lost about 1 or 2% of my 280GB data. Most of sme itself didn't work properly afterwards, but I was able to move all the data to a USB HDD, and then reformatted all 3 HDD's and reinstalled sme 7.2 from scratch!

Thanx for all your help :)