小鹭 发表于 2007-07-24 15:24

Solaris卷状态出现maintenance的处理


Solaris卷状态出现maintenance的处理
昨天登陆到一台SUN blade 2500,看到如下信息
root@WEBServer
# metastat
d20: Mirror
    Submirror 0: d21
      State: Needs maintenance
    Submirror 1: d22
      State: Needs maintenance
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 277764096 blocks
d21: Submirror of d20
    State: Needs maintenance
    Invoke: metareplace d20 c0t0d0s0
    Size: 277764096 blocks
    Stripe 0:
      Device            Start BlockDbase State      Hot Spare
      c0t0d0s0                   0   No    Maintenance
d22: Submirror of d20
    State: Needs maintenance
    Invoke: after replacing "Maintenance" components:
                metareplace d20 c0t1d0s0
    Size: 277764096 blocks
    Stripe 0:
      Device            Start BlockDbase State      Hot Spare
      c0t1d0s0                   0   No    Last Erred   
Sun管理的卷不正常了,原因是两个submirror数据同步出现了问题,需要重做同步。解决方法如下
1. 使用format 工具,检查是否有坏块                                       
该机器配置了2个硬盘作为镜像,两个硬盘都要检测一遍。
format--> 选择 盘1 (c0t0)--> analyze --> read on each disk, read过程很慢,耐心等待
完成后同样步骤换盘2去read。整个过程大约耗费了2小时。

最后系统报告正常,万幸磁盘没有坏
http://www.cublog.cn/images/face/016.gif
,不然老板又要生气了..
analyze> read
Ready to analyze (won't harm SunOS). This takes a long time,
but is interruptable with CTRL-C. Continue? yes
      pass 0
   14086/23/734
      pass 1
   14086/23/734
Total of 0 defective blocks repaired.

2. 同步mirror
执行如下命令同步meta data.

#metareplace -e d20 c0t0d0s0
查看mirror状态,看到同步过程Resyncing。
root@WEBServer
# metastat
d20: Mirror
    Submirror 0: d21
      State: Resyncing   
    Submirror 1: d22
      State: Needs maintenance
    Resync in progress: 0 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 277764096 blocks
d21: Submirror of d20
    State: Resyncing   
    Size: 277764096 blocks
    Stripe 0:
      Device            Start BlockDbase State      Hot Spare
      c0t0d0s0                   0   No    Resyncing   
d22: Submirror of d20
    State: Needs maintenance
    Size: 277764096 blocks
    Stripe 0:
      Device            Start BlockDbase State      Hot Spare
      c0t1d0s0                   0   No    Last Erred   
等d21完成后,再同步d22。时间很长,每步要等4-5小时。。。
#metareplace -e d20 c0t1d0s0   
3. 最后执行metastat查看状态正常
root@WEBServer
# metastat
d20: Mirror
    Submirror 0: d21
      State: Okay         
    Submirror 1: d22
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 277764096 blocks
d21: Submirror of d20
    State: Okay         
    Size: 277764096 blocks
    Stripe 0:
      Device            Start BlockDbase State      Hot Spare
      c0t0d0s0                   0   No    Okay   
      


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/43930/showart_345792.html
页: [1]
查看完整版本: Solaris卷状态出现maintenance的处理