Quantcast

testing mhVTL and TSM with emulated L180 library and T10000B drives.

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

testing mhVTL and TSM with emulated L180 library and T10000B drives.

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

Testing environment:
SLES11 SP3
TSM server running locally: version 7.1.1.300, server and device driver installed.
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
       

Prerequisites:
The only prerequisites I needed to install was the LZO dev libraries from the SLES SDK ISO for mhVTL.  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
       
        NOTE: I have noticed if downloading different versions than from github, the instuctions are to perform the install (look for install instructions).
        unzip package containing mhVTL source and change to that directory.
        cd kernel
        make && make install
        cd ..
        rpmbuild -tb mhvtl-package.tgz
        watch messages for binary package (look for Wrote message).  rpm --install binary-package.rpm

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.10 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 T10K and 6 x T10K).
        chkconfig --list mhvtl # should show mhvtl starting in runlevels 2, 3 and 5
       
Step 3 - Configuring TSM device driver
  change to /opt/tivoli/tsm/device/bin
  ./autoconf -a
  ls -altr /dev/tsmscsi  # you should see device drivers for tape drives and library, which link back to /dev/sg* linux pass-thru drivers.
  ls -altr /dev/Ssg* # you should see the linked to drivers with attributes to allow non-root users use the files.
 
  add the following to /etc/init.d/after.log: /opt/tivoli/tsm/devices/bin/autoconfig -a
       
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 L180 libtype=scsi shared=no resetdrives=no autolabel=yes relabelscratch=yes serial=autodetect
define path tapsrv05 L180 srctype=server desttype=library device=/dev/tsmscsi/lb0 autodetect=yes online=yes
define drive L180 T10K-D1
define drive L180 T10K-D2
define drive L180 T10K-D3
define drive L180 T10K-D4

define path tapsrv05 T10K-d1 library=L180 srctype=server desttype=drive autodetect=yes device=/dev/tsmscsi/mt0
define path tapsrv05 T10K-d2 library=L180 srctype=server desttype=drive autodetect=yes device=/dev/tsmscsi/mt1
define path tapsrv05 T10K-d3 library=L180 srctype=server desttype=drive autodetect=yes device=/dev/tsmscsi/mt2
define path tapsrv05 T10K-d4 library=L180 srctype=server desttype=drive autodetect=yes device=/dev/tsmscsi/mt3


Step 5 - define device classes and stgpools
Issue the following TSM commands (if you save to macro, run with -itemcommit):
define devclass T10K-DC devtype=ecartridge library=L180 format=t10000b-c estcapacity=500m mountret=0
define stgpool T10K-stgpool T10K-dc desc='t10K pool on simulated L180' maxscratch=50
define stgpool T10K-stgpool-copy T10K-dc desc='10Kcopy pool on simulated L180' pooltype=copy maxscratch=20

define devclass T10K-DC-worm devtype=ecartridge library=L180 format=t100000B-C estcapacity=500m mountlimit=6 mountret=0 worm=yes
define stgpool T10K-stgpool-worm T10K-dc desc='t10K pool on simulated L180' maxscratch=20
define stgpool T10K-stgpool-worm-copy T10K-dc desc='t10K copy pool on simulated L180' maxscratch=20 pooltype=copy


Step 6 - label and checkin libvolumes
issue TSM command:
label libvolume L180 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-T10K
define policyset tapetest-T10K set1
define mgmtclass tapetest-T10K set1 backuptape
define co tapetest-T10K set1 backuptape dest=T10K-stgpool
define co tapetest-T10K set1 backuptape dest=T10K-stgpool type=archive
assign defmgmt tapetest-T10K set1 backuptape
activate policyset tapetest-T10K set1
register node tapetest-T10K passw0rd domain=tapetest-T10K

define domain tapetest-T10K-Worm
define policyset tapetest-T10K-Worm set1
define mgmtclass tapetest-T10K-Worm set1 backuptape
define co tapetest-T10K-Worm set1 backuptape dest=T10K-Worm-stgpool
define co tapetest-T10K-Worm set1 backuptape dest=T10K-Worm-stgpool type=archive
assign defmgmt tapetest-T10K-Worm set1 backuptape
activate policyset tapetest-T10K-Worm set1
register node tapetest-T10K-Worm passw0rd domain=tapetest-T10K-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 T10K or T10K-Worm devclass, I had to update  ALL T10K drives to be offline (update drive L180 T10K-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 L180 volumename f=d
backup db type=full devclass=T10K-dc scratch=yes numstream=1
the above with T10K-DC
backup with node in T10K, T10K or T10K-worm domains.  Should see correct volume mounted and then added to libvols
move data volname
backup stgpool T10K-stgpool T10K-stgpool-copy
backup stgpool with T10K and T10K worm stgpool pairs
audit library L180
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.L180-10K rename to device.conf
library_contents.L180-10K rename to library_contents.10
Loading...