610 likes | 899 Views
Tivoli Storage Manager Library Sharing IBM Advanced Technical Support Dave Daun djdaun@us.ibm.com. Agenda. Library Sharing Overview Library Sharing Definintions Managing Tape Cartridges Library Sharing with ACSLS Devices Problem Determination. ** TSM Library Sharing **.
E N D
Tivoli Storage ManagerLibrary SharingIBM Advanced Technical SupportDave Daundjdaun@us.ibm.com
Agenda • Library Sharing Overview • Library Sharing Definintions • Managing Tape Cartridges • Library Sharing with ACSLS Devices • Problem Determination
Sharing a 3494 Library • Logical Partitioning • Use SCRATCHCATEGORY and PRIVATECATEGORY options on the DEFINE LIBRARY command • Drives can be static (not shared) or • Drives can be shared via a contention algorithm • 3494SHARED – enables sharing of 3494 library with other (possibly non-TSM) applications – not used for Library Sharing • DRIVEACQUIRERETRY – sets the number of retries for acquisition of a drive in a 3494 library that is shared using the 3494SHARED option • RESOURCETIMEOUT – set the wait time for acquisition of a drive before canceling the pending request • Library Sharing
Migrating a Shared 3494 Library to Lib. Mgr. Control • Save the Volume History Files and capture Q LIBVOL for all servers • Check out all volumes in the library inventory for the soon-to-be Library Client servers – Use CHECKOUT LIBVOL … REMOVE=NO • Set up the Library Sharing environment • Library Manager -- UPDATE LIBRARY … SHARED=YES • Library Clients – define new shared libraries • At Library Manager, check in all private volumes for each Library Client • Use STATUS=PRIVATE and OWNER=name • Use the Volume History files or Q LIBVOL as a guide • At Library Manager, check in all remaining volumes as Scratch • At Library Clients, delete the old libraries • At Library Clients, issue UPDATE DEVCLASS … LIBRARY=new_libr_name
Library Sharing Overview Library Mgr Library Clients Library Clients Library Mgr Clients Clients
Typical Library Sharing Configurations • Library Manager as Tape Controller • No client nodes defined to Library Manager • All client nodes defined only to Library Clients • Library Manager dedicated only to processing tape requests • Library Manager as Tape/Client Controller • Both Library Manager and Library Clients have client nodes defined • Higher utilization of resources • Library Manager can be a single point of failure
Non-Shared Configuration Overview TSM SERVER Storage Pools Paths Drives Device Class Library
Non-Shared Configuration • define library ltolib libtype=scsi autolabel=yes • define path server1 ltolib srctype=server desttype=library device=/dev/smc3 • define drive ltolib drive01 • define drive ltolib drive02 • define path server1 drive01 srctype=server desttype=drive library=ltolib device=/dev/rmt4 • define path server1 drive02 srctype=server desttype=drive library=ltolib device=/dev/rmt5 • define devclass lto_class library=ltolib devtype=lto format=drive • define stgpool lto_pool lto_class maxscratch=20
Configuration Options • DEFINE LIBRARY • RESETDRIVES=YES – server performs a SCSI target ID reset when the server restarts or a library client reconnects or a storage agent reconnects • AUTOLABEL=YES – server automatically labels, at mount time, any tape cartridges that it finds unlabeled • SERIAL=AUTODETECT | <serial_number> - server can autodetect the library serial number or it can be provided • DEFINE DRIVE • SERIAL=AUTODETECT | <serial_number> - server can auto-detect the drive serial number or it can be provided • ELEMENT=AUTODETECT | <element_number> - server can auto-detect the drive element number or it can be provided • CLEANFREQUENCY=NONE | ASNEEDED | <gigabytes> - enables TSM server drive cleaning. Cleaning tape must be checked in to TSM with CHECKIN LIBVOL
Shared Configuration Overview TSM LIB CLIENT SERVER TSM LIB MGR SERVER Server to Server Storage Pools Storage Pools Paths Device Class Device Class Drives Library
Configuring a Shared Library • Set up Server to Server communications
Shared Configuration – Library Manager • define library sanlib libtype=scsi autolabel=yes shared=yes • define path astro sanlib srctype=server desttype=library device=/dev/smc3 • define drive sanlib drive01 • define drive sanlib drive02 • define path astro drive01 srctype=server desttype=drive library=sanlib device=/dev/rmt4 • define path astro drive02 srctype=server desttype=drive library=sanlib device=/dev/rmt5 • define devclass autolto_class library=sanlib devtype=lto format=drive • define stgpool autolto_pool autolto_class maxscratch=20
Shared Configuration – Library Clients • define server astro serverpassword=secret hladdress=9.115.3.45 lladdress=1580 crossdefine=yes • define library sanlib libtype=shared primarylibmanager=astro • (From Lib Mgr) define path judy drive01 srctype=server desttype=drive library=sanlib device=/dev/rmt6 • (From Lib Mgr) define path judy drive02 srctype=server desttype=drive library=sanlib device=/dev/rmt7 • define devclass lto_class library=sanlib devtype=lto format=drive • define stgpool lto_pool lto_class maxscratch=20
Shared Configuration Considerations • DEFINE PATH must be done from the Library Manager but defines the path between the Library Client and the drives • The device name must be as the Library Client sees the devices • The devices must be correctly matched between the Library Manager and the Library Client • Sharing a 3494 Library • Library Manager/Library Client Configuration (preferred) • Dynamic Drive Sharing using the 3494SHARED server option and logical partitioning with Category Codes • All TSM servers see all drives • Static Drive Sharing using logical partitioning with Category Codes • DEFINE LIBRARY LIBTYPE=349X … SCRATCHCATAGORY=301 PRIVATECATAGORY=300
Configuring a LAN-Free Client • Establishing Communications
Configuring a LAN-Free Client • Create the Path Definitions
LAN-Free Client Configuration Considerations • DEFINE PATH must be done from the TSM Server but defines the path between the Storage Agent and the drives • The device name must be as the Storage Agent sees the devices • The devices must be correctly matched between the TSM Server and the Storage Agent • Be sure that a Copy Group is defined within a Management Class that points to a destination with LAN-Free capable storage • The LAN-Free node must be in the appropriate policy domain • The client must assign the correct Management Class either as default or as a result of an Include statement in the client options file • A Storage Agent can be defined to either a Library Manager or a Library Client
Device Class Configuration • Use FORMAT=DRIVE when all devices are of the same type in a library • Use the FORMAT= parameter to turn off drive compression (e.g. FORMAT=ULTRIUM3 for uncompressed LTO3 drives) • Use small values for MOUNTRETENTION – usually 10 minutes is sufficient • Use MOUNTLIMIT=DRIVES • If you use a number larger than the number of physical drives or you define multiple Device Classes where the total number of drives is greater than the number of physical drives, TSM may fail transactions when no drive is available • Do not use DRIVES for External type libraries
Storage Pool Configuration • Use CRCDATA=YES to cause TSM to do a cyclic redundancy check when an AUDIT VOLUME is run • Use RECLAIM values in the 60-90 range • A value of 60 will cause more reclamation activity but will lead to higher overall utilization of tape cartridges (average 30% expired data) • A value of 90 will cause less reclamation activity and will result in lower overall utilization of tape cartridges (average 45% expired data) • Reclamation should be run (and complete) at least one per week • Set REUSEDELAY to equal the number of days of TSM database backups that you keep – avoid AUDIT VOLUME processing • Use client encryption to protect that data on cartridges that go offsite • (look for changes here in future TSM releases)
Using Mixed Media • TSM can support different kinds of media and drives within a single physical library • The library must be able to differentiate between the different types of drives • Each type of media must be defined to a separate TSM library • TSM does not support different generations of the same media in the same library except for LTO • LTO1 can be mixed with LTO2 • LTO2 can be mixed with LTO3 • Create separate Device Classes/Libraries and use MOUNTLIMIT to prevent LTO1 tape from being mounted in LTO2 drive • It’s best to use a single type of media/drive within a single library
Using Mixed Media • For a given Storage Pool, TSM must be able to read and write all cartridges in that pool on all drives available to the pool • TSM can distinguish between generations of LTO cartridges and will never mount an LTO2 tape in an LTO1 drive and will never mount an LTO3 tape in an LTO2 drive • To perform a migration from one media generation to another (within a single storage pool) • Place all the older generation cartridges in READONLY access mode • Install the new drives and insert the newer generation cartridges • Remove the old drives • All new data is written to the new generation cartridges • Migrate data from older to newer cartridges
Tape Failover Background • TSM tape cluster failover support for Windows available since TSM510 • Only support MSCS (Microsoft Cluster Server) • Only for SCSI tape drives and not for Fibre Channel tape drives • Requires a dedicated SCSI HBA for tape devices and not share with disk drives • This support was implemented in the TSM Management Console • Only implemented for the clustered environment where a tape device is reserved by a failed server. The failed over server can issue Bus Reset to clear the reservation ( this also cause all the devices on the SCSI bus to be reset) • TSM tape cluster failover support in TSM520 • AIX HACMP (High Availability Cluster Multi-Processing) support for both SCSI and Fibre tape devices using script • TSM tape failover support in TSM530 • Added the failover support code in the TSM server main code by adding a new keyword RESETDrive for define/update library command • Default to “YES” for SCSI, 3494, ACSLS library if shared=YES • Cause the server to perform the Lun Reset on restart of the server or reconnect of the library client/storage agent as needed • Added support to include fail-over in Library Sharing and LAN-free environment ( in addition to the original cluster failover support) • Tape device reservation made by a failed Storage Agent or Library Client can now can be cleared • Lun Reset was only implemented in TSM530 for AIX
Tape Failover Overview • TSM tape failover support in TSM532 • Added failover support for Fibre Channel direct attached Tape devices on Windows 2003 by using Lun Reset issued from the Library Manager or the failed over Cluster Server to reset the reservation made on the tape device by the failed server. • Added support for VCS (Veritas Cluster Server) on Windows (only a testing effort, no code change required) NOTE: the Library Client, Storage Agent can be on any platform. Library manager has to be on Windows 2003 or AIX
Cluster Failover for Tape in a Library Sharing Env. • LibraryManager Controlled • DEF LIBR RESETDRIVES=YES SHARED=YES • At server initialization, check usage of all drives • Reset Drives as follows:
Library Sharing Operations • Daily cartridge movement • All work funnels through the Library Manager • DRM considerations • MOVE DRMEDIA commands issued from Library Manager and Library Clients • Regardless of number of client nodes on Library Manager • Coordinate Library Clients • PREPARE command issued from Library Manager and from Library Clients • CHECK LIBVOL Command issued only from Library Manager • AUDIT LIBRARY • Keeps ownership in sync
Labeling Volumes • Dsmlabel – TSM utility for labeling tape cartridges • TSM server is not aware of dsmlabel – could cause drive contention and transaction failures • Can use multiple drives (up to eight) within a library • dsmlabel –drive=/dev/rmt0 –drive=/dev/rmt1 –barcode –library=/dev/smc1 –search –keep • LABEL LIBVOL – TSM process which labels tapes and checks them into the library • TSM is aware of this process and the drive it is using • Only uses one drive • Doesn’t wait for a drive – be sure there is a drive available before issuing • Do this on the Library Manager • AUTOLABEL=YES on Library definition – automatically labels any tapes which are found to unlabeled
Library Inventory • Check the TSM library inventory with QUERY LIBVOL • Query libvol ltolib1 format=detailedLibrary Name: LTOLIB1 Volume Name: A89342 Status: Private Owner: LIBCLI01 Last Use: Data Home Element: 1,003 Device Type: LTOCleanings Left: Media Type: • You can make changes with UPDATE LIBVOL • Status and Owner
Library Inventory • Use library tools to check the physical inventory • mtlib for 3494 libraries • Shows the state of the library - mtlib -l /dev/lmcp0 -qLShows states of the drives - mtlib -l /dev/lmcp0 -f /dev/rmt1 -qDShows the volume inventory - mtlib -l /dev/lmcp0 -qI -vShows volumes in certain category - mtlib -qC –s301 –l /dev/lmcp0 • tapeutil on unix systems • Installed as part of the device driver • Can be run as menu driven or command line interface • Exercises the tape library and drive functions – tape movement, mount, dismount, read, write, rewind, etc. • Ntutil on Widows system – similar to tapeutil • ACSLS manager cmd_proc • Produce lists of tapes in library, tapes in categories (for 3494), element numbers, slot locations.
Library Inventory • Ntutil
Checkin and Checkout • CHECKIN LIBVOL • Use SEARCH=YES or SEARCH=BULK to check in large numbers of tapes with a single command – be careful if library is shared with other applications – use VOLRANGE= to identify TSM tapes • Use OWNER= to identify TSM library client owner in shared library configurations – important when returning tapes from the offsite. • Use CHECKLABEL=BARCODE to speed the check in process • Use SWAP=YES for a full library – TSM will choose the least frequently used volume to eject (prefers scratch) • The Library Manager validates the ownership of private cartridges with information that is stored in the Volume History data. • Q VOLHISTORY TYPE=REMOTE
Checkin and Checkout • CHECKOUT LIBVOL • Use REMOVE=BULK for SCSI libraries – TSM will wait for an open slot in the Input/Output port before ejecting tapes (also consider ALMS on 3584 libraries) • Use REMOVE=BULK and TSM will not require reply commands • Use CHECKLABEL=NO to speed processing and avoid drive contention
DRM Considerations • MOVE DRMEDIA commands issued from Library Manager and Library Clients • Regardless of number of client nodes on Library Manager • Coordinate Library Clients • MOVE DRMEDIA will cause volumes to be ejected from the library and checked out when TOSTATE=VAULT • PREPARE command issued from Library Manager and from Library Clients • CHECKIN LIBVOL Command issued only from Library Manager • Be sure that all tapes are properly checked in when returning from the vault • Give tape operations a checklist • Use CMD='CHECKIN LIBVOL 3494LIB &VOL STATUS=SCRATCH’
Shelf Management • MOVE MEDIA • Can be used to manage the movement of volumes from the library to the shelf and back (avoid this if possible) • Use with the QUERY MEDIA command • Assigns state values to cartridges: • MOUNTABLEINLIB – tape has valid data and is in the library • MOUNTABLENOTINLIB – tape may contain valid and is on the shelf • To find the volumes on the shelf and empty • QUERY MEDIA * STGPOOL=TAPEPOOL WHERESTATUS=EMPTY - WHERESTATE=MOUNTABLENOTINLIB • Can also be used to manage Primary Pool volumes to an offsite location • Not as robust as MOVE DRMEDIA • Watch the TSM console for mount messages if you need to do shelf management
Audit Library • Will audit and synchronize the volume inventories – TSM database and physical library • TSM deletes library volume entries for missing tape cartridges • TSM updates the location of tape cartridges that been moved to a different slot location • For 3494 libraries, TSM will update the category codes appropriately • Never adds new volumes to the library – must issue CHECKIN LIBVOL • AUDIT LIBRARY will lock out all other activity from the library • Do not issue when library is busy with other activities • Use CHECKLABEL=BARCODE for faster processing • For Library Client, AUDIT LIBRARY will synchronize with the Library Manager and update ownership if necessary • Do this after check-in of off-site volumes
ACSLS Libraries • Built in TSM support • No additional software required • Direct control though TSM • DEFINE LIBRARY … LIBTYPE=ACSLS • Define drives, check-in scratch volumes • Single scratch pool • External Media Manger • External program manages the cartridges, drives and cartridge movement • Gresham’s Enterprise DistribuTape (EDT) • Uses API interface • DEFINE LIBRARY … LIBTYPE=EXTERNAL • Don’t define drives or check-in scratch volumes • Multiple scratch pools
Configuring an ACSLS Library • Using the ASCLS command interface (cmd_proc): • query acs all - see the acsls servers that are available • query drive all – see the drives that are available • query volumes all – see the volumes that ACSLS has checked into the library • Server options for ACSLS • ACSACCESSID – set the ACS id • ACSLOCKDRIVE – Lock drives so that they cannot be shared by other applications • ACSQUICKINIT – do a full initialization at server startup – could take a while if there are many cartridges • ACSTIMEOUTX – Timeout for ASCLS API’s • For Windows Library Manager you need to use LibAttach
ACSLS as Library Manager • define library sanlib libtype=acsls autolabel=yes acsid=0 shared=yes • define path astro sanlib srctype=server desttype=library device=/dev/smc1 • define drive sanlib drive01 acsdrvid=0.0.2.1 • define drive sanlib drive02 acsdrvid=0.0.2.2 • define path astro drive01 srctype=server desttype=drive library=sanlib device=/dev/rmt4 • define path astro drive02 srctype=server desttype=drive library=sanlib device=/dev/rmt5 • define devclass acsls_class library=sanlib devtype=ecart format=drive • define stgpool acsls_pool acsls_class maxscratch=20
ASCLS as Library Clients • define server astro serverpassword=secret hladdress=9.115.3.45 lladdress=1580 crossdefine=yes • define library sanlib libtype=shared primarylibmanager=astro • (From Lib Mgr) define path judy drive01 srctype=server desttype=drive library=sanlib device=/dev/rmt0 • (From Lib Mgr) define path judy drive02 srctype=server desttype=drive library=sanlib device=/dev/rmt1 • define devclass acsls_class library=sanlib devtype=ecart format=drive • define stgpool acsls_pool acsls_class maxscratch=20
ACSLS Definitions • Checking in cartridges (only on Library Manager) • Insert cartridges in the CAP • Use CHECKIN LIBVOL … SEARCH=YES or • Use LABEL LIBVOL … SEARCH=YES • Define a Device Class (on Library Manager and Library Clients) • DEFINE DEVCLASS … DEVTYPE=ECARTRIGE
Verifying SAN Connectivity • QUERY SAN • Uses the SAN discovery capabilities of the TSM server • Requires the libhbaapi.a module that supports the SNIA common Host Bus Adapter (HBA) API.
Verifying SAN Connectivity • QUERY SAN FORMAT=DETAILED
General Tracing Considerations • Both the TSM Server and Storage Agent can be traced • Try to isolate the problem by limiting the workload during the trace • Tracing can put a significant load on the server or storage agent • Tracing can produce a significant amount of output (potentially > 1 GB) • Limit the number of trace classes used on any given run • Limit the elapsed time of the trace to 15-30 minutes • Windows timer has only 16 millisecond granularity • Use the Server/Storage Agent Instrumentation first • It puts much less load on the Server/Storage Agent