分类:
2012-12-05 01:31:51
原文地址:SDS做过soft partition后磁盘的更换 作者:东方蜘蛛
一.报错信息:
用metastat命令察看到的信息如下:
d29: Mirror
Submirror 0: d118
State: Okay
Submirror 1: d119
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12289806 blocks
d118: Submirror of d29
State: Okay
Size: 12289806 blocks
Stripe 0:
d156 0 No Okay
d156: Soft Partition
Component: c0t3d0s3
State: Okay
Size: 12289806 blocks
Extent Start Block Block count
0 2890 12289806
d119: Submirror of d29
State: Needs maintenance
Invoke: metareplace d29 d157
Size: 12289806 blocks
Stripe 0:
d157 0 No Maintenance
d157: Soft Partition
Component: c2t7d0s3
State: Errored
Size: 12289806 blocks
Extent Start Block Block count
0 2890 12289806
二.更换硬盘步骤
1. 记录系统信息
# mkdir /test
# metadb –I > /test/metadb_-I.txt
# metastat > /test/metastat.txt
# metastat –p > /test/metastat_-p.txt
# cp /etc/lvm/* /test/
# cp /etc/vfstab /test/
# prtvtoc /dev/rdsk/c0t3d0s2 > /test/c0t3d0s2_vtoc.txt
2. 停止服务,拔出坏硬盘,插入新硬盘
# devfsadm
# format
3. 将新硬盘分区
# fmthard –s /test/c0t3d0s2_vtoc.txt /dev/rdsk/c2t7d0s2
4. Detach掉坏掉的submirror
# metadetach –f d29 d119
# metaclear –f d119
# metaclear –f d157
5. 重新做submirror,并attach上
# metainit d157 –p c2t7d0s3 12289806b
# metainit d119 1 1 d157
# metattach d29 d119
6. 察看同步情况
# metastat | grep %
三.上面的情况是先做soft partition,再在其基础上作submirror ,mirror; 如果是先做mirror,再在mirror的基础上作的soft partition,更换硬盘的过程与先前的更换过程一样。