III. RESULTADOS:
3.1. Resultados en tablas y figuras
Note: Theasterisk(*)inIBMtape*representsanumberassignedtoa particular device,suchasIBMtape0.
For tapedrives withattachedmedium changerdevices,theIBMchanger*specialfile provides aseparate pathforissuingcommandstothemediumchanger.Whenthis special fileisopened,theapplication canview themediumchangerasa separate device.Boththetapeand changerspecial filecanbeopenedat thesame time.
Table13.SpecialFilesforIBMUltriumTapeDevices
SpecialFileName RewindonClose
/dev/IBMtape* Yes
/dev/IBMtape*n No
Special Files for the Medium Changer Device
Afterthedriverisinstalledanda mediumchangerdeviceisconfiguredandmade available foruse,accesstotheroboticdeviceisprovidedthrough theIBMchanger special fileinthe/dev directory.Theasterisk(*)representsanumberassignedtoa particulardevice,suchasIBMchanger0.ThetermIBMchangerisusedfora SCSI medium changerdevice.TheIBMchanger*specialfileprovidesa pathforissuing commandstocontrolthemediumchangerroboticdevice.
ThefiledescriptorthatresultsfromopeningtheIBMchangerspecialfiledoesnot support thefollowingoperations:
v Read v Write
v OpeninAppendmode
v Commandsdesignedforatapedevice
©CopyrightIBMCorp. 2000,2003 135
Chapter 28. Alternate Pathing Support for Library Control Path Failover
Note: Thelibrarycontrolpathfailoverfeaturecodemust beinstalledpriorto enablingthealternatepathingsupport intheLinuxIBMtapedevicedriver.
Referto“LibraryControlPathFailoverSupport”onpage12forwhich featurecodeisrequiredforyourmachinetype.
TheLinuxIBMtapedevicedriveralternatepathing supportwillconfiguremultiple physical controlpaths tothesame logicallibrarywithinthedevicedriverand provideautomaticfailovertoan alternatecontrolpathwhena permanenterror occursononepath.Thisistransparenttotherunningapplication.
For example,considera simplemultipathconnectionthatconsistsoftwoHostBus Adapters(HBA)whichareconnected toalibrarywithtwodrivecontrolports enabled.Thefirst HBAisconnectedtothefirst controlportdrive,andthesecond HBAisconnectedtothesecondcontrolportdrive.Thisconnectionprovidestwo physical controlpaths tothesame libraryforredundancyif onepathfromanHBA tothelibraryfails.
Whenthehostbusadapterdevicedrivers areloadedinto therunningsystem,each HBAdetectsa controlporttothesamelibrary,andtwologicaldevicescanbe created (forexample,/dev/IBMchanger0and/dev/IBMchanger1)bythe IBMtapeddaemonortheIBMtapeconfigscript.Eachlogicaldeviceisa physical pathto thesamelibrary.Anapplicationcanopenand useonlyonelogicaldevice at atime, eitherIBMchanger0orIBMchanger1,becausetheyrepresentthesame physical device.WithouttheIBMtapealternatepathing support,ifanapplication opens IBMchanger0andapermanent patherroroccurs(becauseofan HBA,cable, ordrive controlportfailure,forexample),theapplication fails.Itispossibleto initiate manualfailoverbyrestartingtheapplicationonthealternatelogicaldevice (IBMchanger1), butfailingtransactionhastoberestartedfromthebeginning.
Whenthealternatepathingsupportisenabled,thedevicedriverconfiguresthem internally asa singledevicewith multiplepaths.Theapplicationcanstill openand useonlyone logicaldeviceata time(eitherIBMchanger0or IBMchanger1).Ifan application opensIBMchanger0anda permanentpatherroroccurs,thedevice driverinitiatesfailovererrorrecoveryautomaticallyonthealternatepath
(IBMchanger1). Ifsuccessful,thecurrentoperationcontinuesonthealternatepath withoutinterruptingtheapplication.
Configuring and Unconfiguring Alternate Pathing Support
Alternate pathingsupportisnotenabledautomaticallywhenthedevicedriveris installed.TheLinuxIBMtapedevicedriverprovidesadriverparameter
alternate_pathing foryoutoenablethelibrarycontrolpathfailover.
Toenable thefailoversupportin theIBMtapedevicedriversoftware,youneed do thefollowingstepsafterinstallingtheIBMtaperpmpackage:
>IBMtaped stop (stop the IBMtaped daemon)
>rmmod IBMtape (unload the IBMtape driver from the memory) addthefollowinglineinyour /etc/modules.conffile:
©CopyrightIBMCorp. 2000,2003 137
|
options IBMtape alternate_pathing=1
>depmod
>modprobe IBMtape (re-load the IBMtape driver into memory)
>IBMtaped (re-start IBMtaped daemon)
Youmayignore the″Unresolvedsymbolsin/lib/modules/<yourkernel
name>/drivers/scsi/IBMtape.o″messageafter the″depmod″ command.Youcan check iftheIBMtapedriverhasrecognizedmultiplecontrolpathsforyour library byreadingthe/proc/scsi/IBMchangerfile.
>cat/proc/scsi/IBMchanger
Ifyour librarylists ″Primary″or″Alternate″under″FOPath″,youhave successfullyenabledcontrolpathfailoverfeatureforyour library.Ifit is″NA″
listed under″FOPath″,thenthecontrolpathfailoverisnotenabled.
Afterthealternatepathingsupport isenabled,itremainsset untiltheIBMtape driverisreloadedwith thealternate_pathingdriverparametersettoOFF .The alternatepathing settingisretainedevenif thesystem isrebooted. Ifyouwantto turnoffthecontrolpathfailoverfeatureintheIBMtapedevicedriver,youmaydo thefollowingsteps:
>IBMtaped stop
>rmmod IBMtape
Delete thefollowinglineinyour/etc/modules.conffile:
options IBMtape alternate_pathing=1
>depmod
>modprobe IBMtape
>IBMtaped
Primary and Alternate Paths
WhenIBMtapeisloadedintokernelmemory,thefirstlogicalmediumchanger devicethatIBMtapeseesinthesystemwillbetheprimarypathforthatmedium changer.TheotherlogicalmediumchangersthatIBMtapeattachedforthesame medium changerwillbeconfigured asalternatepaths. Thedevicedriversupports upto 16physical pathsfora singledevice.
The primaryandalternatepathinformationcanbeobtainedbythefollowing command:
>cat /proc/scsi/IBMchanger
The followingisanexampleofa /proc/scsi/IBMchangerfile:
IBMtape version: 1.4.1 IBMtape major number: 253 Attached Changer Devices:
Number Model SN HBA FO Path
0 ULT3583-TL IBM1234567 QLogic Fibre Channel 2200 Primary 1 ULT3583-TL IBM1234567 QLogic Fibre Channel 2300 Alternate 2 ULT3583-TL IBM1234567 QLogic Fibre Channel 2300 Alternate The labelingofalogicaldeviceaseitheraprimaryoralternatepath isfor informationonly,inorderto:
1. Beable toidentifytheactualnumber ofphysicaldevicesconfiguredonthe systemand aspecific logicaldeviceassociatedwith them.Therewillbeonly onelogicaldevicelabeledtheprimary pathforeachphysicaldevice.However, theremaybemultiplelogicaldeviceslabeledasanalternatepathfor thesame devices.
2. Provideinformationaboutwhichlogicaldevices configuredonthesystem have alternatepathing supportenabled.
Querying Primary and Alternate Path Configuration
Youcandisplaytheprimaryandalternatepathconfigurationforalldevices by readingthe/proc/scsi/IBMchangerfile,asexplainedintheabovesection.
Youcanalsodisplaytheprimaryand alternatepathconfigurationforanydevice byrunningthefollowingcommand:
>IBMtapeutil -f /dev/IBMchangerx path
(IBMchangerx is the logical name of any device)
Thiscommandshowsspecificinformationfortheprimarypathandall alternate paths, suchasthelogicalnameofthedevice,theattached hostbusadapter,the channelid,thetarget id,thelogicalunitnumberunderthetarget,thecurrent enabled status,and howmanypathsareconfigured forthedevice.