Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was having Ubuntu 10.04 Server running over a software raid 0. Yesterday, I left it running continuously for 10 hours, when I came back, the computer became weird. I cannot shut it down. It was saying "Bus error" or something similar to that. So I force a shutdown by holding power button for 4 seconds. Then I turn it on back. And here come disaster: The raid was broken. System kept dumping out "Failed command: READ DMA EXT". I tried to run fsck.ext4 /dev/md0 from the Alternate CD rescue mode, but fsck.ext4 then said: "Attempt to read block from filesystem resulted in short read". So I use a Hiren CD and run the hard drive scanner and find 12 bad sectors on second hard drive (and at the very end of the drive: more than 80% from the beginning I recall) The told the software to fix the 12 bad sectors but I doubt if Ubuntu understand the fix.

I again ran the Alternate CD rescue mode again, and did e2fsck /dev/sda but it was saying device or resource is busy.

God and geeks, how come that 12 bad sectors mess up my whole RAID. What should I do to have my RAID and Ubuntu work again?

P/S: Once I get stuff work back, I'll switch to RAID 5. I swear.

share|improve this question
1  
software raid often means trouble –  Pitto Mar 27 '11 at 11:20
2  
I'm really sorry but the recovery process for an error on a RAID 0 volume is "restore from backup, which hopefully is up to date". That's why very few people will recommend you use it for anything. –  RobM Mar 27 '11 at 12:05
    
First you ran fsck.ext4 /dev/md0, but after the Hiren CD manipulation you ran e2fsck /dev/sda. Why different devices? Shouldn't it be the same device, assuming your sectors are repaired? –  grs Mar 27 '11 at 16:25
    
If you are running RAID0 and you then went and manipulated one of the disks manually (as gstoynev mentions), you're totally stuffed. End of story. –  Mark Henderson Mar 27 '11 at 23:42
    
@Pitto people with BS in mind are the real trouble, actually. My LinuxSoftRAIDs work for years w/o any reason to blame it. –  poige Mar 28 '11 at 2:03
show 2 more comments

3 Answers

RAID 0 has no redundancy so errors will break the entire array. Are you confusing it with RAID 1 (mirrored)?

share|improve this answer
add comment

Can you tell us how your RAID 0 array was set up? I had the impression that it consists of 2 physical drives: /dev/sda + /dev/sdb and the resulting device is /dev/md0. Now you are talking about /dev/md1. Does /dev/md0 = /dev/sda1 + /dev/sdb1 and /dev/md1 = /dev/sda2 + /dev/sdb2? And if so - how you expect to repair the md0 filesystem (which is spread across 2 devices/partitions) when you run it only on one of these devices? This is RAID 0, not 1.

The funny thing is none of /dev/sda1, /dev/sda2, /dev/sdb1, /dev/sdb2 is fsck-able without error.

-> is it the same "Superblock invalid" error?

share|improve this answer
    
Yes, it is the same "Superblock invalid" error –  Phuong Nguyen Apr 3 '11 at 2:34
add comment

device or resource is busy

This error message is because your RAID daemon is on. In case of RHEL/CentOS you can stop RAID service/daemon by the command:

mdadm --stop

After stopping RAID, check the file system using fsck -fyC /dev/sda

f - stands for force
y - stands for yes to all
C - stands for progress bar
share|improve this answer
    
No - the problem is (as JamesRyan says) the filesystem is goosed because RAID 0 offers no redundancy. –  DaveG Mar 27 '11 at 15:59
    
Okay, so I stopped /dev/md0 & /dev/md1 => /dev/sda & /dev/sdb can be checked now. When I run fsck /dev/sda & fsck/dev/sdb I received "Superblock invalid" error. I guess because /dev/sad is the whole device and not a valid ext{2,3,4}. The funny thing is none of /dev/sda1, /dev/sda2, /dev/sdb1, /dev/sdb2 is fsck-able without error. I guess I should throw them all and try a scratch raid 5. –  Phuong Nguyen Mar 27 '11 at 16:44
add comment

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.