The TCB Group has a lot of tape drives. They are all hooked up to Sun boxes, and controlled with MTX+SGEN.

Configuration Information

System Drive Tape Device Changer Device Changer Type Notes
rio Quantum SDLT320 /dev/rmt/0 none
reno Quantum SDLT320 /dev/rmt/0 none
rolla Sun StorEdge L8 /dev/rmt/1 /dev/scsi/changer/c3t0d0 8-tape rackmount
Quantum SDLT320 /dev/rmt/0 none
rota Sun StorEdge L8 /dev/rmt/1 /dev/scsi/changer/c3t0d0 8-tape rackmount
Quantum SDLT320 /dev/rmt/0 none
tripoli ADIC 22 DLT4000 /dev/rmt/0 /dev/scsi/changer/c1t1d0 22-tape changer For public use
cancun ADIC 22 DLT4000 /dev/rmt/0 /dev/scsi/changer/c1t1d0 22-tape changer For public use

MTX+SGEN

SGEN is the Solaris 8 generic SCSI driver. MTX is a project to make a system-independent tape changer library and set of utilities.

Setup:

  1. vi /kernel/drv/sgen.conf
    The bottom of this conf file contains a bunch of commented-out lines. You want the bottom of this file to read like this:
    device-type-config-list="changer"
    name="sgen" class="scsi" target=0 lun=0;
    name="sgen" class="scsi" target=1 lun=0;
    name="sgen" class="scsi" target=2 lun=0;
    name="sgen" class="scsi" target=3 lun=0;
    name="sgen" class="scsi" target=4 lun=0;
    name="sgen" class="scsi" target=5 lun=0;
    name="sgen" class="scsi" target=6 lun=0;
    name="sgen" class="scsi" target=7 lun=0;
    name="sgen" class="scsi" target=8 lun=0;
    name="sgen" class="scsi" target=9 lun=0;
    name="sgen" class="scsi" target=10 lun=0;
    name="sgen" class="scsi" target=11 lun=0;
    name="sgen" class="scsi" target=12 lun=0;
    name="sgen" class="scsi" target=13 lun=0;
    name="sgen" class="scsi" target=14 lun=0;
    name="sgen" class="scsi" target=15 lun=0;
    
    name="sgen" class="scsi" target=0 lun=1;
    name="sgen" class="scsi" target=1 lun=1;
    name="sgen" class="scsi" target=2 lun=1;
    name="sgen" class="scsi" target=3 lun=1;
    name="sgen" class="scsi" target=4 lun=1;
    name="sgen" class="scsi" target=5 lun=1;
    name="sgen" class="scsi" target=6 lun=1;
    name="sgen" class="scsi" target=7 lun=1;
    name="sgen" class="scsi" target=8 lun=1;
    name="sgen" class="scsi" target=9 lun=1;
    name="sgen" class="scsi" target=10 lun=1;
    name="sgen" class="scsi" target=11 lun=1;
    name="sgen" class="scsi" target=12 lun=1;
    name="sgen" class="scsi" target=13 lun=1;
    name="sgen" class="scsi" target=14 lun=1;
    name="sgen" class="scsi" target=15 lun=1;
    
  2. modload /kernel/drv/sparcv9/sgen; devfsadm . This will create a device node somewhere in /dev/scsi/changer.
  3. Install a recent version of MTX. The web page is here, and we've got version 1.2.16rel in /Projects/system/tape/src. Don't forget to encap it.
  4. Configure and install TapeChanger::MTX, a perl module/set of scripts to work with the tape drives.

Sample Scripts

See here for backup scripts.

To back up a specific directory with GNU tar, try this:

gtar -cvf /dev/rmt/0 -F /usr/local/bin/nexttape $DIR

Note that this assumes you've installed TapeChanger::MTX, and that you're using a changer. If you're not, use -M instead and change tapes when prompted.

Device Names

Choosing which device node to use is more effort than just typing in '/dev/rmt/0'. Different flags at the end of the device name ('/dev/rmt/0n', for instance) offer different behaviours; you'll probably want to use these sometimes. Our backups currently use 'bcn'.

Letter Meaning Implication
n Don't rewind the tape after using it Can put multiple volumes per tape.
c Compress the data to the tape
b BSD behaviour More-readable by a variety of OS's.
More information can be found on the mtio web page.

Contacts

Tim set this up.

References