| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-26-2007, 09:44 AM
|
#1
|
|
Member
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113
Rep:
|
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.
|
|
|
|
03-26-2007, 10:03 AM
|
#2
|
|
Member
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412
Rep:
|
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
|
|
|
|
03-27-2007, 09:29 AM
|
#3
|
|
Member
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113
Original Poster
Rep:
|
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?
|
|
|
|
03-27-2007, 09:38 AM
|
#4
|
|
Senior Member
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100
Rep:
|
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
|
|
|
|
04-03-2007, 03:20 PM
|
#5
|
|
Member
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113
Original Poster
Rep:
|
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.
|
|
|
|
04-04-2007, 01:04 AM
|
#6
|
|
Member
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:36 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|