Networker

Re: [Networker] Setting up a tape library on RH Linux via fibre

2007-07-19 18:21:36
Subject: Re: [Networker] Setting up a tape library on RH Linux via fibre
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 19 Jul 2007 17:16:53 -0500
In regard to: [Networker] Setting up a tape library on RH Linux via fibre,...:

I am setting up a new Red Hat Linux ES 4 server with a Qualstar tape library.

I can get "inquire -l" to see the four LTO-3 tape drives in this new library, but I am at a loss as to how to make the robot's information appear in the "inquire -l" output.

First, what does /proc/scsi/scsi look like?  Does the robot appear there?
If not, it's almost certainly not going to be visible to inquire, no
matter the flags.

Next, what id AND LUN *should* the robot be appearing at?  If you know
that (or can guess) AND the robot doesn't appear in /proc/scsi/scsi, it's
likely just a matter of poking the Linux kernel and telling it to
re-examine a particular host/bus/target/lun address to see if there's
something there.

For example, if you believe the robot should appear on the same controller
as your "lower" two drives, but at lun 1 instead of lun 0, then look at
/proc/scsi/scsi, find out what SCSI HBA those drives are on (e.g.
something like scsi2), and then prod the kernel to examine lun 1 on those
h/b/t/l combos:

        echo 'scsi add-single-device 2 0 2 1' > /proc/scsi/scsi
        echo 'scsi add-single-device 2 0 3 1' > /proc/scsi/scsi

First number is host, is corresponds to the SCSI (FC) host bus adapter
number.

Second number is channel on that controller, so if your controller has an
A and a B channel, it might be 0 or 1.

Third number is the SCSI target id.

Fourth number is the lun.

Then look at /proc/scsi/scsi again and find out if new devices showed
up.  If so, they'll get associated with a new /dev/sg (SCSI generic)
device.

Once you can get the device to show up this way, you can get it to
automatically show up at boot time in any of several possible ways.
Modifying your boot config (either lilo.conf or grub.conf, probably grub)
to pass an additional parameter to the kernel is probably easiest.  You
likely want "max_scsi_luns=N", see bootparam(7).

(in my best "Rainman" voice) Linux has excellent SCSI utilities.  I
highly recommend the sg3_utils package for working with any type of device
that speaks the SCSI protocol.

Tim
--
Tim Mooney                                        Tim.Mooney AT ndsu DOT edu
Information Technology Services                   (701) 231-1076 (Voice)
Room 242-J6, IACC Building                        (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the body of the email. Please write to networker-request 
AT listserv.temple DOT edu if you have any problems with this list. You can access the 
archives at http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER