Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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 09:39 AM.
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.
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.
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.
Only one read and write queue at a time.
Nth amount of read queues is equal to Nth amount of hard drives. Write queue is one.
Nth-1 amount of write queues is equal to Nth-1 amount of hard drives. Read queue is one.
Nth-2 amount of read queues is equal to Nth-2 amount of hard drives. Write queues is one.
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.
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.
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.
"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?