The dynamicload balancingsupportoptimizesresourcesfordevices thathave physical connectionstomultiple HostBusAdapters(HBA)inthesamemachine.
Whenanapplication opensadevicethathasmultipleHBApathsconfigured,the devicedriverdetermineswhichpathhastheHBAwiththelowest usage,and assignsthatpathtotheapplication.Whenanotherapplicationopens adifferent devicewith multipleHBApaths,thedevicedriveragain determinesthepathwith thelowest HBAusageand assignsthatpath tothesecondapplication. Thedevice driverwillupdatetheusage ontheHBAassignedtotheapplication whenthe deviceisclosed.Dynamicloadbalancingwilluseall HostBusAdapterswhenever possibleand balancetheloadbetweenthemtooptimizetheresourcesinthe machine.
For example,considera machinewithtwoHostBusAdapters,HBA1andHBA2, with multipletapedrivesattached.Eachtapedriveisconnected tobothHBA1and HBA2. Initially,thereare notapedrivescurrentlyinuse.Whenthefirstapplication opens atapedriveforuse,thedevicedriverwillassigntheapplicationtouse HBA1. Whena secondapplication opensatapedriveforuse,thedevicedriver willassignthesecondapplication touseHBA2.Athirdapplicationwouldbe assignedtoHBA1anda fourthapplicationwouldbe assignedtoHBA2. There would betwoapplicationsusingHBA1andtwoapplicationsusingHBA2.
Ifthefirst applicationfinishesandclosesthedevice,therewould nowbeone application usingHBA1and twoapplicationsusingHBA2.Whenthenext application opensa tapedrive,itwouldbe assignedtoHBA1,soagainthere would betwoapplicationsusingHBA1andtwoapplicationsusingHBA2.
Likewise, ifthesecondapplicationfinishesandclosesthedevice,HBA2would haveoneapplication usingit andthenextapplication thatopensatapedrive would beassignedtoHBA2.
The dynamicload balancingsupportisindependentfromtheautomaticfailover support. Regardlessof thepathassignedinitiallyforload balancing,ifthatpath failstheautomaticfailoversupportwillattemptrecovery onthenext available path.
Configuring and Unconfiguring Alternate Pathing Support
Alternate pathingsupportisnotenabledautomaticallywhenthedevicedriveris installed.Itmustbe configuredinitiallyoneachlogicaldeviceafterinstallation.
Whenalternatepathingsupport isenabled foralogicaldevice,itremainssetuntil thedeviceisdeletedorthesupportisunconfigured.Thealternatepathing setting isretainedevenif thesystem isrebooted.
Alternate pathingsupportcanbe enabledonallconfigureddevicesat onetime,or it canbeenabledordisabled selectivelybylogicaldevice.Itmaybedesirableat timestoconfiguresome,butnotall,logicalpathstoadevicewith thesupport enabled.
Toenable thesupport globallyonallcurrentlyconfigureddevices,runthe command:
/usr/lpp/Atape/instAtape -a
AIX Device Driver (Atape)
Thiswillunconfigurealldevices thathavealternatepathing settoNo, andwill reconfigurealldevices,settingalternatepathing toYes.
Toenable ordisablethesupport onasinglelogicaldevice,usethesmitmenuto Change/ShowCharacteristicsofaTape Drive,thenselectYes orNoforEnable AlternatePathing Support.Thesupportcanalso beenabledordisabled usingthe chdev command,forexample:
chdev -l rmt0 -aalt_pathing=yes chdev -l rmt0 -aalt_pathing=no
Primary and Alternate Paths
Whenthedevicedriverconfiguresalogicaldevicewithalternatepathing support enabled,thefirst deviceconfiguredalwaysbecomestheprimarypathandPRI is appendedtothelocationfieldofthedevice.Whenasecondlogicaldeviceis configured withalternatepathingsupport enabledforthesamephysicaldevice,it configures asanalternatepathandALTisappendedtothelocationfield.Athird logicaldeviceisconfiguredasthenext alternatepathwithALTappended,and so on.Thedevicedriversupportsupto16physicalpathsfora singledevice.
For example,ifrmt0isconfiguredfirst,thenrmt1,thelsdev-Cctapecommand outputwillbesimilartothefollowing:
rmt0 Available 20-60-01-PRI IBM 3580 Ultrium Tape Drive (FCP) rmt1 Available 30-68-01-ALT IBM 3580 Ultrium Tape Drive (FCP)
Ifrmt1isconfiguredfirst,then rmt0,thecommandoutputwillbe similartothe following:
rmt0 Available 20-60-01-ALT IBM 3580 Ultrium Tape Drive (FCP) rmt1 Available 30-68-01-PRI IBM 3580 Ultrium Tape Drive (FCP)
Thelabelingof alogicaldeviceaseither aprimaryoralternatepathisfor informationonly,inorderto:
1. Beable toidentifytheactualnumber ofphysicaldevicesconfiguredonthe systemand aspecific logicaldeviceassociatedwith them.Therewillbeonly onelogicaldevicelabeledtheprimary pathforeachphysicaldevice.However, theremaybemany(multiple)logicaldeviceslabeledasanalternatepathfor thesamedevices.
2. Provideinformationaboutwhichlogicaldevices configuredonthesystem have alternatepathing supportenabled.
AIX Device Driver (Atape)
Chapter7.AlternatePathingSupportforTapeDrives 31
Querying Primary and Alternate Path Configuration
Youcandisplaytheprimaryandalternatepathconfigurationforalldevices with thelsdevcommand.Theremaybe twoormorelogicaldevicesconfiguredfora single physicaldevice,butthefirst deviceconfiguredislabeledtheprimary device.
All otherlogicaldevices configuredafterthefirstdeviceare labeledasalternate devices.Toseethis,runthelsdev-Cctapecommandandlookatthelocationfield in thedata.Byrunninglsdev-Cctape|grepPRI,forexample,youcaneasily determinehow manyphysicaldevices ontheRS/6000orpSeriesserverare configured withalternatepathing support.Youcandisplaytheprimaryand alternatepath configurationfora singledevicebyrunningthetapeutil-f/dev/rmtx pathcommand(wherermtxisthelogicalnameofanydevice).
Thiscommandshowsspecificinformationfortheprimarypathandall alternate paths, suchasthelogicalnameofthedevice,SCSIIDs,thecurrentenabled status, and howmanypathsare configuredforthedevice.
Configuring and Unconfiguring Primary and Alternate Devices
Logical devicesconfiguredasalternatepaths canbe unconfiguredand
reconfiguredat anytimeaftertheinitial configurationisrun.Unconfiguringan alternatepath deviceremoves thatdevicefromtheprimarydevicepathlist, removes theALT appendedtothelocationfield,andchangesthedevicetothe Defined state.Theprimaryand anyotheralternatedevicesare stillavailable.
Likewise, configuringa newalternatepathdeviceorreconfiguringanexistingone in theDefinedstateaddsthatdevicetotheprimarydevicepathlist,appendsALT tothelocationfield,andmakesthedeviceavailable.
Logical devicesthatareconfigured asprimary pathscanalsobe unconfiguredand reconfiguredat anytimeafterinitial configurationisrun.However, theoperation isdifferentforaprimary device.Whenaprimarydeviceisunconfigured,the followingeventsoccur:
1. All alternatedevicesareunconfiguredasdescribedpreviously.
2. Theprimarydeviceisunconfigured.
3. ThePRIappendedtothelocationfieldisremoved.
4. ThedeviceischangedtotheDefinedstate.
5. All alternatedevicesthatwereunconfiguredarereconfigured.Thefirst device thatisreconfiguredbecomesthenew primarydevice.Allremainingalternate devicesare reconfiguredasalternatepaths.
Thesemethodsprovidetheabilitytounconfigureandreconfigurephysicaldevices onthesystemwhendeviceconnectionsoraddressingchangesaremade.
AIX Device Driver (Atape)
Chapter 8. Using the Dump Support
Dumpsupport isprovidedthrough thedump entrypointinthedriver.Seethe appropriateAIXmanualsfora descriptionof howtousethedump devicesand how toreadthedumpdata.Reviewthesysdumpdevand sysdumpstartcommands.
Tolistthecurrentdumpdevices,enterthefollowingcommand:
sysdumpdev -l
Toestablishthermt1tapedeviceasa secondarydumpdevice,enterthefollowing command:
sysdumpdev -s /dev/rmt1
Toperform adump operation,usethesysdumpstart command.Tosendthedump datatothesecondarydumpdevice,enterthefollowingcommand:
sysdumpstart -s
Note: Thiscommandstopsthesystem.Usethesynccommandtoensurethatthe cacheisflushedbeforeissuing thesysdumpstart-scommand.
Tolistthelastdumpdata,enterthefollowingcommand:
sysdumpdev -z
Afterthedumpdataisplacedonthetape,copy ittoafileonthediskbeforeusing thecrashcommandtoprocessit.Forexample:
dd if=/dev/rmt1 of=tapedump1 ibs=4096 obs=512 crash tapedump1
Note: Theibsvalueistheinputblocksize.
Iftheblocksizeofthetapedeviceislargerthantheblocksize sentduringthe dump process,thedumpoperationfails.Settheblocksize tozeroonthetape deviceand experimentwiththeibsvaluefor theddcommand.
©CopyrightIBMCorp. 2000,2003 33
Chapter 9. Tape Utility Program (tapeutil)
Installed withthedevicedriverisatapeutilityprogram(tapeutil)thatexercisesor teststhefunctionsofthetapedeviceandthedevicedriver.Italso performsbasic tapeandmediumchangeroperations.Thetapeutilityprogramprovidestwo versions (theinteractiveinterfaceandtheAIXcommand-lineinterface withsyntax similartothetctland mtcommands).
TheCsourcecodeforthetapeutil.cprogramcanbefoundinthe
/usr/lpp/Atape/samplesdirectory. Theprogramcontains asampleoftheinterfaceto thedevicedriverandtheinput/outputcontrol(ioctl)commandssupportedbythe devicedriver.