# # Tape Autoloader on 2.4 Linux
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Tape Autoloader on 2.4 Linux

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© January 2003 Rob Fantini

Rob Fantini explains how he got an autoloader tape unit working on RedHat Linux

This info may not be clearly written, but shows what I did to get autoloaders working on 2.4 linux.

Part 1: Kernel must support luns


Part 2: notes on device names



From /proc/scsi/scsi:
Attached devices:
Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: SEAGATE  Model: DAT    06240-xyz Rev: 8160
  Type:   Sequential-Access                ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 09 Lun: 00
  Vendor: SEAGATE  Model: DAT    06241-xyz Rev: 8110
  Type:   Sequential-Access                ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 09 Lun: 01
  Vendor: SEAGATE  Model: DAT    06241-xyz Rev: 8110
  Type:   Medium Changer                   ANSI SCSI revision: 03
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: TDK      Model: CDRW4800B        Rev: S7D5
  Type:   CD-ROM                           ANSI SCSI revision: 02
 

so



Thus the changer on the autoloader = sg2 .

That scsi assignment changes depending on add/rmv devices, or i think changing the ide cdrom from hdd to hdb

Part 3: script to do backups

# /u4/fbc/adm/Tape/mtx-tar   

# TAR: note  need  '.'  before path to eliminate  'tar: Error exit delayed from previous errors'


# 07-2002: use  mtx to manipulate  dds4 autoloader, #  then backup system.

DAY=`date +%A`
echo $DAY

set -x
/u4/fbc3/adm/TapeRpt  # clear report file

mtx -f /dev/sg2 unload  ## no harm if already unloaded.
                        ## in any case load does not auto unload.

case $DAY in
        Monday)         mtx -f /dev/sg2 load 1;; 

        Tuesday)        mtx -f /dev/sg2 load 2;;

        Wednesday)      mtx -f /dev/sg2 load 3;;

        Thursday)       mtx -f /dev/sg2 load 4;;

        Friday)         mtx -f /dev/sg2 load 5;;

        Sunday|Saturday) mtx -f /dev/sg2 load 6; # cleaning cartridge, unloads auto aft cleaning
                        mtx -f /dev/sg2 load 1;;

#       Sunday)         mtx -f /dev/sg2 load 1;;
esac


###  uncomment for debugging:
#mtx -f /dev/sg2 status >> /u4/fbc3/adm/TapeRpt ## cron err our also to this

##  09-04-2002, added next line, incase called from cmd line
cd /

tar -cv --exclude-from /u4/fbc/adm/Tape/exclude_files.lst -f  /dev/st1  ./

cat /u4/fbc3/adm/TapeRpt  |   mail -s "MasterBkup report" rob

Publish your articles, comments, book reviews or opinions here!

© January 2003 Rob Fantini All rights reserved


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Tape Autoloader on 2.4 Linux


Inexpensive and informative Apple related e-books:

Take Control of Preview

Take Control of iCloud

iOS 10: A Take Control Crash Course

iOS 8: A Take Control Crash Course

Take Control of OS X Server





More Articles by © Rob Fantini





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





By understanding a machine-oriented language, the programmer will tend to use a much more efficient method; it is much closer to reality. (Donald Knuth)




Linux posts

Troubleshooting posts


This post tagged:

Backup

Hardware

Kernel

Linux

Tape Drives

Unix



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode