LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-21-2011, 06:35 AM   #1
Annielover
Member
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu Server Edition, Fedora 16
Posts: 90

Rep: Reputation: 8
RAID compatibility with ubuntu server


I have a question about RAID in combination with Ubuntu Server 10.04 LTS.
Currently I have two physical drives: one for my OS and one for my data. But the data drive is getting too small so I'd like to add another data drive, which I want to be in RAID with the drive I already have.

My question is: can I install my RAID array without re-installing Ubuntu?

And how should I configure Ubuntu? My data disk is now mounted on
Code:
/media/sdb1
Does that stays the same if I install my RAID array?

Has anybody a tutorial about this stuff?

Thanks!!
 
Old 08-21-2011, 09:41 AM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
My experience is with Fedora/Red Hat, but I do have Ubuntu Netbook remix on my HP Mini so...

Quote:
My question is: can I install my RAID array without re-installing Ubuntu?
Yes, I don't see why not. I'm assuming software RAID, and probably RAID1. The 'mdadm' package is available in Synaptic. I've added mdadm after installation on Fedora and it works fine.

Quote:
And how should I configure Ubuntu? My data disk is now mounted on
Code:
Code:
/media/sdb1
Does that stays the same if I install my RAID array?
No, when you create the new RAID logical drive it'll be named /dev/md0 (by default).

You can actually create a new RAID array with a drive missing; move data into it; and then add the missing drive later.
(btw, I'm assuming that your sdb drive is an internal drive mounted on /media/sdb1 - normally external drives are automounted on /media in Ubuntu. External drives and RAID are not a good combination.)

BUT...

Quote:
But the data drive is getting too small so I'd like to add another data drive, which I want to be in RAID with the drive I already have.
RAID won't help you here. A RAID1 array is composed of two (nearly) equal size partitions (or drives) that are mirrored. If your sdb1 drive is too small, mirroring it won't make it any bigger, it'll just make it redundant and resilient. (See https://raid.wiki.kernel.org/index.php/Linux_Raid.)

If your plans are to add a large drive; move your data to it; replace your old, empty sdb drive with a new large drive; add the new large drive to the RAID array. That's doable.

Hope that helps.

Edited with two afterthoughts:

LVM makes life much easier in terms of moving data around.

If you added two new drives (equal in size to your data drive), you could do a RAID5 array. That'd roughly double your data drive. Same procedure to implement: create a 3 drive RAID5 from the two new ones with a missing drive; move the data there; add the original empty drive to the array. RAID1 performs better; RAID5 makes better use of space.

Last edited by tommylovell; 08-21-2011 at 10:04 AM.
 
Old 08-22-2011, 12:21 PM   #3
Annielover
Member
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu Server Edition, Fedora 16
Posts: 90

Original Poster
Rep: Reputation: 8
Thanks for your reply tommylovell. Well, actually I want to make use of my onboard RAID controller of my MoBo. So that's not really software RAID isn't it? It's a combination of soft - and hardware RAID.
I'd like to make a RAID 0 system, not a RAID 1. But if I use software RAID (mdadm), does it decrease performance compared to hardware RAID?

And with RAID0, can I use the same procedure to implement my RAID array?
 
Old 08-22-2011, 02:06 PM   #4
travisdh1
Member
 
Registered: Sep 2008
Distribution: Fedora
Posts: 129

Rep: Reputation: 22
Quote:
Originally Posted by Annielover View Post
Thanks for your reply tommylovell. Well, actually I want to make use of my onboard RAID controller of my MoBo. So that's not really software RAID isn't it? It's a combination of soft - and hardware RAID.
It's the worst of both actually. With software raid if your system dies and the drives are ok you can put them in a different system and get em mounted whereas with the onboard raid you can't do that, and it will still use the processor to do all the raid work. So it's my opinion that using software raid is better in this case as the linux mdadm raid utilities are quite good.

Quote:
Originally Posted by Annielover View Post
I'd like to make a RAID 0 system, not a RAID 1. But if I use software RAID (mdadm), does it decrease performance compared to hardware RAID?
Depending on the motherboard drivers the software raid is probably going to perform better. Most motherboards don't have good drivers for the software raid that they do (unless you happen to have a server class board with a real raid controller built in.) I don't think it will make a huge difference either way as far as performance goes.

Quote:
Originally Posted by Annielover View Post
And with RAID0, can I use the same procedure to implement my RAID array?
You should be able to do a RAID0 even easier as you can make the array without the current disk, copy the data to the "array", and then reformat the original disk and add it into the array.
 
Old 08-22-2011, 02:40 PM   #5
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
I'm in full agreement with travisdh1.

There are three types of RAID on Linux: true hardware RAID, like the HP SmartArray Controller; Fake RAID, where you have RAID hardware but most of the RAID "work" is done in software in the RAID driver; and software RAID, or md (multiple device) RAID.

You'd have to check to see if your onboard RAID Array hardware is true hardware RAID or Fake RAID. If it is the later, I'd go with software RAID for the reason that travisdh1 pointed out - in the event of a motherboard failure you can simply move the drives to a new Linux system and your data is intact. If you have Fake RAID, you have to replace a failed mother board with one that has identical (or at least compatible) RAID hardware.

I have RAID hardware on two of my machines at home but used software RAID (RAID1) instead. It makes it easy to upgrade to a new motherboard (which I've done a few times) without having to find a compatible one.

RAID0? I dunno. Since it really isn't RAID and gives you no resiliency, I'd install LVM. LVM would at least allow you to recover any Logical Volumes that were entirely resident on a surviving drive if the other drive quit (although that's a big 'if'). And it allows you to more easily upgrade a drive later on ('pvmove' command). But many people don't like LVM, so it's a matter of preference.
 
Old 08-22-2011, 02:46 PM   #6
garydale
Member
 
Registered: Feb 2007
Posts: 142

Rep: Reputation: 23
I would strongly advise against using RAID 0 if your goal is simply to gain more space. Get a second drive and use it for data. Adding the second spindle will speed things up by itself.

RAID 0 makes you dependent on both drives functioning. This is NOT a good idea. A better way of achieving the same result is to use LVM to create a logical volume that uses both your original data drive space and the space on the new drive.

However, I always prefer to Keep It Simple. You can probably divide your data logically between the two drives to make use of both.

Alternatively, add two more drives to create a RAID 5 array. Note that the /boot partition can't be on RAID 5 but it can be on a three-drive RAID 1 array.

So get two more drives the same size as your current and partition them with 100M for /boot and the rest for everything else.

Assemble a RAID 1 array from the 100M partitions. This will be /dev/md0.

Assemble a RAID 5 array (with one drive missing) from the rest. This will be /dev/md1.

Start the arrays. Partition /dev/md1 to approximate your current hard drive (e.g. / and /home partitions at least) then copy all of your data over.

Check out the RAID howtos on setting up RAID on an existing system. It's a little complicated but worth the trouble. Once you've got your system booting into the RAID arrays, you can repartition your original drive to match the new ones and add it into the RAID arrays.

This will give you twice the space for your data plus give you redundancy in case of a single-drive failure.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] Ubuntu 10.04 Server RAID-1 installation problem jsalelle Linux - Server 5 01-07-2011 08:56 AM
Problem configuring RAID 5 under Ubuntu Server 9.10 zcruzm Linux - Server 5 01-17-2010 07:23 PM
Dell PowerEdge SC440 Compatibility with Ubuntu Server Edition TalasGrim Linux - Hardware 4 11-15-2007 08:16 AM
Xubuntu or Ubuntu server versions & RAID Avatar Ubuntu 1 02-09-2007 07:31 PM
nForce3 SATA RAID compatibility ghee22 Linux - Hardware 1 12-07-2005 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:10 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