Friday, June 7, 2019

linux - Re-assembling the RAID-5 array reboots my CentOS-5 machine




I have 3 HDD's, each divided into 3 partitions.



I had created a RAID-1 for boot partition




  • md0 created from sda0, sdb0



and had also created two RAID-5 arrays:





  • md1 created from sda1, sdb1, sdc1

  • md2 created from sda2, sdb2, sdc2



It used to work fine but one day I had to power off the machine (cold reboot) to get any response from the machine. After that, when the system started booting, it tried for a while to reconstruct the RAID arrays but after a few minutes it crashed silently.



I booted the system in linux rescue mode from the DVD and tried to re-assemble the RAID devices manually. I was able to re-assemble md0 and md1 using:





mdadm --assemble --scan /dev/md0



mdadm --assemble --scan /dev/md1




But when I try to re-assemble md2 using:




mdadm --assemble --scan /dev/md2





the system reboots silently again.



How can I fix this problem?


Answer



I was suspecting that it's a hardware issue but the problem was the old kernel used in CentOS5. I used Ubuntu 10.10 32bit edition live CD and was able to reconstruct the array with it.



After reconstructing the array, I rebooted the server with the original CentOS on it and then upgraded all packages and the kernel. It's been working just fine ever since.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...