Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.79 sec)
Basic RAID config for Ubuntu Server

I have two identical drives in my new server and I'm going to put Ubuntu on it.

What's the most reliable RAID config for automatically running off the other drive if a drive fails ? I've never used RAID before. Cheers for any help.
Asked by:
JimmyC
945 points
 Report Abuse
 Share Page - Category: Ubuntu Linux - Tags: Basic RAID config for Ubuntu Server
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (6)

Best Answer

If you have two hard drives, and want to mirror the data on your drives, then the RAID configuration that would suit your needs is RAID 1.

Response by:
Bashi
80 points
You can type

lsmod |grep network/eth/wlan

if don have you must install network driver

Response by:
mohamad_kian
1548 points
The only initial downside of using software RAID1 is that it is the partitions that are mirrored, not the drives themselves. When the install process configures Grub to boot the server, it will only do it on the first drive. If that was to fail and the server restarted, any attempt to boot from the second drive will fail. Use the following (although the first three lines are normally optional) to configure both drives correctly:

grub>device (hd0) /dev/sda

grub>root (hd0,0)

grub>setup (hd0)

grub>device (hd0) /dev/sdb

grub>root (hd0,0)

grub>setup (hd0)

The "device (hd0) /dev/sdb" is important: It tells grub to treat the drive as if it was sda when configuring it, not sdb. When it reboots, it will essentially become sda and therefore grub will see it as the first disk; if its looking around for sdb it won't find the /boot partition and fail to boot.

Response by:
jonathan
335 points
Hi,

If you have only two disks and want redundancy then the you want to use RAID 1. RAID 1 is often referred to as mirroring since each disk in the array is a mirror of the other and contains the same data. What gets written to one is written to the other so in the event that one of the disk fails no data is lost.

You may have a hardware RAID controller in your server. If not Linux provides a software RAID solution and you can configure this when you reach the disk partitioning stage of your Ubuntu install. You can find more information on setting up software RAID here.

https://help.ubuntu.com/community/Installation/SoftwareRAID

Response by:
Jimbob
437 points
Correct, when the drive fails OS will continue to run till you replace the drive, unless the other drive fails before you replace the failed one.

If the server support hot swappable drives then you wont even need to turn it off to replace the failed one

Response by:
BigD
45 points
Thanks. Would this mean that if one drive failed I wouldn't need access to the Server (unless I was to replace the failed drive) but it would keep running automatically ?

Response by:
JimmyC
945 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle