[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Linux "Software RAID"



On Thu, 2008-08-07 at 15:20 -0400, Terrell Prude' Jr. wrote:

> "Software RAID" is simply doing the RAID (striping, mirroring, parity, 
> whatever) in the OS instead of on a dedicated card.  Windows NT, from at 
> least v3.50 (way back when), can do this, and Linux can do it as well.
> 
> If you're thinking of RAID 5, which is my preferred level, I'd avoid 
> doing it in software and instead opt for a dedicated RAID card.  
> Something like an LSI MegaRAID 150-6 SATA controller.  If you do it in 
> software, you'll eat up some CPU doing the parity calculations, so you 
> definitely want to offload that.  However, for just mirroring (say, RAID 
> 1), you should be fine, because the CPU hit for mirroring is minimal.
> 
> One advantage to using a RAID card is that your array then appears as 
> one big disk.  You don't have to go messing around with mdadm or 
> anything else.
> 
> Now, LVM is something else entirely and not really related to RAID.  LVM 
> is a way of partitioning disks that allows you to easily add or subtract 
> space from what's called a "volume".  A "volume" in an LVM setup appears 
> to the OS as a disk partition.  Windows NT calls this "volume groups".  
> It works on individual disks as well as arrays.  You can in fact take 
> several disk arrays (say, three or four RAID 5's), throw all of them 
> into one of these "volumes", and that entire volume appears as one 
> partition-like entity to the OS.  So, LVM is more of a SAN technology 
> than a RAID technology.
> 
> Hope this helps,
> 
> --TP

To further elaborate:
Software RAID is best used for mirrors and stripes only (RAID 1 & 0 ).
The parity calculation is a performance drag on software RAID and is
best done by dedicated hardware. 

The RedHat/Fedora/CEntOS (and others) have the ability to install using
software raid for the target drives. You can use RAID to build a disk
system that LVM then uses as a PV with logical volumes on the physical
volume. It can get seemingly complicated but it allows ultimate
flexibility.

Picture this: You build a machine with 4 300GB drives. You can create a
RAID5 array of 3+1 (3 active and 1 hot spare), RAID10 (mirrored pair,
mirrored pair, striped across both for speed), or any other combo you
can think of. I like mirrored pairs of same size but different brand
drives.

Now plop LVM on top of this: The RAID array is a physical volume group.
It is logically subdivided into logical volumes for different mount
points (/home is good to keep separate as is /var and /opt
and /usr/local). With a setup like this the size is not as critical
because the lv's can be resized non-destructively! Run out of room
on /home? No problem! Shrink /opt and give the extra space to /home. Add
a new drive? No Problem! Add the new drive to the PVG and attach it to
what ever LV that needs extending.

Is it more complicated? Absolutely! But with the gift of really expanded
flexibility.

For me, the huge advantage of software RAID is I can work the stack
remotely with a live machine in nearly all cases. 

With many types of hardware RAID the machine must be in a non-running,
at the bios console state and thus no users are on the machine. The
advantage of hardware RAID is with the battery backup write buffers. You
can get some good speed improvements from those write process that are
buffered on the RAID card.
-- 
James P. Kinney III          
CEO & Director of Engineering 
Local Net Solutions,LLC                           
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney localnetsolutions com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]