LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-26-2007, 09:44 AM   #1
mackdav
Member
 
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113

Rep: Reputation: 16
Question How do I boot from a RAID-1 survivor?


Hi folks,

I just had a disk failure of one of the members of my RAID-1 boot disk. Fortunately for me it turned out to be the non-boot disk (ie I had hda and hdc mirrored, and hdc was the one that died -- fortunately my recovery process worked), however it does raise a question:

If the disk that failed turned out to be the boot disk, how would I boot off of the survivor? ie if hda had died, how do I boot of hdc once I'd replaced the dead one?

I suspect the answer is "get a rescue CD", but if there are better answers I'd like to hear them.
 
Old 03-26-2007, 10:03 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
I guess you are talking about software RAID...
I use mdadm. What I had to do was install the bootloader in the MBR of both disks with grub.
livecd linux # grub --no-floppy --device-map=/boot/grub/device.map

grub> device (hd0) /dev/hda
grub> root (hd0,0)
grub> setup (hd0)

grub> device (hd0) /dev/hdc
grub> root (hd0,0)
grub> setup (hd0)

grub> quit
This way, you can boot of any disk and the box will boot.

If you need to add a new disk to the degraded RAID, view the man pages of mdadm, it's all there... I seem to remember something along the lines of:

mdadm /dev/mdx -a /dev/hdax
where mdx is the RAID that you want to fix and hdax is the disk (partition) you want to add to the degraded RAID.

A watch cat /proc/mdstat will help

-Ed
 
Old 03-27-2007, 09:29 AM   #3
mackdav
Member
 
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113

Original Poster
Rep: Reputation: 16
Not quite what I'd asked.

My scenario: I have two disks, hda and hdb. hda dies, so I replace it with a blank disk. Now when I boot, my computer says: hey, there's no OS on hda... how do I get past that?
 
Old 03-27-2007, 09:38 AM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Actually, what he wrote is very much what you need to do. You'll need to install grub to /dev/hdb in your case, or you could swap the location of the drive, from the secondary to the primary position. You should also rebuilt as detailed in this article, once you get the system back up with one good and one empty disk -

http://www.howtoforge.com/replacing_..._a_raid1_array

Peace,
JimBass
 
Old 04-03-2007, 03:20 PM   #5
mackdav
Member
 
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113

Original Poster
Rep: Reputation: 16
Ahh, I see. I did not read anywhere in the literature that if hda dies, I can insert hdb into hda's place, then add a new hdb, and the system would boot.

I only have experience with systems like Sun's ODS, which gets annoyed if you fail one disk then change the IDs of the survivors.
 
Old 04-04-2007, 01:04 AM   #6
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi,
It's probably not in the doc 'cause it's not the proper way but it certainly works. I did it until I found you could boot of any disk in the RAID.

Remember you can test by software failing the disk. This will avoid you having to disconnect a disk, boot, reconnect, ...

Best of luck.
-Ed
 
  


Reply

Tags
boot, degraded, grub, mdadm, raid, software



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 do I boot from a RAID-0 survivor? mackdav Linux - Server 4 03-26-2007 09:43 AM
using windows nt boot loader to dual boot in raid erichoangnguyen Linux - Newbie 7 12-21-2006 07:13 PM
After boot up I can't boot from RAID array. webguyinternet Linux - Hardware 2 10-06-2006 10:22 AM
Hardware raid 1 | Fedora 5 | 3Ware raid | boot gomanza Linux - Hardware 4 09-28-2006 11:56 AM
Will a ex - Software Raid 1 disk boot without Raid software? carlosruiz Linux - Software 0 05-27-2006 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration