LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RAID wont rebuild on reboot (http://www.linuxquestions.org/questions/linux-newbie-8/raid-wont-rebuild-on-reboot-599906/)

qwerty_tele 11-15-2007 03:03 PM

RAID wont rebuild on reboot
 
I am stumped. I used mdadm to create a RAID-0 array for a server. I can build the array and mount it to /imagesbu (images back-up folder) and it shows 2.7 TB available. I modified fstab /dev/md0 /imagesbu ext3 defaults 0 0 to mount the raid on boot. When the system reboots, it does not mount md0, because it cannot read md0. I have to put md0 back together with mdadm and remount it to /imagesbu. The array seems to be working properly, because I can write to the /imagesbu folder, reboot the system, rebuild the array and when I remount md0, the files are there.

Cat /proc/mdstat seems to be normal when it's rebuilt.

What am I missing?

greyphi 11-16-2007 01:31 PM

Where is your Grub?
 
If you've put grub onto md0, then there's no way that it can boot from a software-raid setup.
There may be an easier way, but what I did was cut a 100mb chunk off the first hard drive and installed /boot to that.
Then used the rest of the space for the raid-0 partition.
Haven't had any problems after that.

greyphi 11-16-2007 02:01 PM

cat /boot/grub/device.map ?
 
Oh, forgot to ask, could you post your /boot/grub/device.map?

Any possibility that your mdadm isn't being loaded on the right runlevel?

qwerty_tele 11-16-2007 05:09 PM

RAID Update
 
Thanks for the response. I forgot to mention that this was a non-boot RAID. Centos 5 is on a separate drive.

And I found out that mdadm did not create a mdadm.conf file by default, I had to write one myself. That was the solution.

gdongg 11-17-2007 11:49 AM

Hey qwerty_tele,

I`m having the same problem........everything looks fine before reboot...but the raid does not come up after reboot....

I looked for the mdadm.conf file and its not there.

can you give me a copy.

you can just paste it here.

Thanks,
gdongg.

necman 04-23-2008 03:38 AM

Quote:

Originally Posted by gdongg (Post 2962108)
Hey qwerty_tele,

I`m having the same problem........everything looks fine before reboot...but the raid does not come up after reboot....

I looked for the mdadm.conf file and its not there.

can you give me a copy.

you can just paste it here.

Thanks,
gdongg.


To create the mdadm.conf follow this steps:
(the raid must be created and assembled)

mkdir /etc/mdadm
touch /etc/mdadm/mdadm.conf
ln -s /etc/mdadm/mdadm.conf /etc/mdadm.conf
cd /etc/mdadm
cp mdadm.conf mdadm.conf.`date +%y%m%d`
echo "DEVICE partitions" > mdadm.conf
mdadm --detail --scan >> mdadm.conf


All times are GMT -5. The time now is 04:45 PM.