public inbox for gentoo-doc-cvs@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-doc-cvs] cvs commit: software-raid-p1.xml
@ 2005-09-20 18:35 Lukasz Damentko
  0 siblings, 0 replies; 2+ messages in thread
From: Lukasz Damentko @ 2005-09-20 18:35 UTC (permalink / raw
  To: gentoo-doc-cvs

rane        05/09/20 18:35:24

  Added:       xml/htdocs/doc/en/articles software-raid-p1.xml
                        software-raid-p2.xml
  Log:
  two new articles from #104198

Revision  Changes    Path
1.1                  xml/htdocs/doc/en/articles/software-raid-p1.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/software-raid-p1.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/software-raid-p1.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo

Index: software-raid-p1.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml,v 1.1 2005/09/20 18:35:24 rane Exp $ -->

<guide link="/doc/en/articles/software-raid-p1.xml">
<title>Software RAID in the new Linux 2.4 kernel, Part 1</title>

<author title="Author">
  <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
</author>
<!-- xmlified by: Joshua Saddler (jackdark@gmail.com) -->

<abstract>
In his two-part series on the Linux 2.4 Software RAID, Daniel Robbins 
introduces the new technology that's used to increase disk performance 
and reliability by distributing data over multiple disks. This first 
installment covers Software RAID setup (kernel and tools installation) 
and shows you how to create linear and RAID-0 volumes.
</abstract>

<!-- The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team -->

<version>1.0</version>
<date>2005-08-29</date>

<chapter>
<title>Installation and a general introduction</title>
<section>
<title>The wonders of RAID</title>
<body>

<note>
The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team.
</note>

<p>
The 2.4 kernel has a number of nifty features and additions. One of 
these is the inclusion of a modern Software RAID implementation -- yay! 
Software RAID allows you to dramatically increase Linux disk IO 
performance and reliability without buying expensive hardware RAID 
controllers or enclosures. Because it's implemented in software, Linux 
RAID software is flexible, fast... and fun!
</p>

<p>
The concept behind Software RAID is simple -- it allows you to combine 
two or more block devices (usually disk partitions) into a single RAID 
device. So let's say you have three empty partitions: 
<path>hda3</path>, <path>hdb3</path>, and <path>hdc3</path>. Using 
Software RAID, you can combine these partitions and address them as a 
single RAID device, <path>/dev/md0</path>. <path>md0</path> can then 
be formatted to contain a filesystem and used like any other 
partition. There are also a number of different ways to configure a 
RAID volume -- some maximize performance, others maximize 
availability, while others provide a mixture of both.
</p>

<p>
There are two forms of RAID: linear and RAID-0 mode. Neither one is 
technically a form of RAID at all, since RAID stands for "redundant 
array of inexpensive disks", and RAID-0 and linear mode don't 
provide any kind of data redundancy. However, both modes -- especially 
RAID-0 -- are very useful. After giving you a quick overview of these 
two forms of "AID", I'll step you through the process of getting 
Software RAID set up on your system.
</p>

</body>
</section>
</chapter>

<chapter>
<title>Introduction to linear mode</title>
<section>
<body>

<p>
Linear mode is one of the simplest methods of combining two or more 
block devices into a RAID volume -- the method of simple 
concatenation. If you have three partitions, <path>hda3</path>, 
<path>hdb3</path>, and <path>hdc3</path>, and each is about 2GB, they 
will create a resultant linear volume of 6GB. The first third of the 
linear volume will reside on <path>hda3</path>, the last third on 
<path>hdc3</path>, and the middle third on <path>hdb3</path>.
</p>

<p>
To configure a linear volume, you'll need at least two partitions 
that you'd like to join together. They can be different sizes, and 
they can even all reside on the same physical disk without 
negatively affecting performance.
</p>

</body>
</section>
<section>
<title>Linear applications</title>
<body>

<p>
Linear mode is the best way to combine two or more partitions on the 
same disk into a single volume. While doing this with any other RAID 
technique will result in a dramatic loss of performance, linear mode 
is saved from this problem because it doesn't write to its 
constituent partitions in parallel (as all the other RAID modes do). 
But for the same reason, linear mode has the liability of lacking 
scale in performance compared to RAID-0, RAID-4, RAID-5, and to some 
extent RAID-1.
</p>

<p>
In general, linear mode doesn't provide any kind of performance 
improvement over traditional non-RAID partitions. Actually, if you 
spread your linear volume over multiple disks, your volume is more 
likely to become unavailable due to a random hard drive failure. The 
probability of failure of a linear volume will be equal to the sum of 
the probabilities of failure of its constituent physical disks and 
controllers. If one physical disk dies, the linear volume is 
generally unrecoverable. Linear mode does not offer any additional 
redundancy over using a single disk.
</p>

<p>
But linear mode is a great way to avoid repartitioning a single disk. 
For example, say your second IDE drive has two unused partitions, 
<path>hdb1</path> and <path>hdb3</path>. And say you're unable to 
repartition the drive due to critical data hanging out at 
<path>hdb2</path>. You can still combine <path>hdb1</path> and 
<path>hdb3</path> into a single, cohesive whole using linear mode.
</p>

<p>
Linear mode is also a good way to combine partitions of different 
sizes on different disks when you just need a single big partition 
(and don't really need to increase performance). But for any other 
job there are better RAID technologies you can use.
</p>

</body>
</section>
</chapter>

<chapter>
<title>Introduction to RAID-0 mode</title>
<section>
<body>

<p>
RAID-0 is another one of those "RAID" modes that doesn't have any 
"R" (redundancy) at all. Nevertheless, RAID-0 is immensely useful. 
This is primarily because it offers the highest performance 
potential of any form of RAID.
</p>

<p>
To set up a RAID-0 volume you'll need two or more equally (or 
almost equally) sized partitions. The RAID-0 code will evenly 
distribute writes (and thus reads) between all constituent 
partitions. And by parallelizing reads and writes between all 
constituent devices, RAID-0 has the benefit of multiplying IO 
performance. Ignoring the complexities of controller and bus 
bandwidth, you can expect a RAID-0 volume composed of two 
partitions on two separate identical disks to offer nearly double 
the performance of a traditional partition. Crank your RAID-0 
volume up to three disks, and performance will nearly triple. 
This is why a RAID-0 array of IDE disks can outperform the fastest 
SCSI or FC-AL drive on the market. For truly blistering 
performance, you can set up a bunch of SCSI or FC-AL drives in a 
RAID-0 array. That's the beauty of RAID-0.
</p>

<p>
To create a RAID-0 volume, you'll need two or more equally sized 
partitions located on separate disks. The capacity of the volume 
will be equal to the combined capacity of the constituent 
partitions. As with linear mode, you can combine block devices 
from various sources (such as IDE and SCSI drives) into a single 
volume with no problems.
</p>

<p>
If you're creating a RAID-0 volume using IDE disks, you should try 
to use UltraDMA compliant disks and controllers for maximum 
reliability. And you should use only one drive per IDE channel to 
avoid sluggish performance -- a slave device, especially if it's 
also part of the RAID-0 array, will slow things down so much as to 
nearly eliminate any RAID-0 performance benefit. You may also need 
to add an off-board IDE controller so that you have the extra IDE 
channels you require.
</p>

<p>
If you're creating a RAID-0 volume out of SCSI devices, be aware 



1.1                  xml/htdocs/doc/en/articles/software-raid-p2.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/software-raid-p2.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/software-raid-p2.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo

Index: software-raid-p2.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/software-raid-p2.xml,v 1.1 2005/09/20 18:35:24 rane Exp $ -->

<guide link="/doc/en/articles/software-raid-p2.xml">
<title>Software RAID in the new Linux 2.4 kernel, Part 2</title>

<author title="Author">
  <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
</author>
<!-- xmlified by: Joshua Saddler (jackdark@gmail.com) -->

<abstract>
In this two-part series, Daniel Robbins introduces you to Linux 2.4 
Software RAID, a technology used to increase disk performance and 
reliability by distributing data over multiple disks. In this article, 
Daniel explains what software RAID-1, 4, and 5 can and cannot do for 
you and how you should approach the implementation of these RAID 
levels in a production environment. In the second half of the article, 
Daniel walks you through the simulation of a RAID-1 failed drive 
replacement.
</abstract>

<!-- The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team -->

<version>1.0</version>
<date>2005-08-30</date>

<chapter>
<title>Setting up RAID-1 in a production environment</title>
<section>
<title>Real-world RAID</title>
<body>

<note>
The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team.
</note>

<p>
In my <uri link="/doc/en/articles/software-raid-p1.xml">previous 
article</uri>, I introduced you to Linux 2.4's software RAID 
functionality, showing you how to set up linear, RAID-0, and RAID-1 
volumes. In this article, we look at what you need to know in order to 
use RAID-1 to increase availability in a production environment. This 
requires a lot more understanding and knowledge than just setting up 
RAID-1 on a test server or at home -- specifically, you'll need to 
know exactly what RAID-1 will protect you against, and how to keep 
your RAID volume up and running in case of a disk failure. In this 
article, we'll cover these topics, starting with an overview of what 
RAID-1, 4, and 5 can and can't do for you, and ending with a complete 
test simulation of a failed RAID 1 drive replacement -- something that 
you should actually do (with this article as your guide) if at all 
possible. After going through the simulation, you'll have all the 
experience you need to handle a RAID-1 failure in a real-world 
environment.
</p>

</body>
</section>
<section>
<title>What RAID doesn't do</title>
<body>

<p>
The fault-tolerant features of RAID are designed to protect you from 
the negative impacts of a spontaneous complete drive failure. That's 
a good thing. But RAID isn't a perfect fix for every kind of 
reliability problem. Before implementing a fault-tolerant form of RAID 
(1,4,5) in a production environment, it's extremely important that you 
know exactly what RAID will and <b>will not</b> do for you. When we're 
in a situation where we're depending on RAID to perform, we don't want 
to make any false assumptions about what it does. Let's start by 
dispelling common myths about RAID 1, 4, and 5.
</p>

<p>
A lot of people think that if they place all their important data on a 
RAID 1/4/5 volume, then they won't have to perform regular backups. 
This is completely false -- here's why. RAID 1/4/5 helps to protect 
against unplanned <e>downtime</e> caused by a random drive failure. 
However, it offers no protection against accidental or malicious 
<e>data corruption</e>. If you type <c>cd /; rm -rf *</c> as root on a 
RAID volume, you'll lose a lot of very important data in a matter of 
seconds, and the fact that you have a 10 drive RAID-5 configuration will 
be of little significance. Also, RAID won't help you if your server is 
physically stolen or if there's a fire in your building. And of course, 
if you don't implement a backup strategy, you won't have an archive of 
past data -- if someone in your office deletes a bunch of important 
files, you won't be able to recover them. That alone should be enough 
to convince you that, in most circumstances, you should plan and 
implement a backup strategy <e>before</e> even thinking about tackling 
RAID-1, 4, or 5.
</p>

<p>
Another mistake is to implement software RAID on a system composed of 
low-quality hardware. If you're putting together a server that's going 
to do something important, it makes sense to purchase the 
highest-quality hardware that's still comfortably within your budget. 
If your system is unstable or improperly cooled, you'll run into 
problems that RAID can't solve. On a similar note, RAID obviously can't 
give you any additional uptime in the case of a power outage. If your 
server is going to be doing anything relatively important, make sure 
that it's been equipped with an uninterruptible power supply (UPS).
</p>

<p>
Next, we move on to filesystem issues. The filesystem exists "on top" 
of your software RAID volume. This means that using software RAID does 
not allow you to escape filesystem issues, such as long and potentially 
problematic <c>fsck</c>s if you happen to be using a non-journalled or 
flaky filesystem. So, software RAID isn't going to make the ext2 
filesystem more reliable; that's why it's so important that the Linux 
community has ReiserFS, as well as JFS and XFS in the works. Software 
RAID and a reliable journalling filesystem make a great combination.
</p>

</body>
</section>
<section>
<title>RAID - intelligent implementation</title>
<body>

<p>
Hopefully, the previous section dispelled any RAID myths that you might 
have had. When you implement RAID-1, 4, or 5, it's very important that 
you view the technology as something that will enhance <e>uptime</e>. 
When you implement one of these RAID levels, you're protecting yourself 
against a very specific situation -- a spontaneous complete (single or 
multiple) drive failure. If you experience this situation, software 
RAID will allow the system to continue running, while you make 
arrangements to replace the failed drive with a new one. In other words, 
if you implement RAID 1, 4, or 5, you'll be reducing your risk of 
having a long, unplanned downtime due to a complete drive failure. 
Instead, you can have a short planned downtime -- just enough time to 
replace the dead drive. Obviously, this means that if having a 
highly-available system isn't a priority for you, then you shouldn't be 
implementing software RAID, unless you plan to use it primarily as a 
way to boost file I/O performance.
</p>

<p>
A smart system administrator uses software RAID for a specific purpose 
-- to improve the reliability of an already very reliable server. If 
you're a smart sysadmin, you've already covered the basics. You've 
protected your organization against catastrophe by implementing a 
regular backup plan. You've hooked your server up to a UPS, and have 
the UPS monitoring software up and running so that your server will 
shut down safely in the case of an extended power outage. Maybe you're 
using a journalling filesystem such as ReiserFS to reduce <c>fsck</c> 
time and increase filesystem reliability and performance. And hopefully, 
your server is well-cooled and is composed of high-quality hardware, 
and you've paid close attention to security issues. Now, and only now, 
should you consider implementing software RAID-1, 4 or 5 -- by doing so, 
you'll potentially give your server a few more percentage points of 
uptime by guarding it against a complete drive failure. Software RAID 
is that added layer of protection that makes an already rugged server 
even better.
</p>

</body>
</section>
</chapter>

<chapter>
<title>A RAID-1 walkthrough</title>
<section>
<body>

<p>
Now that you've read about what RAID can and can't do, I hope you have 
reasonable expectations and the right attitude. In this section, I'll 
walk you through the process of simulating a disk failure, and then 
bringing your RAID volume back out of degraded mode. If you're have the 
ability to set up a RAID-1 volume on a test machine and follow along 
with me, I highly recommend that you do so. This kind of simulation can 
be fun. And having a little fun right now will help to ensure that when 
a drive really fails, you'll be calm and collected, and know exactly 
what to do.
</p>

<impo>
To perform this test, it's essential that you set up your RAID-1 volume 
so that you can still boot your Linux system with one hard drive 
unplugged, because this is how we're going to simulate a drive failure.
</impo>

<p>
OK, our first step is to set up a RAID-1 volume; refer to my <uri 
link="/doc/en/articles/software-raid-p1.xml">previous article</uri> if 
you need a refresher on how to do this. Once you've set up your volume, 
you'll see something like this if you <c>cat /proc/mdstat</c>:
</p>



-- 
gentoo-doc-cvs@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-doc-cvs] cvs commit: software-raid-p1.xml
@ 2005-09-20 19:34 Lukasz Damentko
  0 siblings, 0 replies; 2+ messages in thread
From: Lukasz Damentko @ 2005-09-20 19:34 UTC (permalink / raw
  To: gentoo-doc-cvs

rane        05/09/20 19:34:51

  Modified:    xml/htdocs/doc/en/articles software-raid-p1.xml
  Log:
  fixed link

Revision  Changes    Path
1.2       +2 -2      xml/htdocs/doc/en/articles/software-raid-p1.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/software-raid-p1.xml?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/software-raid-p1.xml?rev=1.2&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/software-raid-p1.xml.diff?r1=1.1&r2=1.2&cvsroot=gentoo

Index: software-raid-p1.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- software-raid-p1.xml	20 Sep 2005 18:35:24 -0000	1.1
+++ software-raid-p1.xml	20 Sep 2005 19:34:51 -0000	1.2
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml,v 1.1 2005/09/20 18:35:24 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/software-raid-p1.xml,v 1.2 2005/09/20 19:34:51 rane Exp $ -->
 
 <guide link="/doc/en/articles/software-raid-p1.xml">
 <title>Software RAID in the new Linux 2.4 kernel, Part 1</title>
@@ -500,7 +500,7 @@
 
 <ul>
   <li>
-    Read <uri link="/doc/en/articles/software-raid-p2">Part 
+    Read <uri link="/doc/en/articles/software-raid-p2.xml">Part 
     2</uri> in Daniel's series on RAID, where he explains what 
     software RAID-1, 4, and 5 can and cannot do for you and how 
     you should approach the implementation of these RAID levels 



-- 
gentoo-doc-cvs@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-20 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-20 19:34 [gentoo-doc-cvs] cvs commit: software-raid-p1.xml Lukasz Damentko
  -- strict thread matches above, loose matches on Subject: below --
2005-09-20 18:35 Lukasz Damentko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox