LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-15-2007, 02:03 PM   #1
qwerty_tele
Member
 
Registered: Oct 2007
Posts: 32

Rep: Reputation: 15
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?
 
Old 11-16-2007, 12:31 PM   #2
greyphi
LQ Newbie
 
Registered: Sep 2007
Location: Calgary, Alberta
Distribution: Debian / Ubuntu
Posts: 5

Rep: Reputation: 0
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.
 
Old 11-16-2007, 01:01 PM   #3
greyphi
LQ Newbie
 
Registered: Sep 2007
Location: Calgary, Alberta
Distribution: Debian / Ubuntu
Posts: 5

Rep: Reputation: 0
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?

Last edited by greyphi; 11-16-2007 at 01:54 PM. Reason: distracted
 
Old 11-16-2007, 04:09 PM   #4
qwerty_tele
Member
 
Registered: Oct 2007
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
Old 11-17-2007, 10:49 AM   #5
gdongg
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
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.
 
Old 04-23-2008, 02:38 AM   #6
necman
LQ Newbie
 
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by gdongg View Post
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
 
  


Reply

Tags
boot, mdadm, raid, raid0


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to rebuild a software RAID combilli Linux - Software 5 02-20-2007 12:09 PM
software raid rebuild sunhui Linux - Software 1 12-17-2006 09:15 PM
Debian Raid 5 rebuild catfishk Linux - Software 3 06-23-2006 09:21 PM
RAID 1 rebuild Roberto Colmegna Linux - Hardware 1 12-07-2005 07:58 PM
Rebuild Software RAID 1 thadco Linux - Newbie 1 06-03-2004 04:06 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration