如何在Linux中配置RAID(2)

Throughout this tutorial, I will demonstrate with Ubuntu 8.10 Intrepid Ibex, installed using the Alternate CD, as the classic desktop install CD does not have the ability to create RAID devices and install to them.

在本教程中,我将在Ubuntu8.10 Intrepid Ibex上演示,安装使用替代光盘,作为经典的桌面安装光盘,不能创建RAID设备并安装他们。

While Intrepid is no longer the most current Ubuntu release currently, please note that the choice does not really matter, which is why I deliberately decided to use. I want you to be able to use the power of your knowledge without sticking to brands. I want you to be able to understand the principle. Once you get the hang of things, the choice of the operating system will become transparent. The only difference will be a slight cosmetic chance between distros and/or release.

虽然Intrepid不再是目前发布的Ubuntu发行版,请注意选择并不重要,这是我为什么故意选择使用它。我想要你能使用你知识的能力不拘于品牌。我想要你能理解原理。一旦你掌握了这些知识,操作系统的选择会变得透明。唯一的区别是distros和发行版的表面的不同。

That said, I will also demonstrate RAID installation and the subsequent configuration in several other distributions, in a sort of addendum article to this tutorial. In this sequel, I will cover the RAID configuration in openSUSE - and some other distros - just to show you that once you learn the idea, it will not matter which software you use. Pretty much like driving a car.

不过,我也会演示RAID安装和在其他几个发行版的后续配置——,和本教程编为同一类。这个的续篇,我将介绍在openSUSE上的配置——其他一些发行版——只是为了告诉你,一旦你明白了这个想法,你使用什么软件都是无关紧要的,就像开车一样。

Additionally, we will also use several command line tools particular to RAID, which come included with most Linux distributions.

此外,我们还将使用几个命令行工具,尤其是RAID,这包含在大多数Linux发行版中。

Now, let's start.

现在,我们开始。

Introduction

简介

RAID stands for Redundant Array of Inexpensive Disks. This is a solution where several physical hard disks (two or more) are governed by a unit called RAID controller, which turns them into a single, cohesive data storage block.

RAID是廉价磁盘冗余阵列的缩写表示。这是几个物理硬盘(两个或更多)有一个称为RAID的单元的管理的解决方法,它把他们变成了单一的、结合一体的数据存储块。

An example of a RAID configuration would be to take two hard disks, each 80GB in size, and RAID them into a single unit 160GB in size. Another example of RAID would be to take these two disks and write data to each, creating two identical copies of everything.

RAID配置的一个例子是使用两个硬盘,每个大小为80GB,做RAID配置成160GB大小的单一单元。RAID的另一个例子是把数据写入两个磁盘,创建两个完全相同的副本。

RAID controllers can be implemented in hardware, which makes the RAID completely transparent to the operating systems running on top of these disks, or it can be implemented in software, which is the case we are interested in.

RAID控制器可以在硬件中实现,这使得RAID对运行在这些磁盘上的操作系统完全透明,也能被用于软件,要是我们感兴趣的话。

Purpose of RAID

RAID目的

RAID is used to increase the logical capacity of storage devices used, improve read/write performance and ensure redundancy in case of a hard disk failure. All these needs can be addressed by other means, usually more expensive than the RAID configuration of several hard disks. The adjective Inexpensive used in the name is not without a reason.

RAID被用于增加使用存储设备的逻辑能力,提高读/写能力,确保在硬盘出现故障时的冗余。所有这些需求可以通过其他方式加以解决,比通过几个硬盘做RAID配置更昂贵。“低廉”这个形容词用在名字中也不是没有理由的。

Advantages

优势

The major pluses of RAID are the cost and flexibility. It is possible to dynamically adapt to the growing or changing needs of a storage center, server performance or machine backup requirements merely by changing parameters in software, without physically touching the hardware. This makes RAID more easily implemented than equivalent hardware solutions.

RAID的主要优点是成本和灵活性。这可能适用于存储中心,服务器性能,或机器备份要求,不断增长或变化的需求,而且只要稍微在软件中更改参数,不用身体力行接触硬件。这让RAID比同等的硬件解决方案更容易实现。

For instance, improved performance can be achieved by buying better, faster hard disks and using them instead of the old ones. This necessitates spending money, turning off the machine, swapping out physical components, and performing a new installation. RAID can achieve the same with only a new installation required.

例如,改进性能可以通过购买更好的更快的硬盘替换旧的硬盘。这个需求需要花钱,关闭机器,更换物理组件,执行新的安装。RAID只需要新安装一次就可以实现同样的需求。

In general, advantages include:

总体上,优势包括:

Improved read/write performance in some RAID configurations.

通过在RAID配置改进读写性能。

Improved redundancy in the case of a failure in some RAID configurations.

通过RAID配置改善冗余以防备故障的情况。

Increased flexibility in hard disk & partition layout.

增加了硬件和分区设置上的灵活性。

Disadvantages

劣势

The problems with RAID are directly related to their advantages. For instance, while RAID can improve performance, this setup necessarily reduces the safety of the implementation. On the other hand, with increased redundancy, space efficiency is reduced.

RAID问题是与他们的优势直接相关的。例如,RAID改善性能,同时一定降低了实行的安全。另一方面,增加冗余,空间效率降低了。

Other possible problems with RAID include:

RAID其他可能问题包括:

Increased wear of hard disks, leading to an increased failure rate.

提高了硬盘磨损,导致了故障率增加。

Lack of compatibility with other hardware components and some software, like system imaging programs.

缺乏与其他硬件组件和软件的兼容性,比如系统映像程序。

Greater difficulty in performing backups and system rescue/restore in the case of a failure.

以防故障而执行备份和系统恢复的困难更大了。

Support by operating systems expected to use the RAID.

使用支持RAID的操作系统。

Limitations

局限性

RAID introduces a higher level of complexity into the system compared to conventional disk layout. This means that certain operating systems and/or software solutions may not work as intended. A good example of this problem is the LKCD kernel crash utility, which cannot be used in local dump configuration with RAID devices.

相比传统的磁盘设置,RAID在系统中引入了更高级别的复杂性。这意味着某些操作系统或软件可能无法按期望地工作。这个问题的一个很好的例子是LKCD内核崩溃工具,不能用于配置RAID设备的本地转储。

The problem with software limitations is that they might not be apparent until after the system has been configured, complicating things.

软件局限的问题是他们可能不会很明显直到系统配置之后,复杂的步骤之后。

To sum things up for this section, using RAID requires careful consideration of system needs. In home setups, RAID is usually not needed, except for people who require exceptional performance or a very high level of redundancy. Still, if you do opt for RAID, be aware of the pros and cons and plan accordingly.

总结本章节,使用RAID要求仔细考虑系统需求。RAID通常不需要在本地安装,除非人们想要额外的性能或非常高的冗余水平。不过,如果你一定要选择RAID,要认识到利弊和相应的计划。

This means testing the backup and imaging solutions, the stability of installed software and the ability to switch away from RAID without significantly disrupting your existing setup.

这意味着测试备份和映像解决方案,已安装软件的稳定性和不使用RAID不会明显地破坏你现有设置的能力。

RAID levels

RAID级别

In the section above, we have mentioned several scenarios, where this or that RAID configuration may benefit this or that aspect of system work. These configurations are known as RAID levels and they govern all aspects of RAID benefits and drawbacks, including read/write performance, redundancy and space efficiency.

上面的部分,我们已经提到了几种情况,RAID配置可能会各方面使系统受益。这些配置被称为RAID级别,他们制约这RAID的优缺点,包括读写性能,冗余和空间效率。

There are many RAID levels. It will be impossible to list them all here. For details on all available solutions, you might want to read the Wikipedia article on the subject. The article not only presents the different levels, it also lists the support for each on different operating systems.

有许多的RAID级别。不可能在这里全部列出来。有关所有可能解决方案,你可能需要阅读维基百科关于这个主题的文章。文章不仅仅介绍了不同级别,也包括了列出了不同操作系统上的各个支持。

In this tutorial, we will mention the most common, most important RAID types, all of which are fully supported by Linux.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wywzpd.html