ADSM-L

Re: [ADSM-L] Is there a simple way to test a tape drive?

2007-12-04 22:19:55
Subject: Re: [ADSM-L] Is there a simple way to test a tape drive?
From: Dan Foster <tronic183 AT EVILPHB DOT ORG>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 30 Nov 2007 15:52:27 -0500
Hot Diggety! Richard Rhodes was rumored to have written:
> Sometimes I want to have TSM test out a tape drive.
> Something like . . .
>   - pick a drive
>   - pick a tape
>   - have tsm mount the tape and read the label (or something)
>   - tell me this succeeded or not
>
> Like yesterday . . . IBM repaired a tape drive.  After fixing it, IBM
> tells us it's fixed.  We put the drive online . . .and wait for TSM
> to use it.  For this particular drive, it was several hours before
> TSM used it.
>
> We also get this after an upgrade, or adding a new drive.  To get
> TSm to used any drive, let alone a particular drive, requires
> starting a migration, update stgpool, backup to tape, etc.  All
> are large processes.
>
> Is there a simple way to get TSM to exercise a particular tape drive? Or,
> what do you do in these situations?

Well, we run a r/w test with a known good scratch tape before letting
the IBM CE leave the site. :) It's not perfect but it's a quick test to
test the major functionality.

You didn't mention what OS and version the server runs nor the TSM
server version. So this will vary a bit, but for AIX and 3584/LTO:

# tapeutil -f /dev/rmtX rwtest -b 262144 -c 10 -r 2

is good with our LTO-1 drives in our 3584 library. Block size: 256KB, 10
blocks (of 256K each), 2 runs, read and write test.

Obviously, make sure it's a scratch tape, since this test will scribble
some data over it. You may want to have this tape temporarily checked
out of TSM so that TSM won't try to use it for any operation.

Some other platforms may have tapeutil; I'm not sure what platforms has
it and if it's named differently on some platforms or not.

Other things you can do:

# tapeutil -f /dev/smc0 inventory | grep -p "^Drive Address <num>"

...where <num> corresponds to the element number of the drive.

(AIX supports grep -p; on other platforms, just use 'more' instead.)

You can also test mount/dismount of tape by moving the scratch tape from
either a library slot or from a I/O slot.

# tapeutil -f /dev/rmtX move <elem ID #1> <elem ID #2>

...where elem ID #1 is the element number of your tape source location
...and   elem ID #2 is the element number of your tape drive

And, of course, rmtX is the drive in question (rmt0, rmt1, etc).

When done, can do 'tapeutil -f /dev/rmtX unload' and then 'tapeutil -f
/dev/rmtX move <elem ID #2> <elem ID #1>'.

The tapeutil rwtest is best done with the drive disabled in TSM *FIRST*,
so that TSM doesn't try to use the drive at the same time. Once you're
finished with the work, bring the drive back online in TSM ('upd drive ...').

Then you can do 'sh libr' and look at the output; should look sane.

Doing all this only takes a minute or two, so I don't feel bad about
asking the CE to wait.

I believe it's mtlib for 3494 libraries.

tapeutil AND mtlib usage can be found here:

ftp://ftp.software.ibm.com/storage/devdrvr/Doc/IBM_Tape_Driver_IUG.pdf

-Dan