System Administration
RAID stands for “Redundant Array of Inexpensive Disks”. It is meant to speed up and secure disk access at the same time. RAID, though, is not new. It was invented in 1987 at the University of California, Berkeley. Before Linux, it was available only in the form of special hardware that was quite expensive. Of course, it could be used only in high-end computing centers.
During the last decades, performance of processing units has increased by five to ten times each year, depending on which statistic you believe. In the same period, disk capacity has doubled or tripled while prices were halved every one to two years. Used electronics don't reflect the current processor speed. This results in I/O being the current bottleneck of modern computers. Just try to compile our famous XFree86 source on a dumb PII-233 with regular SCSI disk layout.
By the time people at Berkeley realized this, they were able to foresee that no new epoch-making technology for hard disks would be forthcoming in the near future. Since magnetic- and mechanic-oriented disks were kept and laws of physics permit only slight improvements, other solutions needed to be found.
This resulted in the definition of several RAID levels. Nowadays they are used not only in high-level computer rooms, but also by the so-called middle-end sector. Since some fellow kernel hackers decided to implement RAID for the Linux kernel, this technique can be used by low-end PCs, and regular people can be satisfied by the improved performance and data security.
RAID levels share the following properties:
Several different physical disks are combined and accessed as a compound element. Under Linux, this is done by the driver for multiple devices, also known as /dev/md*.
The stored data is distributed over all disks in a well-defined way.
The data is stored in a redundant way over the disks, so in case of failure, data is recoverable.
By dividing data into equal chunks and distributing them over all affected disks, one gets higher I/O performance than by using only one fast disk. The reason for this is due to ability to request data from the disks in a parallel fashion. The easiest way to do this is called striping mode or RAID level 0, but it doesn't contain any redundancy.
Redundancy is achieved in different ways. The simplest is to store the data on two equal disks. This is defined in RAID-1, also known as mirroring. Of course, one gets performance increase only when at least four disks are used.
More efficient redundancy is obtained when instead of duplicating all the data, a unique checksum is generated and stored with regular data. If a single disk should fail, one is able to reconstruct its data by using all data chunks of that stripe together with the calculated checksum. The easiest way to calculate a checksum is to XOR all data chunks in a stripe. This is defined in RAID levels 4 and 5. The unofficial level 6 uses another chunk for a different checksum algorithm, resulting in two redundant disks, and even better breakdown avoidance.
Using file systems with RAID has many advantages. First is speed. RAID combines several disks and reads/writes chunks from the disks in sequence. Second, you can get bigger file systems than your largest disk (useful for /var/spool/news/, /pub/, etc.). Third, having achieved redundancy means a disk failure won't end up in data loss. For technical information on RAID, please refer to ftp://ftp.infodrom.north.de/pub/doc/tech/raid/.
To use RAID with Linux, you need a kernel with appropriate support. First of all, this refers to support for the “multiple devices driver” (CONFIG_BLK_MD_DEV). Linux 2.0.x supports linear and striping modes (the latter is also known as RAID 0). Linux kernel 2.1.63 also supports RAID levels 1, 4 and 5. If you want to use these levels for 2.0.x, you'll have to install the kernel patch mentioned at the end of this article.
To use either, you must activate the appropriate driver in the kernel. (I'd suggest compiling a kernel of your own anyway.) Additionally, you need to have special tools installed. For linear mode and RAID level 0, you need the mdutils package that should be included in your distribution. To use RAID level 1, 4 or 5, you need to have the raidtools package installed, which supersedes the mdutils package.
Striping works most efficiently if you use partitions of exactly the same size. Linux's RAID driver will work with different sizes, too, but is less efficient. In that case, the driver doesn't use all disks for striping after a certain amount of disk space is used. The maximum number of disks will be used at any time.
After setting up RAID and combining several disks to a compound device, you don't access the disks directly using /dev/sd*. Instead, you make use of the multiple devices driver that provides /dev/md*. These devices are block devices just like normal disks, so you simply create a file system on them and mount.
The default setup of the Linux kernel provides up to four such compound devices. Each MD can contain up to eight physical disks (block devices). If your setup requires either more combined devices or more compound devices, you have to edit include/linux/md.h within the Linux kernel source tree, especially MAX_REAL and MAX_MD_DEV. For testing purposes, you can use some loopback devices instead of physical disks.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- Bought photoshop CS5 for developing a website :(
1 hour 21 min ago - What the author describes
2 hours 47 min ago - Reply to comment | Linux Journal
6 hours 57 min ago - Reply to comment | Linux Journal
7 hours 42 min ago - Didn't read
7 hours 53 min ago - Reply to comment | Linux Journal
7 hours 58 min ago - Poul-Henning Kamp: welcome to
10 hours 8 min ago - This has already been done
10 hours 9 min ago - Reply to comment | Linux Journal
10 hours 54 min ago - Welcome to 1998
11 hours 42 min ago





Comments
ADD external SCSI
Dear Martin,
Can u tell me how can i add another scsi disk in hot swappable
so that is outside the hardware RAID 5 .
thanks