Mapping Scsi Devices Vios IBMSystemsMag - Print
Mapping Scsi Devices Vios IBMSystemsMag - Print
path=/aix/administrator/lpar/vscsi_mapping
closewindow
MappingVirtualSCSIDiskonVIOServers
May2014|byAdrianMahendrata
Irecentlyreceivedarequesttoincreaseafilesystemspace.AfteraquicklookattheAIXLPAR,I
noticedthatIneededtoaddmoreSANdisk(akaLUNs)tomyAIXLPAR.TheLUNsontheAIXLPAR
arevirtualizedthroughtheVIOserversusingvirtualSCSI.Letswalkthroughtheprocessofmappinga
virtualSCSIdisktoanAIXLPARandIllincludesometips.
Step1:RequesttheLUNstobemappedtotheVIOservers
First,weneedtheLUNstobemappedtotheVIOServers.Ifyourelucky,youmaybethestorage
administratorandcanturnthisaroundquickly.Howeverinmycase,Ineededtheassistanceofthe
storageadministratortoprovision,zoneandmaptheLUNstotheVIOservers.
InformationthatastorageadministratormayrequireistheWWN(WorldWideName)oftheFibre
ChanneladapterusedbytheVIOservers.TheWWNisusedtoidentifywhichFibreChanneladapter
thenewLUNwillbemappedto.
Step2:ScanandconfiguretheLUNsontheVIOServers
LoginaspadmintoboththeVIOServeryoushouldntneedtologintotheunrestrictedshelland
scantheLUNsprovisionedbythestorageadministratorusingthecfgdevcommand.
Step3:Identifythenewdisk
Oncethenewdiskshasbeenscannedanddetected,usethelspvcommandwiththefreeflagto
identifythenewdisks.
OnVIOServer1:
$ lspv -free
NAME PVID SIZE(megabytes)
hdisk30 none 256000
hdisk31 none 256000
OnVIOServer2:
$ lspv -free
NAME PVID SIZE(megabytes)
hdisk30 none 256000
hdisk31 none 256000
Asyoucanseefromthecommandoutput,thetwonewdisksonbothVIOserversarehdisk30and
hdisk31.Thedisksare250gigabytesinsizeandtheyhaventbeenassignedwithaPhysicalVolume
Identifier(PVID).
Formoreonthelspvfreecommand,refertomyarticleIdentifyingFreeDiskonVIOServers.
Step4:ConfigurediskattributesontheVIOServers
Diskattributessuchasqueue_depth,reserve_policy,hcheck_intervalandPVIDchangesmayonlybe
madewhenthediskdeviceisnotactive.OnceactivatedandmappedtotheAIXLPAR,diskattribute
changescanonlybemadetothedatabase(ODM).Toapplytheattributestotherunningdevice,a
rebootmaybeberequired.Therefore,itsagoodideatoconfigurethediskattributesbeforemapping
thediskstotheAIXLPAR.
http://www.ibmsystemsmag.com/CMSTemplates/IBMSystemsMag/Print.aspx?path=/aix/administrator/lpar/vscsi_mapping 1/3
3/6/2017 www.ibmsystemsmag.com/CMSTemplates/IBMSystemsMag/Print.aspx?path=/aix/administrator/lpar/vscsi_mapping
OnVIOServer1:
OnVIOServer2:
TIP:IliketosetthePVIDofthenewdisksatthispoint.Thismakesiteasiertoidentifythenewdisks(by
PVID)ontheAIXLPARwhentheyrepresentedlater.Italsomakesiteasiertomapoutthedisk
relationships(byPVID)betweentheVIOserversandtheclientAIXLPARinthefuture.
Step5:Identifythevirtualhostdevice
ThenextstepistoidentifytheLPARIDoftheAIXLPAR.TheLPARIDcanbeobtainedfromtheHMCor
fromtheLPARitselfbyrunningthelparstatcommandwiththeiflag.TheLPARIDistheLPARpartition
number.
OncetheLPARIDisknown32(Dec)inthisexampleyouneedtoconvertthedecimalnumberinto
hexadecimal20(Hex).
Nowwecanidentifythevirtualhostdevicebythehexadecimalnumber.Todothis,usethelsmap
commandasshown:
OnVIOServer1:
OnVIOServer2:
ThecommandoutputsuggeststhatthevirtualhostdeviceoftheAIXLPARonbothVIOserversis
vhost1.
TIP:AlwaystrytokeepthevirtualhostdevicethesamebetweenthetwoVIOservers.Youcanachieve
thisbyaddingorremovingvirtualSCSIslotsinthesameorder.Itmakessystemadministrationalot
simplerwhenthevirtualhostdevicesarethesameonboththeVIOservers.
Step6:MappingthevirtualSCSIdisk
NowwehavealltherequireinformationtostartmappingthevirtualSCSIdiskstotheAIXLPAR.Todo
this,usethemkvdevcommandasshown:
http://www.ibmsystemsmag.com/CMSTemplates/IBMSystemsMag/Print.aspx?path=/aix/administrator/lpar/vscsi_mapping 2/3
3/6/2017 www.ibmsystemsmag.com/CMSTemplates/IBMSystemsMag/Print.aspx?path=/aix/administrator/lpar/vscsi_mapping
OnVIOServer1:
OnVIOServer2:
ThecommandreadsthatImmappingadevicecalledpwraix_01onvirtualadaptervhost1usingthe
harddiskdevicehdisk30.
TIP:IliketousemeaningfulnamesfortheVTDdevicessuchaslparname_d01.Thisletsmeeasily
identifythediskandLPARrelationship,thusmakingdiskandvirtualSCSIadministrationeasier.Also
trytokeeptheVTDnamethesameonbothVIOservers.
Oncethedisksaremapped,checkthevirtualSCSImappingsforthevirtualadaptervhost1byrunning
thefollowingcommandonbothVIOservers:
ThecommandswilldisplayallthevirtualSCSImappinginformationbelongingtovirtualadapter
vhost1.
Step7:Scanandconfigurethenewdisks
Finally,wecannowlogontotheAIXLPARandscanthenewdisk.Wecanalsoquicklyidentifynewtwo
newdisksbylookingatthePVIDassignedinStep4.
pwraix:/ # cfgmgr
pwraix:/ # lspv|egrep "00c4973e4734d635|00c4973e47406329"
hdisk2 00c4973e4734d635 None
hdisk3 00c4973e47406329 None
Tip:Remembertoconfigurethediskattributes(pathpriorities,queue_depth,etc.)beforeyouconfigure
oraddthediskstothevolumegroup.Oncedisksareaddedtoavolumegroupandactivated,the
wholevolumegroupwillneedtobebroughtofflinetochangethediskattributes.
Thatsit!TheprocessofmappingvirtualSCSIdiskfromapairofVIOserverstoanAIXLPARisactually
quitesimple!
IBMSy stemsMagazineisatrademarkof InternationalBusinessMachinesCorporation.Theeditorialcontentof IBMSy stemsMagazineis
placedonthiswebsiteby MSPTechMediaunderlicensef romInternationalBusinessMachinesCorporation.
2017MSPCommunications,Inc.Allrightsreserv ed.
http://www.ibmsystemsmag.com/CMSTemplates/IBMSystemsMag/Print.aspx?path=/aix/administrator/lpar/vscsi_mapping 3/3