LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   RAID 5 after Power outage (https://www.linuxquestions.org/questions/linux-hardware-18/raid-5-after-power-outage-349031/)

RabidSquirrel 08-01-2005 07:52 PM

RAID 5 after Power outage
 
We had a power outage and now my RAID 5 array is not being detected. I get a strange error when running fdisk on any of the 4 drives in the array

Code:

# fdisk /dev/hde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 30401.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/hde: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System

Command (m for help):

I definately dont like the looks of that. For some reason it isn't showing any partition information.

mdstat shows nothing either:
Code:

# cat /proc/mdstat
Personalities :
unused devices: <none>

Anyone have any advice? Did I somehow lose my data in the array? Please help.

Diablo3d 08-02-2005 02:58 PM

Hey,

Are you using fakeraid? It sounds to me like this happened:

1) Fake-raid controller like Highpoint 1640a
2) Array is broken
3) You booted from a recovery disk that doesn't have the drivers for the raid controller modules loaded

Generally speaking, if you pull a drive from a hardware raid array and connect it to a standard controller (as would happen in the above example) you won't see any partition information. Sometimes you will see partition info on the first drive, but nothing on any of the others (because of striping).

what kind of raid controller do you have, or were you using 100% software? Also what distro are you using?

RabidSquirrel 08-02-2005 05:54 PM

Quote:

Originally posted by Diablo3d
Hey,

Are you using fakeraid? It sounds to me like this happened:

1) Fake-raid controller like Highpoint 1640a
2) Array is broken
3) You booted from a recovery disk that doesn't have the drivers for the raid controller modules loaded

Generally speaking, if you pull a drive from a hardware raid array and connect it to a standard controller (as would happen in the above example) you won't see any partition information. Sometimes you will see partition info on the first drive, but nothing on any of the others (because of striping).

what kind of raid controller do you have, or were you using 100% software? Also what distro are you using?

Sorry I should have provide a lot more information about my setup. I'm running Debian Testing. The drives are connected to 2 Promise PATA adaptors (non-RAID, just plain old PATA). One drive per ATA channel. Using 100% software raid.

From everything I can tell, the drives are still in good shape (i.e. not a hardware failure). It looks like, for whatever reason, the partition information is screwed up. They are no longer recognized as "fd" or whatever the linux raid partition type is.

dmesg says basically the same thing as fdisk:
Code:

hde: WDC WD2500JB-00GVA0, ATA DISK drive
ide2 at 0xdfa0-0xdfa7,0xdf8e on irq 217
hde: max request size: 1024KiB
hde: 488397168 sectors (250059 MB) w/8192KiB Cache, CHS=30401/255/63, UDMA(100)
 /dev/ide/host2/bus0/target0/lun0: unknown partition table
....
(repeats for hdg, hdi, hdk)
....

Also here is the contents of /etc/raidtab if that helps:
Code:

raiddev /dev/md0
raid-level      5
nr-raid-disks  4
nr-spare-disks  0
persistent-superblock  1
parity-algorithm        left-symmetric
chunk-size      512
device          /dev/hde
raid-disk      0
device          /dev/hdg
raid-disk      1
device          /dev/hdi
raid-disk      2
device          /dev/hdk
raid-disk      3


RabidSquirrel 08-02-2005 06:46 PM

ooookay. I figured it out. I was booting to the incorrect kernel. For some reason my grub config was booting the default Debian 2.6 kernel... which apparently does not have support for software raid or that raid partition type. I should have figured that out by the fact that mdstat did not list any supported "Personalities".

It had been so long ago that I had made a custom kernel (Feb 8th timestamp) that I thought for sure I must have restarted since then. When you mentioned the modules above in #3 it got me thinking on the right line. Everything is gravy now. Partitions being detected, all data is still there. Thank god (and you).


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