[rhn-users] Tape control commands

nathan r. hruby nhruby at uga.edu
Fri Feb 18 15:05:23 UTC 2005


On Fri, 18 Feb 2005, Eric Van Steenbergen wrote:

> Hi all,
>
> I have a VXA2 tape unit configured and working under RHEL3. Everything is
> working fine but I'm have no idea of what tapecommands to use. tapecntl
> doesn't work. Any idea? It's a scsi tape drive known on the system as
> /dev/st0.
>

mt -f /dev/st0 $command 
where $command comes from the mt man page, generally you'll use it to
seek, weof, and rewoffl, eject and possibly setblk and setdensity

If this is an autoloader, mtx -f /dev/sg0 $command will shuffle tapes
around inside the autoloader.

A simple script to to do a full backup of /home to a single tape device
(assuming mt saw the desities correctly) would be:

----BEGIN
mt -f /dev/st0 status
if [ $? -ne 0 ]; then
   echo "Tape Offline!"
   exit $?
fi
tar -cpvf /dev/st0 /home
sleep 10
mt -f /dev/st0 rewoffl
# Possibly you'll need an explict eject
# mt -f /dev/st0 eject
----END

Dump is alo included though ext2/3 dump seems to be slightly behind the
times, I'd suggest sticking with GNU tar or star if you can... It's also
way more portable (yes, this is helpful when you have a tar backup on
linux but the only other operational and comaptible tape drive for
restores is attached to a Solaris box :)

If all that seems too complicated, there's a nifty little program called
FlexBackup on sourceforge that is really rather nice for most
simple-to-medium backup needs and Bacula if you need something for big
backup deployments and can't affort TSM, NetBackup, or Legato.  (There are
alsoa number of other smaller players, BackupExpress, Arkelia, LoneTar,
BRU, etc..  I'd say if you can't afford the big boys, stick with
opensource)

Lastly, IIRC, the VXA stuff is helical scan (similar to DDS) tape
technology.  It's cheap and fast but shoe-shining can kill your tapes,
drives and perfromance way quicker, so be sure to try to feed the tape
enough data to keep it streaming constatnly during the backup.  Generally
with direct attached disk to direct attached tape this should not be an
issue, but backing up across the LAN (or doing a backup during peak hours,
etc..) might mean you need to tar to a disk and then untar-retar to tape
on the backup machine or use something like buffer or mbuffer on the
inbetween the client and the tape backup software to ensure there are no
underruns.

And test your restores :)

HTH,

-n
-- 
-------------------------------------------
nathan hruby <nhruby at uga.edu>
uga enterprise information technology services
production systems support
metaphysically wrinkle-free
-------------------------------------------




More information about the rhn-users mailing list