LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Assembly problems with Raid 5 Array (https://www.linuxquestions.org/questions/linux-hardware-18/assembly-problems-with-raid-5-array-741427/)

TexasMike 07-20-2009 10:43 AM

Assembly problems with Raid 5 Array
 
Hello all,
My system: Gigabyte MB with Intel Core2 Quad, 6GB RAM, 3 internal SATAII drives, I internal SATA DVD/CD drive R/RW, Symbios SCSI controller and an external SUN D1000 Drive enclosure with 12 36GB SCSI drives in a Raid 5 Array with 10 disks in the Array and 2 spares.

I am having a problem getting my Raid 5 Array to "re-assemble" and mount. This array was working fine, but a power "blink" caused it to power off last Thursday (July 17, '09). When the Array was powered back "On" and the PC re-booted, I noticed the array was not available and tried to get it to mount - array will not mount. I then tried to re-assemble the array manually with the following command and results:

Quote:

sudo mdadm --assemble --verbose /dev/md0 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1
mdadm: looking for devices for /dev/md0
mdadm: /dev/sdd1 is identified as a member of /dev/md0, slot 0.
mdadm: /dev/sde1 is identified as a member of /dev/md0, slot 1.
mdadm: /dev/sdf1 is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdg1 is identified as a member of /dev/md0, slot 3.
mdadm: /dev/sdh1 is identified as a member of /dev/md0, slot 4.
mdadm: /dev/sdi1 is identified as a member of /dev/md0, slot 5.
mdadm: /dev/sdj1 is identified as a member of /dev/md0, slot 6.
mdadm: /dev/sdk1 is identified as a member of /dev/md0, slot 7.
mdadm: /dev/sdl1 is identified as a member of /dev/md0, slot 8.
mdadm: /dev/sdm1 is identified as a member of /dev/md0, slot 9.
mdadm: added /dev/sde1 to /dev/md0 as 1
mdadm: added /dev/sdf1 to /dev/md0 as 2
mdadm: added /dev/sdg1 to /dev/md0 as 3
mdadm: added /dev/sdh1 to /dev/md0 as 4
mdadm: added /dev/sdi1 to /dev/md0 as 5
mdadm: added /dev/sdj1 to /dev/md0 as 6
mdadm: added /dev/sdk1 to /dev/md0 as 7
mdadm: added /dev/sdl1 to /dev/md0 as 8
mdadm: added /dev/sdm1 to /dev/md0 as 9
mdadm: added /dev/sdd1 to /dev/md0 as 0
mdadm: /dev/md0 assembled from 6 drives - not enough to start the array.
and here is the result of cat /proc/mdstat:

Quote:

root@UE-2:/home/mike# cat /proc/mdstat
Personalities :
md0 : inactive sdd1[0](S) sdm1[9](S) sdl1[8](S) sdk1[7](S) sdj1[6](S) sdi1[5](S) sdh1[4](S) sdg1[3](S) sdf1[2](S) sde1[1](S)
355597440 blocks

unused devices: <none>
I do not see the reason the system is only using 6 of the 10 drives. Is there an error log file for mdadm specifically?

Any advice or pointers would be most welcome...

Regards...

TexasMike

zeno0771 07-21-2009 01:12 PM

I mount mine without partition numbers, i.e.,
Code:

sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf
mdadm gives me a bunch of hell if I try to mount my array with the partition numbers; I have to restart my array so rarely that I forget about that myself half the time.

Restart the box (or stop the existing array and fail/remove the array, whichever is faster) so you have a clean slate. Then assemble without partition numbers. Of course if you have multiple partitions on the drives that won't work but if you're using RAID 5 you probably don't.

TexasMike 07-23-2009 08:30 AM

zeno771,
Thanks for the reply. I have never used the Assemble command without the partition numbers - didn't even think to try it without the numbers...
Anyway, I rebooted the system and issued the command:
mike@UE-2:~$ sudo mdadm /dev/md0 -S

I then issued the following command:
Quote:

mike@UE-2:~$ sudo mdadm --assemble --verbose /dev/md0 /dev/sdd /dev/sde /dev/sdf /sev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm
Here is the response:
Quote:

mdadm: looking for devices for /dev/md0
mdadm: no recogniseable superblock on /dev/sdd
mdadm: /dev/sdd has no superblock - assembly aborted
This is different than the response received when using the partition numbers (NOTE: you are correct in the assumption that all drives are a single partition using the entire disk).

I'd like to re-assemble this array and save all the data to another array, then re-format this array to insure it is functional and stable. Can you suggest a method for repairing the Superblock on /dev/sdd that will not screw up my data?

TIA for your assistance...


Regards...

TexasMike

zeno0771 07-24-2009 11:09 AM

Yeah, that's usually the next error I get too :D. I take it, then, that you have this array in mdadm.conf? Anyway, comment out the array in mdadm.conf before restarting; stopping the array just idles it (which is ordinarily a good thing). I seem to remember having to use --zero-superblock for this once but I don't recall if that was before I loaded up the drives with data.

I *just* had this happen last week and I'm looking through my logs, but I'm not finding any magic fix. The only difference is I don't have my array in mdadm.conf; I start it manually to see if anything's gone wrong, so when I restart the machine the array isn't assembled. Again, however, mine's on a separate box so it's rarely restarted.

On another note, with 2 spares you might want to consider RAID 6 instead of 5; tolerates the loss of 2 drives and as we know, the higher the number of drives in an array the more likely a multiple failure will occur.


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