1.用format查看系统硬盘状态:
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 ;
/sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100000c507be33a,0
1. c0t1d0 ;
/sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100000c507bd77b,0
2. c0t2d0 ;
/sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100000c507be2fb,0
3. c0t3d0 ;
/sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100000c507bd25a,0
4. c2t4d0 ;
/sbus@a,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100000c507bce5a,0
5. c2t5d0 ;
/sbus@a,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100000c507be392,0
6. c2t6d0 ;
/sbus@a,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100002037843b72,0
7. c2t7d0 ;
/sbus@a,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100000c507bccfd,0
Specify disk (enter its number):
2.使用metadb查看db库状态:
# metadb
flags first blk block count
a m p luo 16 1034 /dev/dsk/c0t0d0s7
a p luo 16 1034 /dev/dsk/c0t1d0s7
a p luo 16 1034 /dev/dsk/c0t2d0s7
a p luo 16 1034 /dev/dsk/c0t3d0s7
a p luo 16 1034 /dev/dsk/c2t4d0s7
a p luo 16 1034 /dev/dsk/c2t5d0s7
a p luo unknown unknown /dev/dsk/c2t6d0s7
a p luo 16 1034 /dev/dsk/c2t7d0s7
3.使用metastat查看系统使用SDS镜像情况:
d20: Mirror
Submirror 0: d100
State: Okay
Submirror 1: d101
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20480121 blocks
d100: Submirror of d20
State: Okay
Size: 20480121 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s0 0 No Okay
d101: Submirror of d20
State: Okay
Size: 20480121 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c2t4d0s0 0 No Okay
d21: Mirror
Submirror 0: d102
State: Okay
Submirror 1: d103
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 7577847 blocks
d102: Submirror of d21
State: Okay
Size: 7577847 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s1 0 No Okay
d103: Submirror of d21
State: Okay
Size: 7577847 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c2t4d0s1 0 No Okay
d22: Mirror
Submirror 0: d104
State: Okay
Submirror 1: d105
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20480121 blocks
d104: Submirror of d22
State: Okay
Size: 20480121 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d150 0 No Okay
d150: Soft Partition
Component: c0t0d0s3
State: Okay
Size: 20480121 blocks
Extent Start Block Block count
0 1 20480121
d105: Submirror of d22
State: Okay
Size: 20480121 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d151 0 No Okay
d151: Soft Partition
Component: c2t4d0s3
State: Okay
Size: 20480121 blocks
Extent Start Block Block count
0 1 20480121
d23: Mirror
Submirror 0: d106
State: Okay
Submirror 1: d107
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 16386408 blocks
d106: Submirror of d23
State: Okay
Size: 16386408 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d152 0 No Okay
d152: Soft Partition
Component: c0t0d0s3
State: Okay
Size: 16386408 blocks
Extent Start Block Block count
0 20480123 16386408
d107: Submirror of d23
State: Okay
Size: 16386408 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d153 0 No Okay
d153: Soft Partition
Component: c2t4d0s3
State: Okay
Size: 16386408 blocks
Extent Start Block Block count
0 20480123 16386408
d26: Mirror
Submirror 0: d112
State: Okay
Submirror 1: d113
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 7988085 blocks
d112: Submirror of d26
State: Okay
Size: 7988085 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s1 0 No Okay
d113: Submirror of d26
State: Okay
Size: 7988085 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c2t5d0s1 0 No Okay
d27: Mirror
Submirror 0: d114
State: Okay
Submirror 1: d115
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 14338107 blocks
d114: Submirror of d27
State: Okay
Size: 14338107 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d154 0 No Okay
d154: Soft Partition
Component: c0t2d0s3
State: Okay
Size: 14338107 blocks
Extent Start Block Block count
0 2890 14338107
d115: Submirror of d27
State: Needs maintenance
Invoke: metareplace d27 d155 ;
Size: 14338107 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d155 0 No Maintenance
d155: Soft Partition
Component: c2t6d0s3
State: Errored
Size: 14338107 blocks
Extent Start Block Block count
0 2890 14338107
d29: Mirror
Submirror 0: d118
State: Okay
Submirror 1: d119
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12289806 blocks
d118: Submirror of d29
State: Okay
Size: 12289806 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
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: Okay
Size: 12289806 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d157 0 No Okay
d157: Soft Partition
Component: c2t7d0s3
State: Okay
Size: 12289806 blocks
Extent Start Block Block count
0 2890 12289806
d30: Mirror
Submirror 0: d120
State: Okay
Submirror 1: d121
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 28673325 blocks
d120: Submirror of d30
State: Okay
Size: 28673325 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d158 0 No Okay
d158: Soft Partition
Component: c0t3d0s3
State: Okay
Size: 28673325 blocks
Extent Start Block Block count
0 12292697 28673325
d121: Submirror of d30
State: Okay
Size: 28673325 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d159 0 No Okay
d159: Soft Partition
Component: c2t7d0s3
State: Okay
Size: 28673325 blocks
Extent Start Block Block count
0 12292697 28673325
d31: Mirror
Submirror 0: d122
State: Okay
Submirror 1: d123
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20480121 blocks
d122: Submirror of d31
State: Okay
Size: 20480121 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d160 0 No Okay
d160: Soft Partition
Component: c0t2d0s3
State: Okay
Size: 20480121 blocks
Extent Start Block Block count
0 14340998 20480121
d123: Submirror of d31
State: Needs maintenance
Invoke: metareplace d31 d161 ;
Size: 20480121 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d161 0 No Maintenance
d161: Soft Partition
Component: c2t6d0s3
State: Okay
Size: 20480121 blocks
Extent Start Block Block count
0 14340998 20480121
d50: Mirror
Submirror 0: d200
State: Okay
Submirror 1: d201
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks
d200: Submirror of d50
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d162 0 No Okay
d162: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 1 4194828
d201: Submirror of d50
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d163 0 No Okay
d163: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 1 4194828
d51: Mirror
Submirror 0: d202
State: Okay
Submirror 1: d203
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks
d202: Submirror of d51
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d164 0 No Okay
d164: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 4194830 4194828
d203: Submirror of d51
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d165 0 No Okay
d165: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 4194830 4194828
d52: Mirror
Submirror 0: d204
State: Okay
Submirror 1: d205
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks
d204: Submirror of d52
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d166 0 No Okay
d166: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 8389659 4194828
d205: Submirror of d52
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d167 0 No Okay
d167: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 8389659 4194828
d53: Mirror
Submirror 0: d206
State: Okay
Submirror 1: d207
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks
d206: Submirror of d53
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d168 0 No Okay
d168: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 12584488 4194828
d207: Submirror of d53
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d169 0 No Okay
d169: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 12584488 4194828
d54: Mirror
Submirror 0: d208
State: Okay
Submirror 1: d209
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks
d208: Submirror of d54
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d170 0 No Okay
d170: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 16779317 4194828
d209: Submirror of d54
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d171 0 No Okay
d171: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 16779317 4194828
d55: Mirror
Submirror 0: d210
State: Okay
Submirror 1: d211
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks
d210: Submirror of d55
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d172 0 No Okay
d172: Soft Partition
Component: c0t2d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 34821120 4194828
d211: Submirror of d55
State: Needs maintenance
Invoke: metareplace d55 d173 ;
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d173 0 No Maintenance
d173: Soft Partition
Component: c2t6d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 34821120 4194828
d56: Mirror
Submirror 0: d212
State: Okay
Submirror 1: d213
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 3073896 blocks
d212: Submirror of d56
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d174 0 No Okay
d174: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 20974146 4194828
d213: Submirror of d56
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d175 0 No Okay
d175: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 20974146 4194828
d57: Mirror
Submirror 0: d214
State: Okay
Submirror 1: d215
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 1086264 blocks
d214: Submirror of d57
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d176 0 No Okay
d176: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 25168975 4194828
d215: Submirror of d57
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d177 0 No Okay
d177: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 25168975 4194828
d58: Mirror
Submirror 0: d216
State: Okay
Submirror 1: d217
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks
d216: Submirror of d58
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d178 0 No Okay
d178: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 29363804 4194828
d217: Submirror of d58
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d179 0 No Okay
d179: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 29363804 4194828
d59: Mirror
Submirror 0: d218
State: Okay
Submirror 1: d219
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4096602 blocks
d218: Submirror of d59
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d180 0 No Okay
d180: Soft Partition
Component: c0t3d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 40966023 4194828
d219: Submirror of d59
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d181 0 No Okay
d181: Soft Partition
Component: c2t7d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 40966023 4194828
d60: Mirror
Submirror 0: d220
State: Okay
Submirror 1: d221
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 1291383 blocks
d220: Submirror of d60
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d182 0 No Okay
d182: Soft Partition
Component: c0t1d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 33558633 4194828
d221: Submirror of d60
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d183 0 No Okay
d183: Soft Partition
Component: c2t5d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 33558633 4194828
d61: Mirror
Submirror 0: d222
State: Okay
Submirror 1: d223
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks
d222: Submirror of d61
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d184 0 No Okay
d184: Soft Partition
Component: c0t0d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 36866532 4194828
d223: Submirror of d61
State: Okay
Size: 4194828 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d185 0 No Okay
d185: Soft Partition
Component: c2t4d0s3
State: Okay
Size: 4194828 blocks
Extent Start Block Block count
0 36866532 4194828
4.检查结果:
d27有两个submirror:d114(c0t2d0状态:OK) , d115(c2t6d0状态:Needs maintenance)。
d115的Soft Partition:d155(状态:Errored, c2t6d0s3,起始块:2890,总计块:14338107)
d31有两个submirror:d122(c0t2d0状态:OK), d123(c2t6d0状态:Needs maintenance)。
d123的Soft Partition:d161(状态:OK,c2t6d0s3,起始块:14340998,总计块: 20480121)
d55有两个submirror:d210(c0t2d0状态:OK), d211(c2t6d0状态:Needs maintenance)。
d211的Soft Partition:d173 (状态:OK,c2t6d0s3,起始块:34821120,总计块: 4194828)
由于c0t2d0的景象盘c2t6d0故障,导致其中d115、d123、d211 submirror需要维护,且有一个Soft Partition要是Errored!下面停机更换硬盘使用boot –r重新引导系统后将c2t6d0的分区重新划分和原盘c0t2d0一样。
5.删除c2t6d0原始metadb并重新创建新数据库副本
# metadb -d c2t6d0s7
# prtvtoc /dev/rdsk/c0t2d0s2|fmthard –s – /dev/rdsk/c2t6d0s2
# metadb -a -f -c 1 c2t6d0s7
# metadb 查看db库状态
flags first blk block count
a m p luo 16 1034 /dev/dsk/c0t0d0s7
a p luo 16 1034 /dev/dsk/c0t1d0s7
a p luo 16 1034 /dev/dsk/c0t2d0s7
a p luo 16 1034 /dev/dsk/c0t3d0s7
a p luo 16 1034 /dev/dsk/c2t4d0s7
a p luo 16 1034 /dev/dsk/c2t5d0s7
a u 16 1034 /dev/dsk/c2t6d0s7
a p luo 16 1034 /dev/dsk/c2t7d0s7
6.将d27, d31, d55中的d115, d123, d211从镜像中分离并清除及其Soft Partition:
# metadetach -f d27 d115
# metaclear d115
# metaclear d155
# metadetach -f d31 d123
# metaclear d123
# metaclear d161
# metadetach -f d55 d211
# metaclear d211
# metaclear d173
7.重建3个软分区,重建submirror并同步:
# metainit d155 -p c2t6d0s3 -o 2890 -b 14338107
# metainit d115 1 1 d155
# metattach d27 d115
# metainit d161 -p c2t6d0s3 -o 14340998 -b 20480121
# metainit d123 1 1 d161
# metattach d31 d123
# metainit d173 -p c2t6d0s3 -o 34821120 -b 4194828
# metainit d211 1 1 d173
# metattach d55 d211
8.使用metastat查看同步情况:
# metastat d27
# metastat d31
# metastat d55
9. 同步完成检查metastat状态,全部OK,故障解决!
呵呵,所有数据资料有pengtao_hlp现场提供(辛苦了,功劳是属于你的!),我做的远程电话支持,完善和整理!