HP DDS/DAT tape drives UNIX, Linux and OpenVMS configuration guide (DW049-90930, May 2010)

TIP:
You may prefer to redirect a lengthy dmesg output to a file for browsing at your convenience:
dmseg > my_boot_messages.txt
or pipe the output of dmesg to a page scrolling utility
dmesg | more
Extract from dmesg output:
.
.
scsi3 : cciss
Vendor: HP Model: DAT320 Rev: ZxxD
Type: Sequential-Access ANSI SCSI revision: 06
scsi 3:0:0:0: Attached scsi generic sg0 type 1
st: Version 20050830, fixed bufsize 32768, s/g segs 256
st 3:0:0:0: Attached scsi tape st0
.
.
The tape drive instance identifies which device files are applicable to the tape drive. For example:
st0 indicates device files /dev/st0 or /dev/nst0
st1 indicates device files /dev/st1 or /dev/nst1
and so on...
A list of tape device files gets created automatically when the st driver module and the correct HBA
driver have been added. They reside in the /dev/ directory and have the syntax:
/dev/stp or dev/nstp
where:
p is the instance number of the device file (if only one drive is connected to the system, this will
be 0)
n Indicates this is a no-rewind driver.
Using the seek and tell features of mt
To use the seek and tell features of mt, the st driver needs to be configured for logical block addressing
with HP DDS/DATdrives.
With some Linux distributions it is possible to do this using the stsetoptions function with mt utility:
mt -f <devicefile> stsetoptions scsi2logical
where <devicefile> is /dev/stp or /dev/nstp.
Note however that this information is not preserved across reboots, so you need to execute this
command each time the system comes up. Some Linux distributions include the stinit utility, which
offers a convenient way of handling this using the /etc/stinit.def configuration file. Note that
the file /etc/stinit.def may not exist in a new installation and so may need to be created. See
the examples of stinit.def entries in /usr/share/doc/mt-st-<version>/
stinit.def.examples. If you use this approach, set the manufacturer parameter to HP and the
model to DAT320.
UNIX, Linux and OpenVMS configuration guide 31