LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Superblock problems (I think) (https://www.linuxquestions.org/questions/linux-hardware-18/superblock-problems-i-think-808700/)

habiem 05-18-2010 05:23 PM

Superblock problems (I think)
 
2 Attachment(s)
Hi all, had a disk in a RAID 5 go bad yesterday. After I replaced the drive this morning, the system fails to boot. It's complaining about a bad magic number. From what I've read today, this should indicate a bad superblock. I tried to view backup superblocks with dumpe2fs | grep 'superblock' and was told bad magic number. To me, that doesn't sound promising. Attached are the results of an fdisk -l. Does the partition table look OK? Also, attached is the output from fsck /dev/sda4. it says "Attempt to read block from filesystem resulted in short read while trying to open /dev/sda4. Could this be a zero-length partition?"

This is a dell poweredge 1900. 3x500GB drives in a RAID 5. It was running CentOS 5.3.

Any help anyone can give to get it back up and running would be great. Yes, I have a backup, but it's online and there's about 400GB. I'd love to be able to dump at least some of the data to an external drive, if possible. Thanks!

impert 05-18-2010 06:24 PM

Hi,
You may get a better answer from someone who knows more, but this is what I would try:
Get hold of a Live CD of a distro which uses Grub1 not Grub2 or Lilo. That means most distros.
Boot with it and get a root terminal. Type "grub" to get a grub prompt.
Then
Code:

root (hd0,2)
setup (hd0,2)

This will put Grub into the superblock of sda3. (I assume it is in sda3 that your linux lives)
If you then type
Code:

chainloader +1
boot

it ought to boot. If you get an error eg "File not found" or some such, try typing (from the grub prompt)
Code:

kernel /boot/vmlinu
and then hit the TAB key for autocompletion. Then type
Code:

initrd /boot/ini
and hit TAB again.Then type
Code:

boot
and it should boot.
If you have been using Grub1 to boot, it should be on the MBR. It may be corrupted,in which case from a grub prompt (either using your live CD or in a root terminal in linux), typing
Code:

root (hd0,2)
setup (hd0)

will put it into the MBR, overwriting whatever was there.
If you're with Grub2, then (from your installed linux), typing in a root terminal:
Code:

grub-install /dev/sda
update-grub

will install Grub2 into the MBR, overwriting whatever was there.
I think that the fsck message was probably normal, given that you tried to fsck an extended partition.

habiem 05-19-2010 10:24 AM

1 Attachment(s)
Alright, here's where everything is at now. it tries to boot, but fails (pic below). To me, it looks like the filesystem is totally toasted. If anyone thinks there is a way to salvage it, let me know...

Thanks

impert 05-19-2010 11:52 AM

I'd be surprised if it is impossible to recover it, but I can't help you, I know nothing about Raid


All times are GMT -5. The time now is 04:00 AM.