AIX上移除和替换硬盘的标准步骤.docx
《AIX上移除和替换硬盘的标准步骤.docx》由会员分享,可在线阅读,更多相关《AIX上移除和替换硬盘的标准步骤.docx(6页珍藏版)》请在冰豆网上搜索。
![AIX上移除和替换硬盘的标准步骤.docx](https://file1.bdocx.com/fileroot1/2022-12/12/f22fdb3b-393d-4cc6-bac2-1974e0cd878a/f22fdb3b-393d-4cc6-bac2-1974e0cd878a1.gif)
AIX上移除和替换硬盘的标准步骤
Thisdocumentdescribestheprocedurestoremoveandreplaceafixeddiskinavolumegroup.TheseproceduresDONOTapplyinthefollowingenvironments:
1.Thediskisinasharedvolumegroup.ThiswouldapplytoenvironmentsthatuseHACMP,RVSD,oranyothermanagementsoftware.Refertothedocumentationforthatproductforcorrectdiskreplacementprocedures.TheSSAUser'sGuideexplainstheproceduresforchangingdisksinaRAIDorhotswapenvironment.Itisavailablefordownloadat:
48
2.Thediskisinrootvgandthediskcontainsanyoneofthefollowinglogicalvolumes,whicharenotmirrored:
hd2,hd3,hd4,hd6,hd9var,hd8
Inthiscase,youwouldneedtoreplacethediskandrestorefromasystembackupspecifyingthecorrectdiskstorestore.
3.Thesystemisa/usr,dataless,ordisklessclient.
ThisdocumentappliestoAIXVersions4.3.3and5L.
Pleasereadtheentiredocumentbeforeproceedingandensureallrelevantfixesmentionedinthisdocumentorotherwiseareinstalledpriortousingtheseprocedures.
Removingaphysicalvolumefromavolumegroup
Thebasicstepstoreplacingadiskdriveareasfollows:
1.Deallocateallthephysicalpartitionsassociatedwiththephysicalvolumeintheassociatedvolumegroup.
2.Removethephysicalvolumefromthevolumegroup.
3.Removethedefinitionforthediskfromthedeviceconfigurationdatabase.
Thesestepsareoutlinedinmoredetailinsubsequentsections.
Ifthereisjustonediskinthevolumegroup,proceedtothenextsection,"Howtoproceedifthevolumegrouphasjustonedisk."Otherwise,proceedtothesectionentitled"Deallocatingphysicalpartitionsfromthedisk."
Howtoproceedifthevolumegrouphasjustonedisk
Ifthedrivetobereplacedistheonlydriveinthevolumegroup,thenremovethevolumegroupdefinitionwith:
exportvg
Atthispoint,removethediskdefinitionusingthermdevcommand.Detailsareincludedinthesection"Removingthediskdefinitionfromthesystem"inthisdocument.
Checkingtoseewhatquorumissetto
Ifyourvolumegroupismirrored,youcouldhavedisabledquorum.ThepurposeofquorumisexplainedintheIBMRedbook:
LVM:
IntroductionandConcepts.Hereisanexcerpt:
AquorumisavoteofthenumberofVolumeGroupDescriptorAreasandVolumeGroupStatusAreas(VGDA/VGSA)thatareactive.Aquorumensuresdataintegrityintheeventofadiskfailure.EachphysicaldiskinavolumegrouphasatleastoneVGDA/VGSA.Whenavolumegroupiscreatedontoasingledisk,itinitiallyhastwoVGDA/VGSAareasresidingonthedisk.Ifavolumegroupconsistsoftwodisks,onediskstillhastwoVGDA/VGSAareas,buttheotherdiskhasoneVGDA/VGSA.Whenthevolumegroupismadeupofthreeormoredisks,theneachdiskisallocatedoneVGDA/VGSA.
AquorumislostwhenenoughdisksandtheirVGDA/VGSAareasareunreachablesothata51%majorityofVGDA/VGSAareasnolongerexists.Inatwo-diskvolumegroup,ifthediskwithonlyoneVGDA/VGSAislost,aquorumstillexistsbecausetwoofthethreeVGDA/VGSAareasstillarereachable.IfthediskwithtwoVGDA/VGSAareasislost,thisstatementisnolongertrue.Themoredisksthatmakeupavolumegroup,thelowerthechancesofquorumbeinglostwhenonediskfails.
lsvgtestvg-->checktoseeifQuorumissetto1
VOLUMEGROUP:
testvgVGIDENTIFIER:
00097c7f00004c00000000f4a163bc7b
VGSTATE:
activePPSIZE:
16megabyte(s)
VGPERMISSION:
read/writeTOTALPPs:
1084(17344megabytes)
MAXLVs:
256FREEPPs:
998(15968megabytes)
LVs:
12USEDPPs:
86(1376megabytes)
OPENLVs:
9QUORUM:
1
TOTALPVs:
2VGDESCRIPTORS:
3
STALEPVs:
1STALEPPs:
1
ACTIVEPVs:
2AUTOON:
yes
MAXPPsperPV:
2032MAXPVs:
16
Ifreplacingthediskdriveimmediately,thenyoumaynothavetoturnquorumbackon.Themirrorvgcommandautomaticallyturnsquorumoffandtheunmirrorvgcommandautomaticallyturnsquorumon.Ifyouaredealingwithrootvg,theonlywaytohaveachangeinquorumtakeeffect,istoreboot.Ifthisisanon-rootvgvolumegroup,quorumcanbechangedbyvaryingoffthevolumegroupandthenvaryingitbackon.Tochangequorumfromthecommandline,runthefollowing:
chvg-Qnvgname-->turnsquorumoff
chvg-Qyvgname-->turnsquorumon
Inordertovaryoffavolumegroup,unmountallfilesystemsandmakesurealllogicalvolumesareinaclosedstate.Enter:
lsvg-ltestvg
LVNAMETYPELPsPPsPVsLVSTATEMOUNTPOINT
testlvjfs2111closed/sync'd/testfs
loglv00jfs2log111closed/sync'dN/A
Onceallthelogicalvolumesareclosed,runthefollowing:
varyoffvgvgname
varyonvgvgname
Thenewquorumchangewillbeineffect.
Deallocatingphysicalpartitionsfromthedisk
Everyphysicalpartition(PP)onthediskallocatedtoanylogicalvolume(LV),includingfilesystemsorpagingspaces,mustbedeallocated,eitherbymovingthecontentsofthosePPstoanotherdiskorbyremovingthem.
TodeterminewhatlogicalvolumeshavePPsallocatedtothatdisk,run:
lspv-l
Ifthehdisknamenolongerexists,andthediskisidentifiableonlybyits16-digitPVID(youmightseethisfromtheoutputoflsvg-p),substitutethePVIDforthediskname.Forexample:
lspv-l0123456789abcdef
Youmayreceivethefollowingerror:
0516-320:
Physicalvolume00001165a97b10c6isnotassignedto
avolumegroup.
Ifso,runthefollowingcommand:
putlvodm-p`getlvodm-v`
VGnamereferstoyourvolumegroup,PVIDreferstothe16-digitphysicalvolumeidentifier,andthecharactersaroundthegetlvodmcommandaregravemarks,thebackwardsinglequotemark.Thelspv-lcommandshouldnowrunsuccessfully.
Ifanotherdiskinthevolumegrouphasspacetocontainthepartitionsonthisdisk,andthedisktobereplacedhasnotfailed,themigratepvcommandmaybeusedtomovetheusedPPsonthisdisk.Seethemanpageforthemigratepvcommandonthestepstodothis.
Ifthepartitionscannotbemigrated,theymustberemoved.Theoutputofthelspv-l,orlspv-l,commandindicateswhatlogicalvolumeswillbeaffected.RunthefollowingcommandoneachLV:
lslv
TheCOPIESfieldshowsiftheLVismirrored.Ifso,removethefailedcopywith:
rmlvcopy1
hdisk#referstoallthedisksinthecopythatcontainthefaileddisk.Alistofdrivescanbespecifiedwithaspacebetweeneach.Usethelslv-mcommandtoseewhatotherdisksmayneedtobelistedinthermlvcopycommand.IfthediskPVIDwaspreviouslyusedwiththelspvcommand,specifythatPVIDinthelistofdisksgiventothermlvcopycommand.AtAIXVersion4.2.1orhigher,theunmirrorvgcommandmaybeusedinlieuofthermlvcopycommand.Seethemanpagesforrmlvcopyandunmirrorvg,orotherdocumentation,foradditionalinformation.
IftheLVisnotmirrored,theentirelogicalvolumemustberemoved,evenifjustonephysicalpartitionresidesonthedrivetobereplacedandcannotbemigratedtoanotherdisk.IftheunmirroredLVisaJFSfilesystem,unmountthefilesystemandremoveit.Enter:
umount/
rmfs/
Iftheunmirroredlogicalvolumeisapagingspace,seeifitisactive.Enter:
lsps-a
Ifitisactive,setittobeinactiveonthenextreboot.Enter:
chps-an
Afteryoureboot,removeitbyentering:
rmps
Removeanyotherunmirroredlogicalvolumewiththefollowingcommand:
rmlv
NOTE:
IftheLVisservingasadumpdevice,thedumppointermustfirstbereassigned.ThesameistrueiftheLVwasmirroredandthecopyisbeingremoved.Checkthedumppointersbyentering:
sysdumpdev-l
Reassignthedumppointers.Enter:
sysdumpdev-Pp/dev/sysdumpnull (fortheprimarydevice)
sysdumpdev-Ps/dev/sysdumpnull (forthesecondarydevice)
Thepointerscanbereassignedtotheappropriatelogicalvolumeafteritisrecreated.
Deletingthediskfromthevolumegroup
UsingeitherthePVIDorthehdiskname,dependingonwhichwasusedwhenrunninglspv-lintheprecedingdiscussion,runoneofthefollowing:
reducevg-f
reducevg-f
IfyouusedthePVIDvalueandifthereducevgcommandcomplainsthatthePVIDisnotinthedeviceconfigurationdatabase,runthefollowingcommandtoseeifthediskwasindeedsuccessfullyremoved:
lsvg-p
IfthePVIDordiskisnotlistedatthispoint,thenignoretheerrorsfromthereducevgcommand.
Removingthediskdefinitionfromthesystem
Removethehdisk.Enter:
rmdev-dl
IfthediskwasanSSAdisk,deletethepdisk.Enter:
rmdev-dl
IfthediskwasanSSAdisk,determinewhichpdisknumbercorrespondstothehdisk.Theeasiestwaytodothisisbyusingthessaxlatecommands.Enterthefollowing:
ssaxlate-lhdisk#-->showsthepdisk#(s)definition
ssaxlate-lpdisk#-->showsthehdisk#definition
Anotherwaytodothisiswiththefollowingcommands:
lsdev-Ccdisk-Fname''connwhere
lsdev-Ccpdisk-Fname''connwhere
SeewhichSSAdiskserialnumbercoincideswiththehdisktoremove.Ifthehdiskdoesnotappear,oriftheuserhasbeenworkingwithaPVIDvalueuptothispoint,thepdiskwhoseserialnumberdoesnotcoincidewithanyofthehdisksislikelytobethedisktoremove.OtherSSAcommandsmightprovideadditionalinformation.ConsulttheSSAdocumentation.
IfyouhavebeenworkingwithaPVIDvalueratherthanwithanhdiskname,ensurethatthePVIDisremovedfromtheODMwiththefollowingcommand.The32-digitvaluesuppliedconsistsofthePVIDplus16zeros.Forexample:
odmdelete-qvalue=0073659c2c6d26f100000000000