Quick HOWTO : Ch26 : Linux Software RAID/zh:修订间差异
Lipeng8413(留言 | 贡献) 新页面: {{Translation}} {{From|http://wiki.ubuntu.org.cn/Quick_HOWTO_:_Ch26_:_Linux_Software_RAID}} {{Translator|lipeng}} {{Languages|Quick_HOWTO_:_Ch26_:_Linux_Software_RAID}} |
Lipeng8413(留言 | 贡献) 无编辑摘要 |
||
第6行: | 第6行: | ||
{{Languages|Quick_HOWTO_:_Ch26_:_Linux_Software_RAID}} | {{Languages|Quick_HOWTO_:_Ch26_:_Linux_Software_RAID}} | ||
= 简介 = | |||
The main goals of using redundant arrays of inexpensive disks (RAID) are to improve disk data performance and provide data redundancy. | |||
RAID can be handled either by the operating system software or it may be implemented via a purpose built RAID disk controller card without having to configure the operating system at all. This chapter will explain how to configure the software RAID schemes supported by RedHat/Fedora Linux. | |||
For the sake of simplicity, the chapter focuses on using RAID for partitions that include neither the /boot or the root (/) filesystems. | |||
= RAID 类型 = | |||
Whether hardware- or software-based, RAID can be configured using a variety of standards. Take a look at the most popular. | |||
== Linear Mode RAID == | |||
In the Linear RAID, the RAID controller views the RAID set as a chain of disks. Data is written to the next device in the chain only after the previous one is filled. | |||
The aim of Linear RAID is to accommodate large filesystems spread over multiple devices with no data redundancy. A drive failure will corrupt your data. | |||
Linear mode RAID is not supported by Fedora Linux. | |||
== RAID 0 == | |||
With RAID 0, the RAID controller tries to evenly distribute data across all disks in the RAID set. | |||
Envision a disk as if it were a plate, and think of the data as a cake. You have four cakes- chocolate, vanilla, cherry and strawberry-and four plates. The initialization process of RAID 0, divides the cakes and distributes the slices across all the plates. The RAID 0 drivers make the operating system feel that the cakes are intact and placed on one large plate. For example, four 9GB hard disks configured in a RAID 0 set are seen by the operating system to be one 36GB disk. | |||
Like Linear RAID, RAID 0 aims to accommodate large filesystems spread over multiple devices with no data redundancy. The advantage of RAID 0 is data access speed. A file that is spread over four disks can be read four times as fast. You should also be aware that RAID 0 is often called striping. | |||
RAID 0 can accommodate disks of unequal sizes. When RAID runs out of striping space on the smallest device, it then continues the striping using the available space on the remaining drives. When this occurs, the data access speed is lower for this portion of data, because the total number of RAID drives available is reduced. For this reason, RAID 0 is best used with drives of equal size. | |||
RAID 0 is supported by Fedora Linux. Figure 26.1 illustrates the data allocation process in RAID 0. | |||
== RAID 1 == | |||
With RAID 1, data is cloned on a duplicate disk. This RAID method is therefore frequently called disk mirroring. Think of telling two people the same story so that if one forgets some of the details you can ask the other one to remind you. | |||
When one of the disks in the RAID set fails, the other one continues to function. When the failed disk is replaced, the data is automatically cloned to the new disk from the surviving disk. RAID 1 also offers the possibility of using a hot standby spare disk that will be automatically cloned in the event of a disk failure on any of the primary RAID devices. | |||
RAID 1 offers data redundancy, without the speed advantages of RAID 0. A disadvantage of software-based RAID 1 is that the server has to send data twice to be written to each of the mirror disks. This can saturate data busses and CPU use. With a hardware-based solution, the server CPU sends the data to the RAID disk controller once, and the disk controller then duplicates the data to the mirror disks. This makes RAID-capable disk controllers the preferred solution when implementing RAID 1. | |||
A limitation of RAID 1 is that the total RAID size in gigabytes is equal to that of the smallest disk in the RAID set. Unlike RAID 0, the extra space on the larger device isn't used. | |||
RAID 1 is supported by Fedora Linux. Figure 26.1 illustrates the data allocation process in RAID 1. | |||
===Figure 26-1 RAID 0 And RAID 1 Operation=== | |||
[[Image:Raid0.gif]] | |||
== RAID 4 == | |||
RAID 4 operates likes RAID 0 but inserts a special error-correcting or parity chunk on an additional disk dedicated to this purpose. | |||
RAID 4 requires at least three disks in the RAID set and can survive the loss of a single drive only. When this occurs, the data in it can be recreated on the fly with the aid of the information on the RAID set's parity disk. When the failed disk is replaced, it is repopulated with the lost data with the help of the parity disk's information. | |||
RAID 4 combines the high speed provided of RAID 0 with the redundancy of RAID 1. Its major disadvantage is that the data is striped, but the parity information is not. In other words, any data written to any section of the data portion of the RAID set must be followed by an update of the parity disk. The parity disk can therefore act as a bottleneck. For this reason, RAID 4 isn't used very frequently. | |||
RAID 4 is not supported by Fedora Linux. | |||
==RAID 5== | |||
RAID 5 improves on RAID 4 by striping the parity data between all the disks in the RAID set. This avoids the parity disk bottleneck, while maintaining many of the speed features of RAID 0 and the redundancy of RAID 1. Like RAID 4, RAID 5 can survive the loss of a single disk only. | |||
RAID 5 is supported by Fedora Linux. Figure 26.2 illustrates the data allocation process in RAID 5. | |||
Linux RAID 5 requires a minimum of three disks or partitions. | |||
===Figure 26-2 RAID 5 Operation=== | |||
[[Image:raid5.gif]] |
2008年6月3日 (二) 13:03的版本
文章出处: |
{{#if: | {{{2}}} | http://wiki.ubuntu.org.cn/Quick_HOWTO_:_Ch26_:_Linux_Software_RAID }} |
点击翻译: |
English {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/af | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Afrikaans| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/af|Afrikaans]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ar | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|العربية| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ar|العربية]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/az | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|azərbaycanca| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/bcc | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|جهلسری بلوچی| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/bg | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|български| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/bg|български]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/br | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|brezhoneg| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/br|brezhoneg]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ca | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|català| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ca|català]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/cs | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|čeština| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/cs|čeština]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/de | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Deutsch| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/de|Deutsch]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/el | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Ελληνικά| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/es | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|español| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/es|español]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/fa | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|فارسی| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/fa|فارسی]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/fi | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|suomi| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/fi|suomi]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/fr | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|français| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/fr|français]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/gu | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|ગુજરાતી| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/he | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|עברית| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/he|עברית]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/hu | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|magyar| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/hu|magyar]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/id | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Bahasa Indonesia| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/it | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|italiano| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/it|italiano]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ja | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|日本語| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ja|日本語]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ko | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|한국어| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ko|한국어]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ksh | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Ripoarisch| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/mr | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|मराठी| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/mr|मराठी]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ms | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Bahasa Melayu| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/nl | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Nederlands| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/nl|Nederlands]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/no | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|norsk| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/no|norsk]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/oc | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|occitan| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/oc|occitan]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/pl | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|polski| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/pl|polski]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/pt | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|português| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/pt|português]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ro | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|română| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ro|română]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/ru | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|русский| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/ru|русский]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/si | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|සිංහල| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/si|සිංහල]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/sq | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|shqip| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/sq|shqip]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/sr | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|српски / srpski| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/sv | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|svenska| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/sv|svenska]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/th | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|ไทย| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/th|ไทย]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/tr | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Türkçe| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/tr|Türkçe]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/vi | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|Tiếng Việt| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/yue | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|粵語| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/yue|粵語]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/zh | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|中文| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/zh|中文]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/zh-hans | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|中文(简体)| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | Quick_HOWTO_:_Ch26_:_Linux_Software_RAID | {{#if: | :}}Quick HOWTO : Ch26 : Linux Software RAID/zh}}/zh-hant | • {{#if: Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|中文(繁體)| [[::Quick HOWTO : Ch26 : Linux Software RAID/zh/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:Quick_HOWTO_:_Ch26_:_Linux_Software_RAID|:Quick HOWTO : Ch26 : Linux Software RAID/zh|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Quick HOWTO : Ch26 : Linux Software RAID/zh/zh | | {{#ifexist: Quick HOWTO : Ch26 : Linux Software RAID/zh/zh | | {{#ifeq: {{#titleparts:Quick HOWTO : Ch26 : Linux Software RAID/zh|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Quick HOWTO : Ch26 : Linux Software RAID/zh|1|-1|}} | zh | | }}
简介
The main goals of using redundant arrays of inexpensive disks (RAID) are to improve disk data performance and provide data redundancy.
RAID can be handled either by the operating system software or it may be implemented via a purpose built RAID disk controller card without having to configure the operating system at all. This chapter will explain how to configure the software RAID schemes supported by RedHat/Fedora Linux.
For the sake of simplicity, the chapter focuses on using RAID for partitions that include neither the /boot or the root (/) filesystems.
RAID 类型
Whether hardware- or software-based, RAID can be configured using a variety of standards. Take a look at the most popular.
Linear Mode RAID
In the Linear RAID, the RAID controller views the RAID set as a chain of disks. Data is written to the next device in the chain only after the previous one is filled.
The aim of Linear RAID is to accommodate large filesystems spread over multiple devices with no data redundancy. A drive failure will corrupt your data.
Linear mode RAID is not supported by Fedora Linux.
RAID 0
With RAID 0, the RAID controller tries to evenly distribute data across all disks in the RAID set.
Envision a disk as if it were a plate, and think of the data as a cake. You have four cakes- chocolate, vanilla, cherry and strawberry-and four plates. The initialization process of RAID 0, divides the cakes and distributes the slices across all the plates. The RAID 0 drivers make the operating system feel that the cakes are intact and placed on one large plate. For example, four 9GB hard disks configured in a RAID 0 set are seen by the operating system to be one 36GB disk.
Like Linear RAID, RAID 0 aims to accommodate large filesystems spread over multiple devices with no data redundancy. The advantage of RAID 0 is data access speed. A file that is spread over four disks can be read four times as fast. You should also be aware that RAID 0 is often called striping.
RAID 0 can accommodate disks of unequal sizes. When RAID runs out of striping space on the smallest device, it then continues the striping using the available space on the remaining drives. When this occurs, the data access speed is lower for this portion of data, because the total number of RAID drives available is reduced. For this reason, RAID 0 is best used with drives of equal size.
RAID 0 is supported by Fedora Linux. Figure 26.1 illustrates the data allocation process in RAID 0.
RAID 1
With RAID 1, data is cloned on a duplicate disk. This RAID method is therefore frequently called disk mirroring. Think of telling two people the same story so that if one forgets some of the details you can ask the other one to remind you.
When one of the disks in the RAID set fails, the other one continues to function. When the failed disk is replaced, the data is automatically cloned to the new disk from the surviving disk. RAID 1 also offers the possibility of using a hot standby spare disk that will be automatically cloned in the event of a disk failure on any of the primary RAID devices.
RAID 1 offers data redundancy, without the speed advantages of RAID 0. A disadvantage of software-based RAID 1 is that the server has to send data twice to be written to each of the mirror disks. This can saturate data busses and CPU use. With a hardware-based solution, the server CPU sends the data to the RAID disk controller once, and the disk controller then duplicates the data to the mirror disks. This makes RAID-capable disk controllers the preferred solution when implementing RAID 1.
A limitation of RAID 1 is that the total RAID size in gigabytes is equal to that of the smallest disk in the RAID set. Unlike RAID 0, the extra space on the larger device isn't used.
RAID 1 is supported by Fedora Linux. Figure 26.1 illustrates the data allocation process in RAID 1.
Figure 26-1 RAID 0 And RAID 1 Operation
RAID 4
RAID 4 operates likes RAID 0 but inserts a special error-correcting or parity chunk on an additional disk dedicated to this purpose.
RAID 4 requires at least three disks in the RAID set and can survive the loss of a single drive only. When this occurs, the data in it can be recreated on the fly with the aid of the information on the RAID set's parity disk. When the failed disk is replaced, it is repopulated with the lost data with the help of the parity disk's information.
RAID 4 combines the high speed provided of RAID 0 with the redundancy of RAID 1. Its major disadvantage is that the data is striped, but the parity information is not. In other words, any data written to any section of the data portion of the RAID set must be followed by an update of the parity disk. The parity disk can therefore act as a bottleneck. For this reason, RAID 4 isn't used very frequently.
RAID 4 is not supported by Fedora Linux.
RAID 5
RAID 5 improves on RAID 4 by striping the parity data between all the disks in the RAID set. This avoids the parity disk bottleneck, while maintaining many of the speed features of RAID 0 and the redundancy of RAID 1. Like RAID 4, RAID 5 can survive the loss of a single disk only.
RAID 5 is supported by Fedora Linux. Figure 26.2 illustrates the data allocation process in RAID 5.
Linux RAID 5 requires a minimum of three disks or partitions.