RedHat Linux手动创建RAID和LVM分区(2)
0 8 65 0 active sync /dev/sde1
1 8 33 1 active sync /dev/sdc1
2 8 49 2 active sync /dev/sdd1
3 8 17 -1 faulty /dev/sdb1
UUID : f8283de5:39c73d89:b9fbc266:fdceb416
Events : 0.4
既然'/dev/sdb1'出现了故障,当然就要将它移除:
# mdadm /dev/md0 -r /dev/sdb1
mdadm: hot removed /dev/sdb1
现在可以关机了。关机之后拔下这块已损坏的磁盘了,换上你的新磁盘。换好之
后,分区,mkfs.XXXX。然后将它加入到软raid中:
# mdadm /dev/md0 -a /dev/sdb1
mdadm: hot added /dev/sdb1
这时候再使用mdadm的'-D'参数,可以看到sdb1已经作为hotspare盘了:
# mdadm -D /dev/md0
/dev/md0:
Version : 00.90.01
Creation Time : Wed Aug 23 15:10:19 2006
Raid Level : raid5
Array Size : 417536 (407.75 MiB 427.56 MB)
Device Size : 208768 (203.88 MiB 213.78 MB)
Raid Devices : 3
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Wed Aug 23 16:19:36 2006
State : clean
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
0 8 65 0 active sync /dev/sde1
1 8 33 1 active sync /dev/sdc1
2 8 49 2 active sync /dev/sdd1
3 8 17 -1 spare /dev/sdb1
UUID : f8283de5:39c73d89:b9fbc266:fdceb416
Events : 0.6
misc
假如创建了RAID,但是没有生成 /etc/mdadm.conf 文件,那么系统重启后是
不会启用RAID的,这时候需要这样做:
# mdadm -A /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
- 最新评论