一、首先查看当前meta设备状态:
# metastat >$HOME/metastat.0820
# more metastat.0820
d1:Mirror
Submirror 0:d11
State:Okay
Submirror 1:d12
State:Okay
Pass: 1
Read option: roundrobin(default)
Write option: parallerl(default)
Size:4274640 blocks
d 11: Submirror of d1
State:Okay
Hot spare pool: hsp000
Size: 4274640 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C0t0d0s0 0 No Okay
d 12: Submirror of d1
State:Okay
Hot spare pool: hsp000
Size: 4274640 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C3t0d0s0 0 No Okay c2t0d0s0
d2:Mirror
Submirror 0:d21
State:Okay
Submirror 1:d22
State:Okay
Pass: 1
Read option: roundrobin(default)
Write option: parallerl(default)
Size:2049840 blocks
d 21: Submirror of d2
State:Okay
Hot spare pool: hsp000
Size: 2049840 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C0t0d0s1 0 No Okay
d 22: Submirror of d2
State:Okay
Hot spare pool: hsp000
Size: 2049840 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C3t0d0s1 0 No Okay
d3:Mirror
Submirror 0:d31
State:Okay
Submirror 1:d32
State:Okay
Pass: 1
Read option: roundrobin(default)
Write option: parallerl(default)
Size:2049840 blocks
d 31: Submirror of d3
State:Okay
Hot spare pool: hsp000
Size: 2049840 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C0t0d0s3 0 No Okay
d 32: Submirror of d3
State:Okay
Hot spare pool: hsp000
Size: 2049840 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C3t0d0s3 0 No Okay
d4:Mirror
Submirror 0:d41
State:Okay
Submirror 1:d42
State:Okay
Pass: 1
Read option: roundrobin(default)
Write option: parallerl(default)
Size:11430153 blocks
d 41: Submirror of d4
State:Okay
Hot spare pool: hsp001
Size: 11430153 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C2t1d0s0 0 No Okay
d 42: Submirror of d4
State:Okay
Hot spare pool: hsp001
Size: 11430153 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C3t1d0s0 0 No Okay c0t1d0s0
d5:Mirror
Submirror 0:d51
State:Okay
Submirror 1:d52
State:Okay
Pass: 1
Read option: roundrobin(default)
Write option: parallerl(default)
Size:6244749 blocks
d 51: Submirror of d5
State:Okay
Hot spare pool: hsp001
Size: 6244749 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C2t1d0s1 0 No Okay
d 52: Submirror of d5
State:Okay
Hot spare pool: hsp001
Size: 6244749 blocks
Stripe 0:
Device Start Block Dbase State Hot spare
C3t1d0s1 0 No Maintence
Hsp000: 3 hot spares
C2t0d0s1 Available 2049840 blocks
C2t0d0s3 Available 2049840 blocks
C2t0d0s0 In use 4274640 blocks
Hsp001: 2 hot spares
C0t1d0s1 Available 2050461 blocks
C0t1d0s0 In use 15620850 blocks
确定meta设备 d52处于维护状态,hsp001池中的hot spare处于使用中,替换了失败的d52。
D52所在的硬盘为:c3t1d0,与这共在同硬盘的还有d42。将d42与d4分离,d52与d5分离:
# metadetach d4 d42
# metadetach d5 d52
二、拔出坏掉的硬盘:c3t1d0,在同一位置插入新的18G硬盘(因为没有同样大小的9G硬盘,所以,只好用18G硬盘来代替。其实,只要容量大于或等于原先硬盘容量就可以了,镜像分区是绝对不能小地,要不,恢复不了地)。
# format
0. c0t0d0
1. c0t0d0
2. c2t0d0
3. c2t1d0
4. c3t0d0
5. c3t1d0
因为是c3t1d0与c2t1d0做的mirror,所以,要配置新硬盘的分区与c2t1d0相同。选择3,查看分区情况
c2t1d0s0: root 5.45gb
c2t1d0s1: usr 2.98gb
c2t1d0s7: alternates 3.51mb
将新硬盘与原硬盘分区设置相同,然后进行下一步工作。
三、1.先把d4设备与新硬盘做连接
# metattach d4 d42
2.恢复坏掉的d5的submirror d52
# metareplace –e d5 c3t1d0s1
3.将spare设备重新放回到hot spare pool中
# metahs –e c0t1d0s0
(如果hot spare处于In Use状态,则无法释放,需要执行以下:
# metareplace –e d4 c3t1d0s0
# metareplace –e d1 c3t0d0s0
四、因为更换了新的硬盘,所以,原先硬盘上的复制的库文件会丢失,应该对其进行修复。
1、 查看一下当前的复制数据库情况:
# metadb –i
flags first blk block count
…
…
M p unknown unknown /dev/dsk/c3t1d0s7
2、 删除无效的数据库复制
# metadb –d –f /dev/dsk/c3t1d0s7
3、 确定一下是否被删除
# metadb –I
4、 重启之后,增加复制数据库
# metadb –a –c 2 /dev/dsk/c3t1d0s7
这样,整个的SDS的磁盘恢复算是完成了。
阅读(3878) | 评论(2) | 转发(0) |