LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-18-2014, 09:05 PM   #1
xmrkite
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: Reputation: 30
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
 
Old 04-19-2014, 05:32 AM   #2
ameharhughes
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
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
 
Old 04-19-2014, 02:02 PM   #3
xmrkite
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: Reputation: 30
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?
 
Old 04-19-2014, 05:06 PM   #4
xmrkite
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: Reputation: 30
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???
 
Old 04-20-2014, 10:14 AM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
http://www.thegeekstuff.com/2010/08/...vels-tutorial/

read and understand what RAID is and how the different kinds of RAID work/function
 
Old 04-20-2014, 06:01 PM   #6
xmrkite
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: Reputation: 30
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
 
Old 04-20-2014, 07:40 PM   #7
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,196

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
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
 
Old 04-21-2014, 03:17 PM   #8
xmrkite
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: Reputation: 30
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.
 
Old 04-21-2014, 06:39 PM   #9
xmrkite
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: Reputation: 30
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?
 
Old 04-21-2014, 07:50 PM   #10
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,196

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
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
 
  


Reply


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
Ubuntu Server 12.04 - SAS system drive, and won't boot with more than two SATA drives munaye Ubuntu 3 11-04-2013 05:22 PM
UEFI / GPT boot with software raid (Ubuntu 13) JohnLocke Linux - General 3 09-15-2013 12:55 AM
Software RAID 1, if one drive fails I can't boot just from the other! Oskare100 Linux - Server 1 09-23-2007 02:48 AM
Replacing a drive in /boot, software RAID-1 + GRUB tobiasly Linux - Hardware 1 12-21-2005 01:08 AM
Software RAID 1 from Existing Boot Drive johnwyles Linux - General 1 08-05-2005 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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