Sun/SVM : Mirror boot disk steps
昨天西德要xx管理局做定期維護後回來告訴我, 他的運氣很好, 每次檢查都會出問題, 這次發現Mirror set 中有一顆硬碟故障, 但是他隔天有事, 所以就老身出馬啦 !
先看 metastat , 可看到有一些 submirror (紅色字體部份)錯誤,
# metastat
d17: Mirror Submirror 0: d5
State: Needs maintenance Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 56425059 blocks (26 GB)
d5: Submirror of d17
State: Needs maintenance
Invoke: metareplace d17 c1t0d0s7 <new device> Size: 56425059 blocks (26 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s7 0 No Maintenance Yes
d11: Submirror of d17
State: Okay
Size: 56425059 blocks (26 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s7 0 No Okay Yes
d16: Mirror
Submirror 0: d4
State: Needs maintenance Submirror 1: d10
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks (1.0 GB)
d4: Submirror of d16
State: Needs maintenance
Invoke: metareplace d16 c1t0d0s5 <new device> Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s5 0 No Maintenance Yes
d10: Submirror of d16
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s5 0 No Okay Yes
d15: Mirror
Submirror 0: d3
State: Needs maintenance Submirror 1: d9
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks (1.0 GB)
d3: Submirror of d15
State: Needs maintenance
Invoke: metareplace d15 c1t0d0s4 <new device> Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s4 0 No Maintenance Yes
d9: Submirror of d15
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s4 0 No Okay Yes
d14: Mirror
Submirror 0: d2
State: Needs maintenance Submirror 1: d8
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks (2.0 GB)
d2: Submirror of d14
State: Needs maintenance
Invoke: metareplace d14 c1t0d0s3 <new device> Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s3 0 No Maintenance Yes
d8: Submirror of d14
State: Okay
Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s3 0 No Okay Yes
d13: Mirror
Submirror 0: d1
State: Needs maintenance Submirror 1: d7
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks (2.0 GB)
d1: Submirror of d13
State: Needs maintenance
Invoke: metareplace d13 c1t0d0s1 <new device> Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s1 0 No Maintenance Yes
d7: Submirror of d13
State: Okay
Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s1 0 No Okay Yes
d12: Mirror
Submirror 0: d0
State: Needs maintenance Submirror 1: d6
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks (1.0 GB)
d0: Submirror of d12
State: Needs maintenance
Invoke: metareplace d12 c1t0d0s0 <new device> Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s0 0 No Maintenance Yes
d6: Submirror of d12
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t1d0 Yes id1,sd@SFUJITSU_MAP3367N_SUN36G_00N05KAV____
c1t0d0 Yes id1,sd@SFUJITSU_MAP3367N_SUN36G_00N05K76____
先查看 format/disk/defect/grown 中的壞軌, 發現都沒異常, 所以就不換硬碟了
defect> grown
Extracting grown defects list...Extraction complete.
Defect List has a total of 0 defects.
直接使用 sun 提示的指令(藍色字體部份)修復, 但是要加 -e 參數 (什麼, 你不知道為什麼要加 -e, .......... 自已去 man 一下吧 !)
直接修復吧 ! 我習慣一次做一個 slice, 完全 resync 完畢後再做第二個, 以多工處理這種 I/O intensive 的工作沒啥意義.
# metareplace -e d16 c1t0d0s5
# metareplace -e d15 c1t0d0s4
# metareplace -e d14 c1t0d0s3
# metareplace -e d13 c1t0d0s1
# metareplace -e d12 c1t0d0s0
# metareplace -e d17 c1t0d0s7
什麼, 你又問 d17 為什麼要放在最後 ? 嘿,嘿, 這就是小技巧了, 有沒有看到那個slice的size最大, 先把小的 slice 同步完畢後, 把最後一個大的放下去跑, 就可以閃人了, 我粗估那個要跑 1~2 個小時.
先看 metastat , 可看到有一些 submirror (紅色字體部份)錯誤,
# metastat
d17: Mirror Submirror 0: d5
State: Needs maintenance Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 56425059 blocks (26 GB)
d5: Submirror of d17
State: Needs maintenance
Invoke: metareplace d17 c1t0d0s7 <new device> Size: 56425059 blocks (26 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s7 0 No Maintenance Yes
d11: Submirror of d17
State: Okay
Size: 56425059 blocks (26 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s7 0 No Okay Yes
d16: Mirror
Submirror 0: d4
State: Needs maintenance Submirror 1: d10
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks (1.0 GB)
d4: Submirror of d16
State: Needs maintenance
Invoke: metareplace d16 c1t0d0s5 <new device> Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s5 0 No Maintenance Yes
d10: Submirror of d16
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s5 0 No Okay Yes
d15: Mirror
Submirror 0: d3
State: Needs maintenance Submirror 1: d9
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks (1.0 GB)
d3: Submirror of d15
State: Needs maintenance
Invoke: metareplace d15 c1t0d0s4 <new device> Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s4 0 No Maintenance Yes
d9: Submirror of d15
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s4 0 No Okay Yes
d14: Mirror
Submirror 0: d2
State: Needs maintenance Submirror 1: d8
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks (2.0 GB)
d2: Submirror of d14
State: Needs maintenance
Invoke: metareplace d14 c1t0d0s3 <new device> Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s3 0 No Maintenance Yes
d8: Submirror of d14
State: Okay
Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s3 0 No Okay Yes
d13: Mirror
Submirror 0: d1
State: Needs maintenance Submirror 1: d7
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194828 blocks (2.0 GB)
d1: Submirror of d13
State: Needs maintenance
Invoke: metareplace d13 c1t0d0s1 <new device> Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s1 0 No Maintenance Yes
d7: Submirror of d13
State: Okay
Size: 4194828 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s1 0 No Okay Yes
d12: Mirror
Submirror 0: d0
State: Needs maintenance Submirror 1: d6
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2097414 blocks (1.0 GB)
d0: Submirror of d12
State: Needs maintenance
Invoke: metareplace d12 c1t0d0s0 <new device> Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s0 0 No Maintenance Yes
d6: Submirror of d12
State: Okay
Size: 2097414 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t1d0 Yes id1,sd@SFUJITSU_MAP3367N_SUN36G_00N05KAV____
c1t0d0 Yes id1,sd@SFUJITSU_MAP3367N_SUN36G_00N05K76____
先查看 format/disk/defect/grown 中的壞軌, 發現都沒異常, 所以就不換硬碟了
defect> grown
Extracting grown defects list...Extraction complete.
Defect List has a total of 0 defects.
直接使用 sun 提示的指令(藍色字體部份)修復, 但是要加 -e 參數 (什麼, 你不知道為什麼要加 -e, .......... 自已去 man 一下吧 !)
直接修復吧 ! 我習慣一次做一個 slice, 完全 resync 完畢後再做第二個, 以多工處理這種 I/O intensive 的工作沒啥意義.
# metareplace -e d16 c1t0d0s5
# metareplace -e d15 c1t0d0s4
# metareplace -e d14 c1t0d0s3
# metareplace -e d13 c1t0d0s1
# metareplace -e d12 c1t0d0s0
# metareplace -e d17 c1t0d0s7
什麼, 你又問 d17 為什麼要放在最後 ? 嘿,嘿, 這就是小技巧了, 有沒有看到那個slice的size最大, 先把小的 slice 同步完畢後, 把最後一個大的放下去跑, 就可以閃人了, 我粗估那個要跑 1~2 個小時.
留言
張貼留言