Amanda-Users

Re: configuring the Solaris 'sgen' driver to bind to L9 changer device

2006-09-18 13:13:25
Subject: Re: configuring the Solaris 'sgen' driver to bind to L9 changer device
From: Jon LaBadie <jon AT jgcomp DOT com>
To: Amanda Users Mailing List <amanda-users AT amanda DOT org>
Date: Mon, 18 Sep 2006 13:04:49 -0400
On Tue, Sep 19, 2006 at 02:27:41AM +1000, Craig Dewick wrote:
> On Mon, 18 Sep 2006, Brian Cuttler wrote:
> 
> >I know I posted, and exchanged information on this with others on
> >the list some time ago.
> >
> >Give me a chance to look in my outbox, or you can check the list
> >archives, and we'll see what we can see.
> >
> >What version of Solaris ?
> 
> Solaris 9.
> 
> >I access the robot as /dev/scsi/changer/c6-something, I recall
> >that it has a unique SCSI id on the bus but a LUN of 0.
> 
> The front panel indicated that the changer and the drive have different 
> SCSI ID's, but I wonder if that might explain some of the issues with 
> amtape trying to manipulate the changer? When I found the script in the 
> mtx source tree to configure /kernel/drv/sgen.conf (mentioned in a 
> follow-up to the original post about sgen configuration), it set up 
> /dev/scsi/changer/c2t0d0 as the device handle for the changer.

>From your last sentence I'm unclear if you think the script to setup
the device was specific for setting up c2t0d0 or whether that was your
systems actual device name setup by the script.  So if the following
sounds like "is the tv you think is broken plugged in" type comment,
I apologize in advance.

It won't be the script that sets up specific devices.  The OS picks
the device names based on its scans and distorted logic.  In case
you are not familiar with that naming scheme c1t2d3 would be
  "c"ontroller number 1 (you may have multiple scsi, or ide+scsi or?)
  "t"arget     number 2 (aka scsi id or disk number for ide)
  "d"evice     number 3 (aka scsi lun)

So you need to setup your st.conf and sgen.conf (tape drive and changer
respectively) and do a config reboot (or devfsadm while testing, but
I recommend a reboot at the end to be certain).  Then find which device
names were assigned to your devices.

For this exploration don't use amanda.  Use mtx for changer explore and
testing and mt/tar/dd for drive explore and testing.

Once you have determined the appropriate /dev/scsi/changer/cXtYdZ and
/dev/rmt/#XYZn then these are the names to supply to amanda.conf and
changer.conf.  There will probably be /dev/scsi/sequential devices for
the tape drive too, but use the /dev/rmt names.

If your systems config is pretty stable you might consider creating
symbolic links as follows:

   /dev/tape0           to one of your /dev/rmt/# devices
   /dev/tape0n          to the corresponding no-rewind device
   /dev/tape1           to another one if you have more than one
   /dev/tape1n          to the corresponding no-rewind device

   /dev/changer0        to the /dev/scsi/changer/cXtYdZ device for /dev/tape0
   /dev/changer1          ditto for /dev/tape1

   /dev/tape            to the "standard" or most commonly used above devices
   /dev/tapen
   /dev/changer

Saves having to remember all those letters and numbers.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)