一步步做raid5+lvm实验
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
一步步做raid5+lvm实验
实验目的:
1。将sdb,sdc,sdd3块硬盘组成raid5模式
2。建立LVM
3。模拟故障,sdc出故障,删除该硬盘,再重新添加硬盘,恢复raid5
4。增加LVM容量
实验步骤
1,格式化3块硬盘
[root@RHEL5-1 ~]# fdisk /dev/sdb //格式化/dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n //增加一个新的分区
Command action
e extended
p primary partition (1-4)
p //创建主分区
Partition number (1-4): 1 //分区号为1
First cylinder (1-130, default 1): //设置分区大小
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130):
Using default value 130
Command (m for help): t //改变系统的ID
Selected partition 1
Hex code (type L to list codes): fd //设置系统HEX为fd,即raid模式
Changed system type of partition 1 to fd (Linux raid autodetect)
Command (m for help): w //保存
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@RHEL5-1 ~]# fdisk /dev/sdc //格式化/dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130):
Using default value 130
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@RHEL5-1 ~]# fdisk /dev/sdd//格式化/dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n
Command action
e extended
p primary partition (1-4)