# config file for the chg-mcutil tape changer program.
# Used when tpchanger "chg-mcutil" is specified in amanda.conf.

# chg-mcutil is mainly designed for use with Compaq TRU64.
# chg-mcutil uses a binary program called `mcutil`, a Media
# changer manipulation utility.  mcutil comes installed with
# TRU64 5.0x & above.  However, with TRU64 4.0x, it can be
# located on one of the Associated Product CDs.

# A few OS commands that this script relies on to function
# correctly.  Please make sure they exist, and are in the 
# $PATH:
#
# date, cut, tr, cat, expr, grep, awk
#

# Before you can use chg-mcutil within amanda, you need
# to make sure that `mcutil` can see, and interact with your
# tape changer.  You need to be able to successfully run the
# following:
#
# mcutil -e drive
# mcutil -e slot
# mcutil -m drive slot:#
# mcutil -m slot:# drive
#

mcutil mcutil		#location of the mcutil program
tape /dev/null	# use ntape for norewind
			# {a|m|h|c} suffixes should NOT 
			# be tape device since they all
			# implement hardware compression

# What are the slot numbers of the tape changer as reported by mcutil?
firstslot 0
lastslot 6

# Do you want amanda to determine when you should clean the tape drive?
use_cleaning 0		# 0 for yes ; 1 for no
cleanslot 7		# slot containing the cleaning disk
cleansleep 300		# How long to wait before the cleaning tape finishes (default: 5 min)
cleanme 45		# number of days before messages popup to clean tape drive
cleanfile /etc/amanda/changer/times_cleaned
lastfile /etc/amanda/changer/last_cleaned

# Names a status file where the current 'changer' state is stored.
currentslot /etc/amanda/changer/currentslot

# Where to log changer debugging info
logfile /tmp/amanda/changer.debug


# To determine what slot is currently used, I query the drive itself.
# /sbin/mcutil -e drive
# With a Tape : drive 0 [full,access,source=256]  16
# Without Tape: drive 0 [empty,access]  16
#
# each slot has a source number assigned to it.  I subtract slot 0's source num from the output.
# If the number is less than 0, no tape is in the drive, else it outputs the current slot number.
#
# slot 0 [full,access,source=256] 256
# slot 1 [full,access,source=257] 257
# slot 2 [full,access,source=258] 258
# slot 3 [full,access,source=259] 259
#
slot0source 256		# run /sbin/mcutil -e slot to determine slot0 source number.
