手机版
你好,游客 登录 注册
背景:
阅读新闻

VMware Workstation 8.0 RHEL5.6 mdadm 实现软RAID5

[日期:2012-12-23] 来源:Linux社区  作者:totozlj [字体:大 中 小]

查看一下日志消息:

[root@rhel5 ~]#tail /var/log/messages
Nov 12 13:48:20 rhel5 kernel: md: syncing RAID array md0
Nov 12 13:48:20 rhel5 kernel: md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
Nov 12 13:48:20 rhel5 kernel: md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.
Nov 12 13:48:20 rhel5 kernel: md: using 128k window, over a total of 5242816 blocks.
Nov 12 13:50:31 rhel5 kernel: md: md0: sync done.
Nov 12 13:50:31 rhel5 kernel: RAID5 conf printout:
Nov 12 13:50:31 rhel5 kernel: --- rd:3 wd:3 fd:0
Nov 12 13:50:31 rhel5 kernel: disk 0, o:1, dev:sde
Nov 12 13:50:31 rhel5 kernel: disk 1, o:1, dev:sdc
Nov 12 13:50:31 rhel5 kernel: disk 2, o:1, dev:sdd

使用mdadm -E命令查看一下/dev/sdb的情况:

[root@rhel5 ~]# mdadm -E /dev/sdb
/dev/sdb:
Magic : a92b4efc
Version : 0.90.00
UUID : 23542a8f:14e76650:90c202c4:b0bd7c76
Creation Time : Mon Nov 12 11:55:51 2012
Raid Level : raid5
Used Dev Size : 5242816 (5.00 GiB 5.37 GB)
Array Size : 10485632 (10.00 GiB 10.74 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 0

Update Time : Mon Nov 12 12:52:34 2012
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Checksum : c47853e8 - correct
Events : 14

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 0 8 16 0 active sync /dev/sdb

0 0 8 16 0 active sync /dev/sdb
1 1 8 32 1 active sync /dev/sdc
2 2 8 48 2 active sync /dev/sdd

自动修复完成后,我们再查看一下RAID的状态:

再查看一下raid的状态

[root@rhel5 ~]#mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Mon Nov 12 11:55:51 2012
Raid Level : raid5
Array Size : 10485632 (10.00 GiB 10.74 GB)
Used Dev Size : 5242816 (5.00 GiB 5.37 GB)
Raid Devices : 3
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Mon Nov 12 13:50:31 2012
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 1
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : 23542a8f:14e76650:90c202c4:b0bd7c76
Events : 0.18

Number Major Minor RaidDevice State
0 8 64 0 active sync /dev/sde
1 8 32 1 active sync /dev/sdc
2 8 48 2 active sync /dev/sdd

3 8 16 - faulty spare /dev/sdb

我们可以看到/dev/sde已经替换了/dev/sdb。

这时我们可以从/dev/md0中移除/dev/sdb设备:

 [root@rhel5 ~]#mdadm /dev/md0 -r /dev/sdb
mdadm: hot removed /dev/sdb

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款