>Has anyone figured out how to make Solaris 2.5.1 recognize a Tape
>Autochanger to the point that it create an entry in /dev/rmt
>that allows one to open it as talk to the unit in passthru mode.
in addition to the other listed (and other commercial driver(s), such
as the one from http://www.anthill.com), a PD driver/command implemention
i've written called "stctl" exists at:
http://www.cs.pdx.edu/~eric/projects.html
(specifically, http://www.cs.pdx.edu/~eric/stctl/stctl.tar.gz).
README included is as follows:
STCTL - SCSI-2 "generic" tape changer controller target driver for
Solaris2.
Provides an interface for issuing tape changer commands to common
changers (which implement the SCSI-2 "Medium Changer Devices"
command set).
Many commercial backup systems provide their own drivers and they
should be used instead with their system. This implementation is
for those wishing to control their changer outside of the backup
system or wish to interface their changer with a backup system
that either doesn't directly support changers or don't provide
a suitable driver (such as the freely available, but very good,
AMANDA backup system). An accompanying command "stc" is used
to provide a command-line interface for issuing load/unload/status
commands.
This is my first SCSI target driver (and my first low-level work
with SCSI), so I make no claims that this is a commercial quality,
solid, crash-proof implementation (see standard disclaimer below).
It was developed within and for use in a non-critical, acedemic
environment (with some inspiration and guides from the _Device
Driver Developer's Kit_ from Sun Microsystems, Inc.)
I'm releasing it as "free software" as I notice the topic for
changer support (lacking natively under Solaris2) arising
frequently on various usenet groups and mailing lists. This also
implies that little support will be placed behind it. I authored it
for our environment and it works well for us. One is welcome to
hack to their tastes.
This driver was written for and tested against a Quantum 7-tape
library changer (model DLT4700), but flexibility was added such
that it ought to work with most random access changers that use the
changer command set (such as Exabyte 2x0, etc), or at most, with
minor tweaking; I don't have access to other changers to try,
however (it was updated and tested briefly with an EXB-210 library
from Sun).
NOTE: This driver does not replace the standard "st" (scsi tape)
driver included with the operating system. This driver works
independently on the changer portion of the library (which
has a separate SCSI address from the tape drive(s) itself),
so there should be no additional reliability problems with
the data transport functions of the tape subsystem.
Installation -
Place the "stctl" driver into a kernel module accessible place,
such as /usr/kernel/drv . A "stctl.conf" must also be co-
located (required for SCSI drivers) with contents similar to :
name="stctl" class="scsi" target=0 lun=1;
name="stctl" class="scsi" target=1 lun=1;
name="stctl" class="scsi" target=2 lun=1;
name="stctl" class="scsi" target=3 lun=1;
name="stctl" class="scsi" target=4 lun=1;
name="stctl" class="scsi" target=5 lun=1;
You may wish to trim this down (to try to align the instance
number with the corresponding tape device) or tailor to your
particular changer device (on a QDLT-4700, the tape drive is
addressed as logical unit 0 with the changer at logical unit
1); see the changer documentation for specifics (the EXB-210
has a separate target/lun(=0) for the changer controller).
Update /etc/devlink.tab with the line :
type=ddi_pseudo;name=stctl rmt/stctl\N0
(note that a TAB _must_ separate the second argument).
Use "add_drv" to update /etc/minor_perm and /etc/name_to_major :
add_drv -m '* 0660 root sys' -v stctl
Building -
This driver was developed using GCC 2.7.2.1 under Solaris 2.5.1 .
To build this driver :
% (g)cc -D_KERNEL -c stctl.c
% ld -r -o stctl stctl.c
# cp stctl /usr/kernel/drv
The driver uses the following SCSI-2 changer specific commands :
INITIALIZE ELEMENT STATUS (Opcode = 07h)
MOVE MEDIUM (Opcode = A5h)
READ ELEMENT STATUS (Opcode = B8h)
MODE SENSE (Opcode = 1A)
Element Address Assignment Page (Pagecode = 1Dh)
Other standard SCSI commands: Extended Request Sense,
Test Unit Ready, etc...
The driver has the following limitations/assumptions/features :
- Does not support volume tags (tape labels)
All tape references indexed by slot number (start==0)
- Does not recognize/support import/export elements
- Recognizes but assumes single transport element
+ Does support multiple tape drives within a changer
(indexed by number start==0)
- Multi-drive support lightly untested
- Does not implement Automatic Request Sense
This is designed for common simple changers. Anything beyond that,
the vendor should have their own driver. For a commercial-grade
driver (with more features), check out Automated Network
Technologies' changer/library driver(s): http://www.anthill.com .
It there's any serious problems discovered (with a known fix),
lemme know. If it crashes your machine, apologies, but unless
the cause is obvious, I will not attempt to investigate. In
fact, I probably won't ever touch this code again unless I have
access to more devices. So nyah!
Standard Disclaimer -
THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
This file is provided with no support and without any obligation on
the part of the author to assist in its use, correction, modification
or enhancement.
(ie, "It's free, dammit... get over it" )
-=-=-=-=-
-eric
--
Eric Berggren | "Parts of this product may be derived from
Portland State University | from UNIX and Berkeley 4.3 BSD systems..."