一台sun v440 机器出现了硬件错误.本地硬盘有4块, 显示如下
槽位 磁盘 状态
---- ------ ---------
0 c1t0d0 硬件错误
1 c1t1d0 正常
2 c1t2d0 正常
3 c1t3d0 正常
原先是c1t0d0和c1t1d0做了硬raid 1.查询raidctl状态发现为degraded.使用format命令
检查c1t0d0出现大量无法修复的IO错误,无法软修复. 以下处理过程主要实现把0槽位硬盘
拿掉, 3槽位硬盘挪到0槽位上, 暂时顶替0槽位工作.1和2槽位硬盘做硬raid.最后处理的结果是0-2槽位都有硬盘,
3槽位空出,待sun服务工程师来更换硬盘.
槽位 磁盘 状态
---- ------ ---------
0 c1t0d0 正常
1 c1t1d0 正常
2 c1t2d0 正常
3 c1t3d0 空置
操作过程如下
1. 需要修改/etc/vfstab,把所有的c1t0d0替换成c1t1d0 (防止重启之后找不到引导盘).
2. 修改dump device 为c1t1d0
dumpadm -d /dev/dsk/c1t1d0
3. 从vxvm删除硬盘c1t0d0
本地硬盘并让vxvm完全控制(本地没有vxvm volume,所有卷都在磁阵上), 只是在vxdisk命令能看到所有的磁盘信息.
vxdisk rm c1t0d0
由于dmp控制,需要从vxvm强制拆除对硬盘的控制
# vxdmpadm getsubpaths ctlr=c1
NAME STATE[A] PATH-TYPE[M] DMPNODENAME ENCLR-TYPE ENCLR-NAME ATTRS
================================================================================
c1t0d0s2 ENABLED(A) - c1t0d0s2 OTHER_DISKS OTHER_DISKS -
c1t1d0s2 ENABLED(A) - c1t1d0s2 OTHER_DISKS OTHER_DISKS -
c1t2d0s2 ENABLED(A) - c1t2d0s2 OTHER_DISKS OTHER_DISKS -
c1t3d0s2 ENABLED(A) - c1t3d0s2 OTHER_DISKS OTHER_DISKS -
要拆除的是第一块硬盘c1t0d0s2.
# vxdmpadm -f disable path=c1t0d0s2 ctlr=c1
再次查询发现state状态更改为disabled了.
# vxdmpadm getsubpaths ctlr=c1
NAME STATE[A] PATH-TYPE[M] DMPNODENAME ENCLR-TYPE ENCLR-NAME ATTRS
================================================================================
c1t0d0s2 DISABLED - c1t0d0s2 OTHER_DISKS OTHER_DISKS -
c1t1d0s2 ENABLED(A) - c1t1d0s2 OTHER_DISKS OTHER_DISKS -
c1t2d0s2 ENABLED(A) - c1t2d0s2 OTHER_DISKS OTHER_DISKS -
c1t3d0s2 ENABLED(A) - c1t3d0s2 OTHER_DISKS OTHER_DISKS -
4. 准备拆除0槽位硬盘
cfgadm -c unconfigure c1::dsk/c1t0d0
这时候硬盘边上亮起了蓝灯,表示可以拔出硬盘.
5. 对c1t3d0同样的操作
vxdmpadm -f disable path=c1t3d0s2 ctlr=c1
cfgadm -c unconfigure c1::dsk/c1t3d0
同样,等蓝灯亮起拔出该盘,插入到0槽位.
6. 恢复系统对0槽位的控制
cfgadm -c configure c1::dsk/c1t0d0
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced - - online
c1t1d0s2 auto:none - - online invalid
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto - - error
c3t8d0s2 auto:sliced - - online
c3t9d0s2 auto:sliced - - online
c3t10d0s2 auto:sliced - - online
c3t11d0s2 auto:sliced - - online
c3t12d0s2 auto:none - - online invalid
c5t8d0s2 auto:sliced - - online
c5t9d0s2 auto:sliced - - online
c5t10d0s2 auto:sliced - - online
c5t11d0s2 auto:sliced - - online
c5t12d0s2 auto:sliced - - online
7. 不要让vxvm管理该硬盘
# vxdisk destroy c1t0d0
8. 修改openboot信息,把c1t1d0,c1t2d0 配置起来.
eeprom "nvramrc=devalias rootdisk
devalias rootmirr "
eeprom "use-nvramrc?=true"
eeprom boot-device="rootdisk rootmirr net"
9. 创建硬raid
raidctl -c c1t1d0 c1t2d0
10. 等同步完成后重启系统,验证结果
阅读(2497) | 评论(0) | 转发(0) |