现在这儿是一个快速例子:

What do we have here?

我们这儿做了什么?

--create tells mdadm to create a new RAID device.

--create告诉mdadm创建新的RAID设备。

--verbose tells it to print information about its operations.

--verbose告诉mdadm打印它运行的信息。

/dev/md0 is the new RAID device that we want to create.

/dev/md0是我们想要创建的新的RAID设备。

--level=raid1 defines the RAID level; in our case, RAID 1 (Mirror).

--level=raid1定义了RAID 的级别;我们的例子中,RAID1(镜像)。

--raid-devices=2 specifies how many disks (devices) are going to be used in the creation of the new RAID device.

--raid-devices=2 指定创建新的RAID设备会用到多少磁盘(设备)。

/dev/sda1 /dev/sdb1 are the two disks that are going to be used in the creation.

/dev/sda1 /dev/sdb1将会在新的创建中使用到的两个磁盘。

Simple, right?

很简单,对吗?

OK, now that we know what RAID is and how it works, let's configure one - or two!

好了,现在我们知道什么是RAID,以及它是如何工作的。开始配置1或2!

Working with RAID - real-life examples

使用RAID工作- 真实的例子

In this section we will install a complete Linux operating system from scratch, with RAID 0 and RAID 1 used on the partitions on two local hard disks. We will also tackle the questions on how these devices are created and grouped, how the system identifies and uses them, and how the GRUB bootloader fits into the picture.

在本节中,我们将从头安装一个完整的Linux操作系统,使用本地硬盘上的分区的RAID0和RAID1。我们还会解决这些设备是如何被创建和结合的,系统是如何识别和使用它们,GRUB引导是如何适合图片。

I will demonstrate the configuration of RAID using Ubuntu 8.10 Intrepid Ibex as the test platform. As mentioned earlier, Ubuntu 8.10 is no longer the most current release - and this does not matter one bit. The general idea remains the same - and this is what I want you to learn: the principle. Once you grasp the fundamental concepts of RAID setup, you will be able to this on any which operating system.

我会演示使用Ubuntu8.10 Intrepid Ibex做为测试平台配置RAID。早前提到,Ubuntu8.10不再是最新的版本——这不要紧。总的想法是一样的——这就是我想要你学得:原理。一段你掌握了RAID设置的基本概念,你将能够在任何操作系统上配置。

Furthermore, configuring RAID on Ubuntu is a good choice for several more reasons:

此外,在Ubuntu上配置RAID从几个原因上都是不错的选择:

Ubuntu is the most popular Linux desktop distro, which probably means there's a fair chance you will indeed be setting up RAID on Ubuntu or one of its flavors.

Ubuntu是最流行的Linux桌面发行版,这可能意味着有一个公平机会,你的确会在Ubuntu上配置RAID或者它的特征之一。

The default Ubuntu installation is very simple; so simple, in fact, that is strips away some of the features for the sake of simplicity. One of the victims is indeed RAID, which cannot be configured using the standard installation from the live CD. You need the Alternate CD, which uses a text-driven installation menu and allows you to setup RAID, as well as other advanced options. The text installers looks "old" - meaning you will not really feel like you're installing Ubuntu. This will help you understand the concept beyond colors and pretty menus, allowing you to transition to other distributions with ease.

默认的Ubuntu的安装非常简单;如此简单,事实上,为了简单起见,除去了一些功能。其中受损害的是RAID,不能从CD上标准安装配置。你需要另外的CD,使用文本驱动的安装菜单,允许你像其他高级选择一样安装RAID。文本安装看起来“旧”——意味着你不会真觉得你在安装Ubuntu。这帮助你理解颜色和漂亮菜单之外的概念,允许你轻松地过渡到其他发行版。

The use of an older release and the Alternate CD allows me to prove a point: that no matter which distribution you choose, the power of Linux can be unleashed to the fullest. You do not have to disqualify distros on the premises of being "too simple" or "dumbed down" simply because such propositions are untrue.

旧版本的使用和备用CD允许我证明一个观点:无论你选择哪个发行版,Linux的能力被释放到最充分。你不必在“过于简单”或“简单化”的前提取消发行版,因为这样的前提是不存在的。

All right, now that you know what we're up to, let's begin.

好吧,现在你知道我们准备做什么了,我们开始吧。

Installing Ubuntu via Alternate CD is similar to almost every Linux installation you have seen or tried or read about. Place the CD into the CD tray, boot, follow instructions.

通过备用CD安装Ubuntu几乎类似于你见过或尝试或阅读的每一种Linux安装。把CD放入CD托盘,引导,按照指导操作。

Partitioning

分区

After a while, you will reach the Partition Disks stage. This is where the fun begins. We will choose the manual method.

过一会儿,到了磁盘分区阶段。这是有趣的地方。我们选择手动方式。

You will see the existing setup, if any. In our case, we have two hard disks, roughly identical, each with three partitions on it. Each disk holds a primary ext3 partition and a 500MB swap and a ~2GB ext3 partition inside the Extended volume.

你会看到现有的设置,如果有的花。就我们而言,我们有两块硬盘,大致相同,每个磁盘上有3个分区。每块磁盘有主要的ext3分区和500MB的交换区和扩展卷中的2GB的ext3分区。

This means we have quite a bit of freedom when it comes to creating RAID arrays, where the logic beckons to pair sda1 with sdb1, sda5 with sdb5 and so forth.

这意味着到创建RAID阵列时我们有相当多的自由,其中逻辑搭配有sda1和sdb1,sda5和sdb5等等。

Edit partitions

编辑分区

To do that, we need to change the partitions. Highlight any and hit Enter. The installer will graciously tell you that You are editing ... This partition is formatted with ..., so there are no mistakes.

为了做到这一点,我们需要改变分区。突出显示任何一个并按下回车键。安装程序会很有风度地告诉你,你正在编辑。。。这个分区的格式为。。。,所以没有错误。

We need to change the Use as: field.

我们需要改变使用:字段。

Change type to RAID

改变类型为RAID

We will change the type to: physical volume for RAID.

我们会改变类型为:RAID的逻辑卷。

We will repeat this for all our partitions. The final layout should be something like this:

我们会对所有分区重复这步。最后的设置应该是像这样:

Once you do this, a new category will show up in the menu. At the beginning you only had Guided partitioning and Help on partitioning. Take a look above if you don't remember. Now, there's a new one: Configure software RAID.

一旦你这样做,一个新的类别会出现在菜单。最初分区上只有引导分区和帮助。如果你记不住仔细看看上面。现在,有个新的:配置软件RAID。

The installer now recognizes the partitions flagged as RAID volumes and can now configure them.

安装程序现在识别标记为RAID逻辑卷的分区,现在可以配置它们。

Configure software RAID

配置软件RAID

The first thing, you will receive a warning. It tells you the changes you have just made will be committed. Furthermore, no additional changes will be allowed. Make sure you are satisfied with your layout before proceeding.

第一件事,你会收到警告。它告诉你你刚刚做得更改将会被执行。此外,没有其他更改将被允许。确保在进行前你对你的设置满意。

What is going to happen is that the RAID superblock is going to be written on the devices, marking them with a higher order hierarchy than just physical partitions. This will allow the operating system as well as RAID utilities to properly handle these devices.

下一步是RAID超级块将会被写到设备上,使用比仅仅物理分区更高层级的标记。这允许操作系统以及RAID工具妥善处理这些设备。

After that, the next step is to create a new MD device. By the way, earlier, we mentioned the mdadm utility. One of its mode is the ability to create MD devices. In fact, this is exactly what is happening underneath the hood. Later, we'll see the text command that do the same job as the installer above.

此后,下一步是创建新的MD设备。顺便说一下,刚才我们提到mdadm工具。其中的一种模式能够创建MD设备。事实上,这正是在下一步骤。稍后,我们会看到文本命令做上述同样的工作。

linux怎么设置raid,如何在Linux中配置RAID-教程相关推荐

  1. linux phpunit 安装,Mac如何在PHPStrom中配置phpunit

    本文主要讲的是mac环境下配置phpunit,windows.linux环境类似. 全局安装phpunit 在 phpunit官网 找到本地安装php版本对应的phpunit.执行下列代码,全局安装p ...

  2. php如何设置iis,如何在IIS中配置PHP,让IIS支持PHP的运行环境

    IIS配置PHP三步骤: 1.下载PHP的文件包: 2.配置PHP: 3.将PHP扩展引入IIS: 4.测试php环境 第一步:下载PHP组件 下载地址:http://windows.php.net/ ...

  3. linux查看图像大小_如何在Linux上调整一批图像的大小?

    linux查看图像大小 Resizing images on Linux with gThumb is easy. However, I have a batch of images inside a ...

  4. ) php中_如何在webmin中配置多个PHP版本

    请关注本头条号,每天坚持更新原创干货技术文章. 如需学习视频,请在微信搜索公众号"智传网优"直接开始自助视频学习 1. 前言 如何在webmin中配置多个PHP版本?本教程将会给您 ...

  5. 如何在sharepoint2010中配置Google Anlytics 分析服务

    简介 Google Analytics(分析)不仅可以帮助您衡量销售与转化情况,而且能为您提供新鲜的深入信息,帮助您了解访问者如何使用您的网站,他们如何到达您的网站,以及您可以如何吸引他们不断回访. ...

  6. 如何在IIS中配置https

    如何在IIS中配置https,并能产生证书下发给用户,在客户端接受用户导入证书 请不要发msdn了 已经看过好几遍了为 Web 服务器配置 SSL 要在 IIS 中启用 SSL,首先必须获得用于加密和 ...

  7. RTKLIB源码——如何在VS2019中配置、调试

    RTKLIB源码--如何在VS2019中配置.调试 一. 准备源码: 二.Visual Studio中新建工程: 三.编译结果: 四.实例 一. 准备源码: 注:第三方rtklib修改后的源码地址 h ...

  8. Maven入门---如何在idea中配置Maven

    Maven入门---如何在idea中配置Maven 一.下载Maven 二.配置环境变量 三.配置本地仓库 四.配置镜像 五.配置统一的JDK 六.创建Maven项目 七.Maven项目变为Web项目 ...

  9. 在 PyCharm 2017.2.3 中设置 Anaconda 5.0.0 中配置的多Python环境

    Anaconda 相关文章请先阅读 安全的安装Anaconda3 5.0.0 Windows x86_64 http://blog.csdn.net/hu_zhenghui/article/detai ...

  10. ubuntu四个屏幕设置_如何在 Linux 中为每个屏幕设置不同的壁纸

    如果你想在 Ubuntu 18.04 或任何其他 Linux 发行版上使用 GNOME.MATE 或 Budgie 桌面环境在多个显示器上显示不同的壁纸,这个小工具将帮助你实现这一点. 多显示器设置通 ...

最新文章

  1. 聊聊Mysql的那些破事儿
  2. C++:基类和派生类
  3. python零碎知识(5):有关正则表达式
  4. HDU2879(积性函数)
  5. 如何为.NETCore安装汉化包智能感知
  6. Android之实现首尾带圆角的多颜色水平条
  7. 续集---网络管理常用命令
  8. 程序员快放弃 Android 9.0 吧,10.0 正在来的路上!
  9. 调用腾讯优图开放平台进行人脸识别-Java调用API实现
  10. 源码 解析_List源码解析
  11. centos下将普通命令设置为全局
  12. 计算机应用基础陈江鸿,广播电视大学计算机教育改革探索与实践-计算机教育论文-计算机论文(6页)-原创力文档...
  13. 树莓派默认密码_树莓派介绍:没有显示器,怎样远程控制树莓派?
  14. 蒙特卡洛的应用软件统计——小李子LC
  15. office2021下载|office2021安装包配置过程图文教程
  16. AVR32单片机 矩阵按键 按键键值函数解析
  17. redis常用的五大数据类型和redis新增类型以及对应的命令
  18. 【知识点】信道路径衰落分类、计算公式、换算
  19. 什么是seo、vue中如何优化seo ?
  20. FinClip Hackathon 那些令人拍案叫绝的项目

热门文章

  1. oracle数据库alter table,oracle 数据库 alter table的用法(经典)
  2. 清朝12位皇帝简介【顺康雍乾嘉道咸同光宣】
  3. 机器学习核心概念完全解析(建议收藏)
  4. Centos8.3安装教程
  5. 电脑右下角没有看到小喇叭图标了该怎么办
  6. cyj等于什么英语单词_CYJ是什么意思
  7. 计算机职业素养200字,职业素养心得体会200字
  8. 纸牌游戏——小猫钓鱼(队列、栈)
  9. CSS transform属性+js requestAnimationFrame函数实现旋转方块以及调整转动速度
  10. php在线电子小说网站毕业设计源码