Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2000 01:06:15 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        Lanny Baron <lnb@FreeBSDsystems.COM>
Cc:        FreeBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: multiple tape backups
Message-ID:  <20001110010615.A22076@dan.emsphone.com>
In-Reply-To: <20001107144649.C5188@sydney.worldwide.lemis.com>; from "Greg Lehey" on Tue Nov  7 14:46:49 GMT 2000
References:  <Pine.BSF.4.21.0011051747360.59578-100000@satan.freebsdsystems.com> <20001107144649.C5188@sydney.worldwide.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sunday,  5 November 2000 at 17:50:11 -0500, Lanny Baron wrote:
> Would you know if /bin/chio will be able to make the robotic arm of
> an Exabyte EZ-17 Tape Autoloader work?
>
> If not, would you know what must be done in order for a tape
> mechanism like this to insert new tape (comes with 7 tapes in a bay)
> at end of tape when backing up systems?

Chio will control any SCSI autoloader.  How well it controls it depends
on the autoloader's capabilities.  I've used it with great success on
Overland DLT and M4 3490e libraries (they are smart autoloaders with
barcode scanners and multiple drives), and with a bit of fiddling, an
Exabyte 10h and an ADIC DLT library.

You'll have to use tar to back up your systems, since dump has no way
to run a "change-tape" script. You should be able to get away with
something as simple as "tar cvMF chio.next / ", where "chio.next" is a
script that unloads a tape and loads the next tape.  I've attached the
script I use on autoloaders without barcode support.  A better script
would be one that parses the output of "chio status -S drive 0" to
determine which slot to fetch the next tape from.

Homework assignment for any enterprising coders out there:  add the
"next" command to /bin/chio so these kludgey scripts aren't necessary :)

-- 
	Dan Nelson
	dnelson@emsphone.com

--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="chio.next"

#! /usr/local/bin/zsh

# Simple script to load the next tape in the autoloader.  State is kept
# in /var/db/ch0.slot, which holds the *next* slot to use (i.e. set it
# to 1 when you put a new set of tapes in the magazine)  The script
# will return a nonzero exit value if it could not load a new tape.

tapestate=/var/db/ch0.slot

tape=1
[[ -f $tapestate ]] && tape=$(<$tapestate)

# unload the tape already in the drive, but only if we're not
# trying to load slot 1
if (( tape > 1 )) ; then
	echo "Unloading tape $((tape - 1))"
	chio return drive 0
fi

echo "Loading tape $tape"

chio move slot $((tape - 1)) drive 0
err=$?

if (( $err != 0 )) ; then
	exit $err
fi

rm -f $tapestate
echo $((tape + 1)) > $tapestate

exit 0

--/04w6evG8XlLl3ft--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001110010615.A22076>