LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1053|回复: 2

全新安装 ETCH,建立软 RAID5 和 LVM 笔记

[复制链接]
发表于 2007-10-30 19:45:35 | 显示全部楼层 |阅读模式
本文参考了 http://www.debian-administration.org/articles/512

1. 安装环境
(1) 4 个 500 G SATA 硬盘,准备组成 RAID5,并安装 LVM。
(2) Debian Etch 4.0r1。

2. 安装前的准备
(1) 在 BIOS 中关闭 RAID 支持,保证分区时所有物理驱动器可见;
(2) LILO 和 GRUB 不能从 RAID5 引导,因此建立一个 RAID1 上的 /boot 分区;
(3) 分区规划

  1. /boot        255 M        RAID1
  2. /        5 G        LVM/RAID5
  3. /tmp        5 G        LVM/RAID5
  4. /swap        10 G        LVM/RAID5
  5. /home        300 G        LVM/RAID5
  6. /usr        50 G        LVM/RAID5
  7. /var        50 G        LVM/RAID5
  8. /data        1 T        LVM/RAID5
复制代码


3. 开始安装 Debian Etch 直到分区步骤,选择 "手动 (Manual)"。

4. 创建 RAID 卷
(1) 删除所有已有的分区,只显示 "FREE SPACE";
(2) 对于所有物理驱动器,依次进行:
* Create new partition
* New partition size:255 M;
* Type for the new partition: Primary
* Location for the new partition: Beginning
* Use as: physical volume for RAID
* Done setting up the partition

创建了用于 RAID1 的分区。

(3) 然后
* Create new partition
* New partition size: <the remaining space on the drive>
* Type for the new partition: Primary
* Location for the new partition: Beginning
* Use as: physical volume for RAID
* Done setting up the partition

创建了用于 RAID5 的分区。

(4) 此时所有分区显示为 "K Raid"。

5. 配置软 RAID
(1) 选择新出现的选项 "Configure Software Raid";
(2) 选择 "Yes" 保存分区变更;
(3) 选择 "Create MD device"
* Multidisk device type: RAID1
* Number of active devices for the RAID1 array: 3
* Number of spare devices for the Raid1 array: 1
* 选择将使用的分区:sda1, sdb1, sdc1
* 选择冗余分区 (spare):sdd1
(4) 再次选择 "Create MD device"
* Multidisk device type: RAID5
* Number of active devices for the RAID5 array: 4
* Number of spare devices for the RAID1 array: 0
* 选择将使用的分区: sda2, sdb2, sdc2, sdd2
(5) 选 "Finish" 回到分区界面。

6. 设置 RAID1 分区
(1) 选择分区表中新建的 Raid1 卷, 目前显示为 "Use as: do not use",设置为 ext3, /boot 分区
(2) Done setting up this partition

7. 创建逻辑 LVM 卷
(1) 选择分区表中新建的显示为 "Use as: do not use" 的 RAID5 卷,进入后设置为 "physical volume for LVM"
(2) Done setting up the partition
(3) 设置完成后,此 RAID5 卷显示为 "K LVM"

8. 配置 LVM
(1) 选择分区窗口中的新选项 "Configure the Logical Volume Manager"
(2) 选 "Yes" 保存变更并开始配置 LVM
(3) 在 LVM 配置界面中,选择 "Create Volume Group":
* 比如将 LVM 逻辑卷组命名为: server
* 选择设备 (只有一个选项): /dev/md1
(4) 创建逻辑卷
* 选择新建的逻辑卷组 server
* 逐个创建逻辑卷并命名,如:server_root, server_var, server_tmp, server_swap, servername_home 和 server_data,分别用于分区 /, /var, /tmp, /swap, /home, /data
* 确定各个分区的大小
(5) 选择 "Finish"

9. 配置 LVM 卷
(1) 回到分区界面,此时显示分区表中全部的逻辑卷
(2) 为各个逻辑卷设置文件系统和挂载点
(3) 选择 "Finish partitioning and write changes to disk" 保存分区变更.

10. 继续安装 Debian,到安装 Bootloader 时,选择前面创建的 /boot 分区,继续完成安装。
发表于 2007-10-30 19:50:37 | 显示全部楼层
好文!顶起~~~
回复 支持 反对

使用道具 举报

发表于 2007-11-1 00:47:52 | 显示全部楼层
强,羡慕那么多的硬盘阿。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表