Quantcast

Details on testing TSM with mhvtl emulated TS3500 and LTO5/LTO4

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Details on testing TSM with mhvtl emulated TS3500 and LTO5/LTO4

danlthom
This is a step by step diary of demonstrating a TS3500/TS4500 tape library with LTO5 and LTO4 tape drives in a single logical library with TSM.  The tape media will be LTO5 R/W, LTO4 R/W and LTO5 WORM.

Testing environment:
SLES11 SP3
TSM server running locally: version 7.1.1.300
Local TSM client
mhVTL: Downloaded from github (changelog reports version 1.5.2, but some files are newer than that change record, so assuming this is 1.5.3).
        https://github.com/markh794/mhvtl/archive/master.zip
       
IBM Tape Device driver: Lin_tape lin_tape-3.0.0-1.src.rpm
                IBM FixCentral - http://www-933.ibm.com/support/fixcentral/swg/selectFix?product=ibm%2FStorage_Tape%2FTape+device+drivers&fixids=lin_tape-3.0.0-sles11.x86_64&source=dbluesearch&function=fixId&parent=Tape%20drivers%20and%20software
               

Prerequisites:
The only prerequisites I needed to install was the LZO dev libraries from the SLES SDK ISO for mhVTL and the libstdc++46/43 for the Lin_tape driver.  This does not mean there are not other prereqs, but just that my system already had the others.   This would obviously include make and the standard glibc libraries, since we are compiling the mhVTL and the lin_tape library. Some of the documented pre-reqs for mhVTL are really "nice to haves", like the utility tape mgmt libraries.

Step 1 - Installing mhVTL
ran prep script with the following contents:
        #!/bin/bash
        groupadd -r --system vtl
        useradd -r --system -c "Vitrual Tape Library" -d /opt/mhvtl -g vtl -s /bin/bash vtl
        mkdir -p /opt/mhvtl
        mkdir -p /etc/mhvtl
        chown -Rf vtl:vtl /opt/mhvtl
        chown -Rf vtl:vtl /etc/mhvtl
       
unzip package containing mhVTL source and change to that directory.
        make clean
        cd kernel
        make && make install
        cd ..
        make && make install

Step 2 - Configuring mhvtl
        cd /etc/mhvtl
        service mhvtl stop   ## the service is not yet started, but running stop here creates the config files.
        ls * ## validate some files exist.  If desired, backup files to an orig subdirectory.
        # Copy in device.conf and library_contents.90 from attached zip file.
    service mhvtl start
        lsscsi # in addition to disk, you should now see 1 tape library (changer) and 12 tape drives (6 x LTO5 and 6 x LTO4).
        chkconfig --list mhvtl # should show mhvtl starting in runlevels 2, 3 and 5
       
Step 3 - Configuring lin_tape
        create directory and save lin_tape src rpm.
        within that directory run:  rpmbuild --rebuild lin_tapeXXXX.src.rpm
        You will see output from that command that it created a binary rpm (look for "Wrote" message).
        copy 98-lin_tape.rules (attached) to /etc/udev/rules.d.  If you do not do this, the devices can only be opened by root.
        For the binary RPM, run rpm --install lin_tapeXXX.rpm
        ls -altr /dev/IBM* # you should now see IBM* devices for the changer and drives.  Note the access rights, as they should be set so that the files can be used by the TSM instance owning account, not just root:  crw-rw-rw
       
Step 4 - Defining tape library and paths:
Issue the following TSM commands (if you save to macro, run with -itemcommit):
setopt checktapepos no
define library TS3500 libtype=vtl shared=no resetdrives=no autolabel=yes relabelscratch=yes serial=autodetect
define path tapsrv05 TS3500 srctype=server desttype=library device=/dev/IBMchanger0 autodetect=yes online=yes
define drive TS3500 LTO4-D1
define drive TS3500 LTO4-D2
define drive TS3500 LTO4-D3
define drive TS3500 LTO4-D4
define drive TS3500 LTO4-D5
define drive TS3500 LTO4-D6
define path tapsrv05 LTO4-d1 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape0
define path tapsrv05 LTO4-d2 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape1
define path tapsrv05 LTO4-d3 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape2
define path tapsrv05 LTO4-d4 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape3
define path tapsrv05 LTO4-d5 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape4
define path tapsrv05 LTO4-d6 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape5
define drive TS3500 LTO5-D1
define drive TS3500 LTO5-D2
define drive TS3500 LTO5-D3
define drive TS3500 LTO5-D4
define drive TS3500 LTO5-D5
define drive TS3500 LTO5-D6
define path tapsrv05 LTO5-d1 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape6
define path tapsrv05 LTO5-d2 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape7
define path tapsrv05 LTO5-d3 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape8
define path tapsrv05 LTO5-d4 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape9
define path tapsrv05 LTO5-d5 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape10
define path tapsrv05 LTO5-d6 library=TS3500 srctype=server desttype=drive autodetect=yes device=/dev/IBMtape11

Step 5 - define device classes and stgpools
Issue the following TSM commands (if you save to macro, run with -itemcommit):
define devclass LTO4-DC devtype=lto library=TS3500 format=ultrium4c estcapacity=500m mountret=0
define stgpool LTO4-stgpool LTO4-dc desc='LTO 4 pool on simulated TS3500' maxscratch=20
define stgpool LTO4-stgpool-copy LTO4-dc desc='LTO 4 copy pool on simulated TS3500' pooltype=copy maxscratch=20

define devclass LTO5-DC devtype=lto library=TS3500 format=ultrium5C estcapacity=500m mountlimit=6 mountret=0
define stgpool LTO5-stgpool LTO5-dc desc='LTO 5 pool on simulated TS3500' maxscratch=20
define stgpool LTO5-stgpool-copy LTO5-dc desc='LTO 5 copy pool on simulated TS3500' maxscratch=20 pooltype=copy

define devclass LTO5-DC-worm devtype=lto library=TS3500 format=ultrium5C estcapacity=500m mountlimit=6 mountret=0
define stgpool LTO5-stgpool-worm LTO5-dc-worm desc='LTO 5 Worm pool on simulated TS3500' maxscratch=10
define stgpool LTO5-stgpool-worm-copy LTO5-dc-worm desc='LTO 5 Worm copy pool on simulated TS3500' maxscratch=10 pooltype=copy

Step 6 - label and checkin libvolumes
issue TSM command:
label libvolume ts3500 search=yes checkin=scratch labels=barcode


Step 7 - define TSM domains to use tape pools.  You can copy this, or modify existing domains.
Issue the following TSM commands (if you save to macro, run with -itemcommit):
define domain tapetest-LTO4
define policyset tapetest-LTO4 set1
define mgmtclass tapetest-LTO4 set1 backuptape
define co tapetest-LTO4 set1 backuptape dest=LTO4-stgpool
define co tapetest-LTO4 set1 backuptape dest=LTO4-stgpool type=archive
assign defmgmt tapetest-LTO4 set1 backuptape
activate policyset tapetest-LTO4 set1
register node tapetest-lto4 passw0rd domain=tapetest-lto4

define domain tapetest-LTO5
define policyset tapetest-LTO5 set1
define mgmtclass tapetest-LTO5 set1 backuptape
define co tapetest-LTO5 set1 backuptape dest=LTO5-stgpool
define co tapetest-LTO5 set1 backuptape dest=LTO5-stgpool type=archive
assign defmgmt tapetest-LTO5 set1 backuptape
activate policyset tapetest-LTO5 set1
register node tapetest-LTO5 passw0rd domain=tapetest-lto5

define domain tapetest-LTO5-Worm
define policyset tapetest-LTO5-Worm set1
define mgmtclass tapetest-LTO5-Worm set1 backuptape
define co tapetest-LTO5-Worm set1 backuptape dest=LTO5-Worm-stgpool
define co tapetest-LTO5-Worm set1 backuptape dest=LTO5-Worm-stgpool type=archive
assign defmgmt tapetest-LTO5-Worm set1 backuptape
activate policyset tapetest-LTO5-Worm set1
register node tapetest-LTO5-Worm passw0rd domain=tapetest-LTO5-Worm

Step 8 - Demo and test to your heart's content.
You should be able to do the following tests successfully. Note, in my environment, before I could use the LTO5 or LTO5-Worm devclass, I had to update  ALL LTO4 drives to be offline (update drive ts3500 lto4-d1 online=no) and then update them online again.  Then the LTO devclasses worked as intended.
q libr f=d   -- should show serial # and device info.
q drive f=d  -- should show serial # and device info.
q libvol
q libvol ts3500 volumename f=d
backup db type=full devclass=lto4-dc scratch=yes numstream=1
the above with LTO5-DC
backup with node in LTO4, lto5 or lto5-worm domains.  Should see correct volume mounted and then added to libvols
move data volname
backup stgpool lto4-stgpool lto4-stgpool-copy
backup stgpool with lto5 and lto5 worm stgpool pairs
audit library ts3500
checkout and checkin libvol commands, combined with vtlcmd to simulate operator opening and removing/adding volumes to i/o port.  Note after a restart of mhvtl, all known volumes are back in the tape library.
q contents volname
I have not experimented with migration or reclamation, although there is no reason those won't work.

I hope this helps,

 Dan Thompson

device.lto5-and-lto4 rename to device.conf

library_contents.mixed-lto5-lto4 - rename to library_contents.90
Loading...