วันอังคารที่ 8 ธันวาคม พ.ศ. 2552

How to Monitor/manager software raid

# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb5[2] sda5[0]
9767424 blocks [2/1] [U_]
[=====>...............] recovery = 25.8% (2528512/9767424) finish=4.4min speed=27019K/sec

md2 : active raid1 sdb6[1]
19534912 blocks [2/1] [_U]

md3 : active raid1 sdb8[1] sda8[0]
44756992 blocks [2/2] [UU]

md0 : active raid1 sdb1[1] sda1[0]
64128 blocks [2/2] [UU]

# mdadm --detail /dev/md1
/dev/md1:
Version : 0.90
Creation Time : Sat Jul 9 21:46:05 2005
Raid Level : raid1
Array Size : 9767424 (9.31 GiB 10.00 GB)
Used Dev Size : 9767424 (9.31 GiB 10.00 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Tue Dec 8 12:59:37 2009
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

UUID : 5757d121:b65d61e8:0f50c7af:cbb83343
Events : 0.367292852

Number Major Minor RaidDevice State
0 8 5 0 active sync /dev/sda5
1 0 0 1 removed


Rebuild raid :
# mdadm --add /dev/md1 /dev/sdb5
mdadm: re-added /dev/sdb5

Mark device as faulty
#mdadm --manage /dev/md0 --fail /dev/sda2

Remove device from array
#mdadm --remove /dev/md3 /dev/sb3

Stop & remove raid
*please unmount all file system before stop / remove raid.
#mdadm --stop /dev/md2
#mdadm --zero-superblock /dev/sda2

----

ไม่มีความคิดเห็น:

แสดงความคิดเห็น