ADSM-L

Re: Fiber attached tape drives

2006-03-01 18:19:04
Subject: Re: Fiber attached tape drives
From: Paul Zarnowski <psz1 AT CORNELL DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 1 Mar 2006 18:17:25 -0500
At 05:54 PM 3/1/2006, Andy Huebner wrote:
Is there an easier/better way to force the drive mapping to be the
same across multiple AIX machines?

I have a little script that renames tape device names in AIX to be
stable across AIX boxes.  We do this to make it easier to move TSM
server images around between AIX boxes.  The script takes 1 argument,
the rmt name (e.g., rmt1) and renames the device to include the wwn
and port number.  E.g., it will rename rmt1 to rmt.45d0.1.0.  In this
example, "45d0" are the last 4 characters of the WWN, and "1"
indicates that it is the first device off that WWN.  This example is
for an LTO-2 tape drive that is behind an ADIC Storage Network
Controller (SNC).  The SNC has the WWN, and behind it are 3 SCSI tape
drives (at .1, .2, and .3).  The script follows.    ..Paul


more tsmchrmt
#!/bin/sh
if [ $# != 1 ]
then
  echo "must specify 1 rmt device name as an argument."
  exit 4
fi
d=$1

WWN=`/usr/sbin/lsattr -El $d -a ww_name|cut -f2 -d" "|cut -c15-`
LUN=`/usr/sbin/lsattr -El $d -a lun_id|cut -f2 -d" "|cut -c3`
root=`echo $d|cut -c1-3`
new_name=$root.$WWN.$LUN.0
let "j=0"
while [[ -e /dev/$new_name ]]
do
        let "j=j+1"
        new_name=$root.$WWN.$LUN.$j
done
/usr/sbin/chdev -l $d -a new_name=$new_name




--
Paul Zarnowski                            Ph: 607-255-4757
Manager, Storage Systems                  Fx: 607-255-8521
719 Rhodes Hall, Ithaca, NY 14853-3801    Em: psz1 AT cornell DOT edu

<Prev in Thread] Current Thread [Next in Thread>