From owner-freebsd-questions Thu Nov 9 23: 6:22 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id A45F037B479 for ; Thu, 9 Nov 2000 23:06:18 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.1/8.11.1) id eAA76F619212; Fri, 10 Nov 2000 01:06:15 -0600 (CST) (envelope-from dan) Date: Fri, 10 Nov 2000 01:06:15 -0600 From: Dan Nelson To: Lanny Baron Cc: FreeBSD Questions Subject: Re: multiple tape backups Message-ID: <20001110010615.A22076@dan.emsphone.com> References: <20001107144649.C5188@sydney.worldwide.lemis.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <20001107144649.C5188@sydney.worldwide.lemis.com>; from "Greg Lehey" on Tue Nov 7 14:46:49 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --/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