Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-18-2014, 09:05 PM
|
#1
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554
Rep:
|
Ubuntu Server Software Raid 5 - How does the system boot if one drive goes down?
Hello,
I am thinking of doing a raid 5 on an ubuntu server 14.04 system with 3 x 3TB drives and have a few questions...
1. How would the system boot if one of the drives goes down?
2. Is the boot loader installed on each drive?
3. If I pulled out a drive and put in a new drive, would it auto-rebuild or do I need hardware raid for that feature?
-Thanks
|
|
|
04-19-2014, 05:32 AM
|
#2
|
LQ Newbie
Registered: Sep 2012
Posts: 4
Rep: 
|
Hey,
1. How would the system boot if one of the drives goes down?
It would boot normally, if ONE drive fails, this is a benefit of RAID
2. Is the boot loader installed on each drive?
Not 100% but Id guess its one drive properly and also on the parity if a drive fails, either way losing any of the 3 drives your system will still boot.
3. If I pulled out a drive and put in a new drive, would it auto-rebuild or do I need hardware raid for that feature?
with mdadm yes, but of the top of my head I belive you need to enable this feature
|
|
|
04-19-2014, 02:02 PM
|
#3
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554
Original Poster
Rep:
|
Thanks for the answers...
On questions 1 and 2, If the boot loader is loaded onto only one drive and that happens to be the drive that goes bad....how would the system boot up?
|
|
|
04-19-2014, 05:06 PM
|
#4
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554
Original Poster
Rep:
|
OK, so I setup a test virtualbox 14.04 server with 4 drives in a raid 5. Installed and booted up fine. I removed one of the drives after shutting it down. When I reboot, it goes to an initramfs shell and won't boot all the way. Rebooted it and same thing.
Wasn't the point of raid that it is able to withstand one drive failing or disappearing?
What do I do now? How could I use this in a production environment if it can't withstand one drive going out???
|
|
|
04-20-2014, 06:01 PM
|
#6
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554
Original Poster
Rep:
|
Hello, I am familiar with Raid and have used hardware raid in many cases. I have been wanting to use the included software raid with ubuntu for some time and so this is my test machine to do just that.
My point was that when installing raid 5 onto 4 drives...one drive should be able to fail and have the system still boot up.
What happened was that if it was the sata0 port drive that I take out, it did not boot up anymore. But if any of the other drives are the one that I take out, then the system boots. Of course I know I need to re-add the drives to the raid after plugging them back in. I also know that if I take two drives out the system should not boot.
There doesn't seem to be any documentation that I can find stating where the bootloader is installed, or basic how to info for simple usage scenarios such as mine.
Any help is greatly appreciated
|
|
|
04-20-2014, 07:40 PM
|
#7
|
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,196
|
AFAIK you cannot boot from a RAID5 array. This is somewhat in contradiction with your succesful booting from a RAID5 when it was still complete. It you really booted from RAID5 then something has changed during the past 2 years or so.
Anyway, most often the data partition is put in RAID5 but the boot partition in RAID1. The reason for the RAID5 is that RAID1 is not very efficient, you lose need +100% hard disk space.
For the system partition which is relatively small, this is not a significant drawback. You are able to boot from RAID1. Just make sure you installed GRUB in the MBR of both disks which comprise the RAID1.
Then any single failure won't prevent you from booting. Either the partition is RAID1, or the boot partition was not on the failing drive.
jlinkels
|
|
|
04-21-2014, 03:17 PM
|
#8
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554
Original Poster
Rep:
|
Very interesting...didn't know that.
When the system was installing grub, it said it was installing to sda, sdb, sdc, sdd
So I am setting up the system again with raid 1 for the boot partition and swap partition and raid 5 for my data partition. I'll report back with my findings.
|
|
|
04-21-2014, 06:39 PM
|
#9
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554
Original Poster
Rep:
|
Ok so this method works, however, when I remove a drive and then try to re-add it, that feature will not work.
1. After install, boot up normally
2. Shutdown and unplug one drive
3. Boot back up - raid says degraded
4. Shutdown and plug drive back in
5. Boot back up - Raid is still degraded. "mdadm --manage --re-add /dev/sda1 /dev/md0" reports that it is not possible. I am forced to run "mdadm --manage --add /dev/sda1 /dev/md0" and that works, but has to do a complete rebuild. So on my test VM it's quick, but once I throw in some 3TB drives, it will probably take a day or two.
It's too bad that mdadm has this re-add feature but can't actually use it. Maybe it's just a bug as this is my second test vm system and both had this same exact issue.
Does anyone have any ideas?
|
|
|
04-21-2014, 07:50 PM
|
#10
|
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,196
|
I didn't know about the re-add option at all. It seems a bit scary to me anyway. If the disks are out-of-sync, they are out of sync. How should mdadm assess that else but check every bit, thus doing a complete rsync. But like I said, I am not familiar with the option.
In normal use, you wouldn't use it very often, would you? And since the array is accessible during resync, I don't really care.
About resyncing speed, check this link: http://www.linuxhowtos.org/Tips%20an...id1speedup.htm. My experiences here: http://www.linuxquestions.org/questi...2/#post5116558
My 2 TB RAID-1 syncs in a couple of hours.
jlinkels
|
|
|
All times are GMT -5. The time now is 01:50 AM.
|
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
|
|