F85系统镜像盘更换实录之一:删除原有镜像操作
# cfgmgr
# lsdev -Cc disk
hdisk0 Available 11-09-00-8,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 11-09-00-10,0 16 Bit LVD SCSI Disk Drive
# lsvg
rootvg
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 148 70..00..00..00..78
hdisk0 missing 542 148 70..00..00..00..78
# unmirrorvg rootvg hdisk0
0516-1246 rmlvcopy: If hd5 is the boot logical volume, please run ‘chpv -c <diskname>‘
as root user to clear the boot record and avoid a potential boot
off an old boot image that may reside on the disk from which this
logical volume is moved/removed.
0516-1132 unmirrorvg: Quorum requirement turned on, reboot system for this
to take effect for rootvg.
0516-1144 unmirrorvg: rootvg successfully unmirrored, user should perform
bosboot of system to reinitialize boot records. Then, user must modify
bootlist to just include: hdisk1.
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 148 70..00..00..00..78
hdisk0 missing 542 542 109..108..108..108..109
# chpv -c hdisk0
# reducevg rootvg hdisk0
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 148 70..00..00..00..78
# bootlist -m normal hdisk1
F85系统镜像盘更换实录之二:重建镜像
lsdev -Cc disk
hdisk0 Available 11-09-00-8,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 11-09-00-10,0 16 Bit LVD SCSI Disk Drive
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 148 70..00..00..00..78
# chdev -l hdisk0 -a pv=yes
hdisk0 changed
# extendvg rootvg hdisk0
0516-1398 extendvg: The physical volume hdisk0, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-792 extendvg: Unable to extend volume group.
# extendvg -f rootvg hdisk0
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 148 70..00..00..00..78
hdisk0 active 542 542 109..108..108..108..109
关掉rootvg的 QUORUM功能: (是否需要这个步骤)
#chvg -Qn rootvg
# mirrorvg rootvg
0516-1124 mirrorvg: Quorum requirement turned off, reboot system for this
to take effect for rootvg.
0516-1126 mirrorvg: rootvg successfully mirrored, user should perform
bosboot of system to initialize boot records. Then, user must modify
bootlist to include: hdisk0 hdisk1.
# bosboot -a -d /dev/hdisk0
bosboot: Boot image is 20904 512 byte blocks.
# bootlist -m normal hdisk1 hdisk0
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 148 70..00..00..00..78
hdisk0 active 542 148 76..12..00..00..60
# exit
F85系统镜像盘更换实录之三:现场诊断及修复过程
1,登陆到F85主机,仔细查看错误日志,确认系统镜像盘hdisk0的故障:
# errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
2F3E09A4 0801151907 I H hdisk0 REPAIR ACTION
16F35C72 0801083807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0801003807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0731163807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0731083807 P H hdisk0 DISK OPERATION ERROR
B6048838 0731051907 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED
B6048838 0731043107 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED
B6048838 0731041907 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED
16F35C72 0731003807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0730163807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0730083807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0730003807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0729163807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0729083807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0729003807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0728163807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0728083807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0728003807 P H hdisk0 DISK OPERATION ERROR
16F35C72 0727163807 P H hdisk0 DISK OPERATION ERROR
2,打开机器前面板,根据硬盘使用繁忙程度(比较两块硬盘指示灯闪烁情况)初步判断系统镜像盘位于前面板右下侧硬盘笼子中的一号插槽,三号插槽中为hdisk1;
3,为进一步确保判断的准确性,请客户停掉主机上的应用、关闭数据库、关闭系统。待所有操作完成,打开硬盘笼子挡板,手工拔去一号插槽中的硬盘,重新启动到系统,“lsdev –Cc disk”观察hdisk0和hdisk1的状态,hdisk0由上次的“available”变为“defined”,hdisk1没有变化,则说明位于硬盘笼一号插槽中确为hdisk0;
4,根据服务手册,硬盘笼中硬盘可热插拔。在主机运行的情况下将拔出的硬盘插入一号插槽,合上硬盘笼挡板;
5,通过命令“cfgmgr”重新识别到hdisk0,“lsdev –Cc disk”查看hdisk0状态转为“available”,但在“lsvg –p rootvg”中查看物理盘hdisk0的状态为“missing”而非“active”,表示仍然有问题;
6,对hdisk0进行删除镜像操作:
# unmirrorvg rootvg hdisk0(取消hdisk0对rootvg的镜像)
# chpv -c hdisk0(清除引导区)
# reducevg rootvg hdisk0(将hdisk0从卷组中清除)
# bootlist -m normal hdisk1(重设启动顺序)
7,“lsvg –p rootvg”观察,确认hdisk0已经脱离rootvg,打开硬盘笼挡板,拔出一号槽中的hdisk0,并将新带来的36G硬盘插入到一号槽中,合上硬盘笼挡板。“cfgmgr”重新扫描硬件设备,“lsdev –Cc disk”查看新加硬盘在系统中显示为“hdisk0”,且状态为“available”,表示此硬盘可用;
8,对hdisk0进行镜像操作:
# chdev -l hdisk0 -a pv=yes(将新硬盘设为可用)
# extendvg rootvg hdisk0(将hdisk0加入rootvg)
# mirrorvg rootvg(对rootvg进行镜像,约二十分钟后镜像成功)
# bosboot -a -d /dev/hdisk0(在hdisk0上创建启动映象)
# bootlist -m normal hdisk1 hdisk0(重新设置启动顺序)
9,通过命令“lsvg –p rootvg”查看确认hdisk0已经包含在rootvg中并处于“active”状态,且使用pp数相同(一个pp等于64M):
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 542 148 70..00..00..00..78
hdisk0 active 542 148 76..12..00..00..60
###############################################################################
替换rootvg中的磁盘
rootvg 中原来mirror的是 hdisk0 和 hdisk1,由于这两块磁盘是同一个BUS上的,我想换另外一个BUS上的磁盘,用hdisk4替换掉hdisk1
root用户执行:
extend rootvg hdisk4
migratepv -l hd5 hdisk1 hdisk4 # 从hdisk1移到hdisk0
bosboot -ad /dev/hdisk4
chpv -c hdisk1
bootlist -m nornal hdisk0 hdisk4
sysdumpdev -p /dev/sysdumpnull
migratepv hdisk1 hdisk4
sysdumpdev -p /dev/hd6
reducevg rootvg hdisk1
shutdown -Fr