LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2007, 01:55 PM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Rep: Reputation: 30
About Mirror & RAID


Dear Friends ,

I have the following questions :

1) What is the basic difference between Hardware Mirroring and RAID . Is mirroring and RAID are same ?

2) What is the basic difference between "Software Raid" and "Hardware RAID" ?

3) what is "fault-tolerance" ?
 
Old 02-08-2007, 02:23 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
RAID = Redundant Array of Inexpensive (or Independent) Disks. There are various RAID "levels". Each level describes a different way of doing RAID. There are hundreds of links that will tell you what the different levels are. The two most commonly used are RAID 1 and RAID 5.

RAID 1 = Mirroring. (Everything written to one disk [or partition] will be written to the second disk [or partition] at the same time.) The two copies are "mirrors" of each other because they contain identical information.

RAID 5 = Striping and Parity. Data is written in "stripes" (multiple data bits) across multiple disks along with a parity bit written on another. The disk where the parity bit or the data stripes are written vary so that if you lose any single disk the data can be recovered by using the parity bit with the remaining data bits to figure out what was in the missing data bit (or if the parity bit is lost it knows all the data bits.)

Software RAID typically means you're using something on the host computer to create the RAID. mdadm for Linux creates Software RAID. Veritas Volume Manager used in a lot of commercial installations will do software RAID (but is sometimes used even where one has hardware RAID). All the work for the software RAID is done on the host itself so utilizes its memory and CPU for processing.

Hardware RAID means you have something external to the host computer that is presenting the RAID device as if it were a single disk. Typically these are called "disk arrays" and are devices made specifically for that purpose. Dell sells some (OEM) for PCs. Big commercials ones are those from EMC and Hitachi. These devices will typically have their own memory (called CACHE) and processing to determine how to efficiently handle requests.

Typically Hardware RAID allows you to hot swap failed drives so you can keep running while it rebuilds the replaced drive. Also a lot of the arrays will let you configure hot spare disks so they automatically start rebuilding to an available disk whenever one fails. That allows you to keep the full redundancy until you get a replacement drive.
 
Old 02-10-2007, 01:19 AM   #3
bicolano53
Member
 
Registered: Sep 2004
Location: Philippines
Distribution: red hat linux enterprise 4
Posts: 34

Rep: Reputation: 15
Hello jlightner,, I would like to try raid 1 on my server that has (2) hard drives..What would be the best option? software raid or hardware raid? Am using RHEL 4 and a DELL SC440. thanks
 
Old 02-10-2007, 10:34 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Generally hardware RAID is preferable to software RAID. However unless you have hardware designed for RAID you'll have to do software RAID. Linux allows for software RAID using mdadm.

Not familiar with the SC440. Had a look at it just now at:
http://www.dell.com/content/products...=04&l=en&s=bsd
This shows it has options for SAS or SATA RAID so it would depend on how your specific machine is configured. You should go to the Dell support site (support.dell.com) and input your Service Tag number as it will tell you the specifications for your specific machine if you don't know.

If it doesn't have the SAS or SATA RAID option you'll have to do software RAID. This should be done across two physical drives. (mdadm would allow you to do it with one physcial drive on different partitions but this buys you nothing - if the drive goes down then you lose both partitions.)

Last edited by MensaWater; 02-10-2007 at 10:39 AM.
 
Old 02-10-2007, 08:26 PM   #5
bicolano53
Member
 
Registered: Sep 2004
Location: Philippines
Distribution: red hat linux enterprise 4
Posts: 34

Rep: Reputation: 15
thanks a lot. Guess I have to coordinate with the DELL vendor here.As suggested,,would prefer a Hardware implementation.My server has (2) sata drives and I would like to have redundancy using raid 1 such that when (1) drive fails, the other takes over.
 
Old 02-10-2007, 08:53 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
Before you get too excited about getting an inexpensive SATA RAID card, be sure to read this:

http://linux-ata.org/faq-sata-raid.html
 
Old 02-10-2007, 10:56 PM   #7
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Original Poster
Rep: Reputation: 30
Using Mirroring and RAID together

Hello jlightner,,
Thx For ur Reply . I am using RHEL4 . I have now 5 HDD . I want to make First 2 HDD
Mirroring and Other 3 HDD are in RAID . Is it possible ?

If it is possible then I am going to install RHEL4 into first Two HDD which is in
Mirroring stage . Now is it possible to connect in RAID Device HDD ? If it is
possible How can I do it ?

Waiting for ur Reply ... ...
 
Old 02-11-2007, 12:20 PM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Sure you can do RAID 1 (mirroring) on the first two drives and RAID 5 on the other three drives at least in software RAID. If you have hardware capable of doing hardware RAID then it will depend on that hardware. As mentioned to earlier poster some PCs do have built in (or optional cards installed) RAID controllers to do hardware RAID.
Dell PowerEdge with SCSI for example is something we use a fair amount of and with those we buy the PERC RAID controller to allow for hardware RAID.

If your hardware allows for hardware RAID you should go that way for reasons I've mentioned in the thread. Even if it doesn't allow you do more than one RAID set (some controllers don't) you can do the mirroring on the first 2 drives in hardware RAID then do the RAID 5 in software RAID.

If you don't have hardware RAID available you'll have to do software RAID 1 for the first two drives as well as software RAID 5 for the last 3 drives.

One thing not mentioned before is USABLE space. Remember that even though you have 2 drives in RAID 1 you're USABLE space is only 1 drive (that is because everything is duplicated). RAID 5 requires N + 1 drives as it always uses the equivalent of 1 drive for parity. So in a 3 disk RAID 5 the "N" is 2 disks and this is your USABLE space. (3 - 1 = 2 = N).

Because you only have 1 disk USABLE for the RAID 1 and 2 disks USABLE for the RAID 5 you'll end up with only 3 total disks USABLE. You could do RAID 5 for all 5 disks to get 4 total disks USABLE (5 - 1 = 4 = N).

Mirroring is a good option because the boot disk is complete in and of itself and I'd go with your plan if I had to do software RAID even at the cost of 2 disks. It will be easier to deal with in the event of a drive failure I think. For hardware RAID I'd probably opt for the single RAID 5 using all 5 disks. Mainly because usually hardware RAID deals with the rebuilding of failed and replaced disks without requiring the OS (Linux) to be booted.
 
Old 02-13-2007, 12:19 AM   #9
bicolano53
Member
 
Registered: Sep 2004
Location: Philippines
Distribution: red hat linux enterprise 4
Posts: 34

Rep: Reputation: 15
To everyone interested on hardware raid implementation..The site http://linux-ata.org/faq-sata-raid.html suggested by Quakeboy02 is a must read..
thanks quakeboy02..
 
Old 02-13-2007, 01:54 AM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
It seems that these are homework questions that can be found on the internet with some searching.

What can not be found on the internet and books is how many read and write queues can be done for each level of RAID.

RAID-0:
Only one read and write queue at a time.

RAID-1:
Nth amount of read queues is equal to Nth amount of hard drives. Write queue is one.

RAID-5:
Nth-1 amount of write queues is equal to Nth-1 amount of hard drives. Read queue is one.

RAID-10:
Nth-2 amount of read queues is equal to Nth-2 amount of hard drives. Write queues is one.

RAID-15:
Nth-1 amount of write queues is equal to Nth-1 amount of hard drives. Nth-2 amount of read queues is equal to Nth-2 amount of hard drives. May need to use software RAID to implement RAID-1.

If you are going to make a file server, RAID-15 will be the best. RAID-1 will be better for web, mail and news servers. RAID-5 will be best for database servers. RAID-0 will be best for temporary data storage for video and sound recording. Also RAID-0 is great for scanning images at very, very high DPI.

I recommend using at least two processors when setting up software RAID level 5 because creating parity information penalizes the computer. Do not expect software RAID level 5 to have the same bandwidth as hardware RAID level 5.


SATA for Linux updated their site. It is not lame.
 
Old 02-13-2007, 02:43 AM   #11
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
Question for you electro: For a 2-disk IDE RAID0 boot drive, would a smaller chunksize than the normal 64K be faster, or does the drive's cache memory make it pretty much a non-issue?
 
Old 02-13-2007, 06:39 PM   #12
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Chunk size is different for each setup. You have to benchmark each chunk size value to find out if the computer loses or gains performance. All hard drives in the array should have cache disabled. Though, you can get by having cache enabled for each hard drive in RAID level 1 setups.
 
Old 02-13-2007, 06:42 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
"All hard drives in the array should have cache disabled."

Do you mean for benchmarking? Surely you don't mean for running?
 
Old 02-13-2007, 11:15 PM   #14
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
If cache in the hard drive is enabled when used in a RAID level 5 array, the data will not be consistent. If the data is not consistent, the array will break or fail. Striping levels should be pretend that it is a single hard drive, so the on-board cache of the controller will be used instead.
 
Old 02-14-2007, 02:20 AM   #15
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
"If cache in the hard drive is enabled when used in a RAID level 5 array, the data will not be consistent."

I understand, but my question was about performance of software IDE RAID0. I'm not terribly fussed about my boot drive failing, and I don't keep anything there but the OS and related stuff, so I may go messing with SW RAID0 again. I'd only be interested in performance; mostly read performance. I wonder if SW RAID1 might be better for this, since that's read mostly? I believe I'm right in thinking that in a software RAID, the drives would remain in sync regardless of disk caching?
 
  


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
What to Mirror - RAID 1 SBFree Linux - Newbie 4 01-14-2006 08:17 PM
Undo a RAID mirror curlyroger Linux - General 2 09-18-2005 02:54 PM
Remove raid and mirror Chaiyakorn Linux - General 0 07-06-2004 02:59 AM
Mirror Raid support? Mediocre_Driver Linux - Hardware 1 01-20-2004 09:14 PM
Dual CPU, Raid Mirror glock19 Linux - General 1 05-01-2002 02:10 PM


All times are GMT -5. The time now is 07:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration