beautypg.com

Using the seek and tell features of mt – HP Ultrium tape drives Q1538-90925 User Manual

Page 20

background image

Linux

20

HP restricted

NOTE:

To add drivers to the statically built kernel you need the Linux source code available on disk

and knowledge of how to use the kernel building tools that ship with various Linux distributions. This

should not be attempted by novice users.

In order to determine if the drive has been detected by the tape driver at module load time, execute:

dmesg | grep "s t"

This should find a number of lines. One should look like:

Detecte d SCSI t ape st0 a t scsi1, channel 0 , id 5, l un 0

To load the tape driver module if it is not loaded as above, execute:

insmod st

to load it. This should happen naturally if your system is rebooted after attaching the drive.
When the ST driver module has been added, a list of tape device files will be created automatically.

They reside in the /dev/ directory and have the syntax:

/dev/st p or dev /nstp

where:

To enable large transfers under Linux (>64 KB per write), edit the file
/usr/src/linux/drivers/scsi/st_options.h

and change the definition of

ST_BUFFER_BLOCKS

.

If you want requests to space to end of data (EOD) to be faster, you should also enable
ST_FAST_MTEOM

in the same file. After changing this file, rebuild the modules and install the new

binary. At the very least, this requires:

make mo dules

make mo dules_in stall

from the /usr/src/linux directory. See your kernel documentation.

Using the seek and tell features of mt

To use the seek and tell features of mt, you must tell the st driver that HP Ultrium drives use logical

block addressing:

mt -f stsetoptions scsi2logical

where /dev/stp is the device file.
Note however that this information is not preserved across reboots, so you need to execute this

command each time the system comes up. The stinit utility offers a convenient way of handling

this; see the relevant man page for more information. If you use this approach, set the manufacturer

parameter to HP and the model to “Ultrium 3-SCSI”.

p

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.