AIX根盘镜像更换hdisk0New.docx
《AIX根盘镜像更换hdisk0New.docx》由会员分享,可在线阅读,更多相关《AIX根盘镜像更换hdisk0New.docx(12页珍藏版)》请在冰豆网上搜索。
![AIX根盘镜像更换hdisk0New.docx](https://file1.bdocx.com/fileroot1/2023-4/17/7a6f8ad6-74da-4cf9-811a-459b1c573209/7a6f8ad6-74da-4cf9-811a-459b1c5732091.gif)
AIX根盘镜像更换hdisk0New
AIX根盘镜像更换hdisk0_New
AIX根盘镜像更换hdisk0
操作步骤
1.更换前作系统备份;选择磁带备份操作系统
Smitmksysb
2.注意查看双机状态,看应用是否跑在备机上(注意:
一定确认双机的状态)
/usr/es/sbin/cluster/ut*/cldump
3.查看报错,确认故障盘
errpt
4.查看卷组状态
test14[/]#lsvg-lrootvg
rootvg:
LVNAMETYPELPsPPsPVsLVSTATEMOUNTPOINT
hd5boot122closed/syncdN/A
hd6paging6122open/syncdN/A
hd8jfs2log122open/syncdN/A
hd4jfs230602open/syncd/
hd2jfs210202open/syncd/usr
hd9varjfs210202open/syncd/var
hd3jfs210202open/syncd/tmp
hd1jfs2482open/syncd/home
hd10optjfs210202open/syncd/opt
lg_dumplvsysdump661closed/syncdN/A
pagelv00paging6122open/syncdN/A
datelvjfs230602open/syncd/datebeifen
看lv是否都处于syncd同步状态
5.查看pv状态;
test14[/]#lsvg
rootvg
altinst_rootvg
convg
test14[/]#lsvg-o
convg
rootvg
test14[/]#lspv
hdisk000c74bc679929a4crootvgactive
hdisk100c74bc679bcaa9faltinst_rootvg
hdisk200c74bc689eefd8cconvgactive
hdisk3noneNone
hdisk4noneNone
hdisk500c74bc6d089a7f2rootvgactive
hdisk6noneNone
hdisk8noneNone
hdisk9noneNone
hdisk10noneNone
hdisk11noneNone
hdisk7noneNone
6.确认好了故障盘,将故障盘在rootvg里踢出来,本次有故障的是hdisk0.
注意这一步:
AIX如果pagingswap和dumpdevice不同,系统不会mirrordumpdevice,下面是系统正常情况下的dumpdevice的信息:
#lsvg-lrootvg
rootvg:
LVNAMETYPELPsPPsPVsLVSTATEMOUNTPOINT
hd5boot122closed/syncdN/A
hd6paging2444882open/syncdN/A
hd8jfs2log122open/syncdN/A
hd4jfs28162open/syncd/
hd2jfs240802open/syncd/usr
hd9varjfs240802open/syncd/var
hd3jfs216322open/syncd/tmp
hd1jfs240802open/syncd/home
hd10optjfs2801602open/syncd/opt
lg_dumplvsysdump16161open/syncdN/A
查看dump设备
#sysdumpdev–l查看dump设备
primary/dev/lg_dumplv
secondary/dev/sysdumpnull
copydirectory/var/adm/ras
forcedcopyflagTRUE
alwaysallowdumpFALSE
dumpcompressionON
查看dump在哪块盘上
#lslv-llg_dumplv
lg_dumplv:
N/A
PVCOPIESINBANDDISTRIBUTION
hdisk0016:
000:
0000%000:
000:
000:
000:
016
目前dumpdevice只有一个,在hdisk0上,如果hdisk0出现故障,系统可以从hdisk1启动,系统运行也不会有问题,只是没有dumpdevice,所以如果需要更换hdisk0,需要特别注意一些别的问题,具体步骤:
1)拆除hdisk0上的镜像:
unmirrorvgrootvghdisk0
2)查看unmirror后vg的状态
#lsvg-lrootvg
rootvg:
LVNAMETYPELPsPPsPVsLVSTATEMOUNTPOINT
hd5boot111closed/syncdN/A
hd6paging2442441open/syncdN/A
hd8jfs2log111open/syncdN/A
hd4jfs2881open/syncd/
hd2jfs240401open/syncd/usr
hd9varjfs240401open/syncd/var
hd3jfs216161open/syncd/tmp
hd1jfs240401open/syncd/home
hd10optjfs280801open/syncd/opt
lg_dumplvsysdump16161closed/syncdN/A
3)将hdisk0在rootvg里reduce出来
reducevgrootvghdisk0
将会报错:
rmlv:
Warning,alldatabelongingtologicalvolumelg_dumplvonphysicalvolumehdisk0willbedestroyed.
rmlv:
Doyouwishtocontinue?
y(es)n(o)?
0516-016ldeletepv:
Cannotdeletephy
sicalvolumewithallocatedpartitions.Useeithermigratepvtomovethepartitionsorreducevgwiththe-doptiontodeletethepartitions.
0516-884reducevg:
Unabletoremovephysicalvolumehdisk0.
遇到这种情况,我们首先应该修改dump主设备:
sysdumpdev-P-p/dev/sysdumpnull
primary/dev/sysdumpnull
secondary/dev/sysdumpnull
copydirectory/var/adm/ras
forcedcopyflagTRUE
alwaysallowdumpFALSE
dumpcompressionON
然后再将hdisk0在rootvg中reduce出来
smittyreducevg
0516-914rmlv:
Warning,alldatabelongingtologicalvolume
lg_dumplvonphysicalvolumehdisk0willbedestroyed.
rmlv:
Doyouwishtocontinue?
y(es)n(o)?
y-------------------缺省删除lg_dumplv
rmlv:
Logicalvolumelg_dumplvisremoved.
查看dumpdevice的状态
#lsvg-lrootvg
rootvg:
LVNAMETYPELPsPPsPVsLVSTATEMOUNTPOINT
hd5boot111closed/syncdN/A
hd6paging2442441open/syncdN/A
hd8jfs2log111open/syncdN/A
hd4jfs2881open/syncd/
hd2jfs240401open/syncd/usr
hd9varjfs240401open/syncd/var
hd3jfs216161open/syncd/tmp
hd1jfs240401open/syncd/home
hd10optjfs280801open/syncd/opt
7.将hdisk0在rootvg中删除后就可以更换硬盘了:
test14[/]#diag
敲下回车后,故障硬盘的红灯开始闪烁,这也是确定硬盘位置的方法,以免拔错盘。
将hdisk0拔下插入新的硬盘,回车,新的硬盘就可以认到了,不需要执行cfgmgr即可。
接下来重新给rootvg做镜像。
1)查看认到的新的硬盘:
lspv
2)将新盘加到rootvg
#extendvg-frootvghdisk0
3)查看hdisk0是否添加到rootvg中
test14[/]#lsvg-prootvg
rootvg:
PV_NAMEPVSTATETOTALPPsFREEPPsFREEDISTRIBUTION
hdisk5active558440111..70..36..111..112
hdisk0active558434111..64..36..111..112
4)镜像根盘:
mirrorvg–c2rootvghdisk0
查看镜像:
test14[/]#lsvg-lrootvg
rootvg:
LVNAMETYPELPsPPsPVsLVSTATEMOUNTPOINT
hd5boot122closed/syncdN/A
hd6paging6122open/syncdN/A
hd8jfs2log122open/syncdN/A
hd4jfs230602open/syncd/
hd2jfs210202open/syncd/usr
hd9varjfs210202open/syncd/var
hd3jfs210202open/syncd/tmp
hd1jfs2482open/syncd/home
hd10optjfs210202open/syncd/opt
lg_dumplvsysdump661closed/syncdN/A
pagelv00paging6122open/syncdN/A
5)镜像成功,添加启动快到hdisk0
#bosboot-ad/dev/hdisk0
6)设置启动顺序
#bootlist-mnormalhdisk0hdisk1cd0
7)查看启动顺序:
#bootlist-o-mnormal
hdisk0blv=hd5
hdisk1blv=hd5
cd0
8)重新创建dumplv(操作前先记录下原dump的大小)
#smitlv
9)修改主用dumpdevice
#sysdumpdev-Pp/dev/lg_dumplv
primary/dev/lg_dumplv
secondary/dev/sysdumpnull
copydirectory/var/adm/ras
forcedcopyflagTRUE
alwaysallowdumpFALSE
dumpcompressionON
lsvg-lrootvg
rootvg:
LVNAMETYPELPsPPsPVsLVSTATEMOUNTPOINT
hd5boot122closed/syncdN/A
hd6paging2444882open/syncdN/A
hd8jfs2log122open/syncdN/A
hd4jfs28162open/syncd/
hd2jfs240802open/stale/usr
hd9varjfs240802open/stale/var
hd3jfs216322open/stale/tmp
hd1jfs240802open/stale/home
hd10optjfs2801602open/stale/opt
lg_dumplvsysdump16161open/syncdN/A