Amanda-Users

Re: sdlt220 on Fedora Core 4

2005-10-14 11:19:53
Subject: Re: sdlt220 on Fedora Core 4
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 14 Oct 2005 11:08:18 -0400
On Fri, Oct 14, 2005 at 08:06:19AM -0600, Christopher Davis wrote:
> After much digging around I found a way to always have my tape configured for
> no hardware compression without my constantly having to turn it off.
> 
> Here's what I did.
> 
> I create a /etc/stinit.def file with the following entries:
> 
> # Quantum SDLT220
> manufacturer=QUANTUM model="SuperDLT1" {
> timeout=3600
> long-timeout=14400
> mode1 blocksize=0 density=0x48 compression=1 # SDLT220 density, compression
> on
> mode2 blocksize=0 density=0x48 compression=0 # SDLT220 density, compression
> off
> mode3 blocksize=0 density=0x41 compression=1 # SDLT8000 density, compression
> on
> mode4 blocksize=0 density=0x41 compression=0 # SDLT8000 density, compression
> off
> }
> 
> A amtapetype returned the following:
> 
> define tapetype sdlt220nocomp {
>     comment "just produced by tapetype prog (hardware compression off)"
>     length 109539 mbytes
>     filemark 0 kbytes
>     speed 10351 kps
> }
> 
> 
> This came out of a document I found on the Quantum Website.
> 
> 
> Then I created a script in /etc/init.d linked into /etc/rc5.d called amanda:
> 
> #!/bin/bash
> #
> # amanda        This shell script processes needed commands
> #             to support an amanda server
> #
> # Author:       Chris Davis
> #
> # description:  Configure correct tape devices on system
> # processname:  yum
> 
> # source function library
> . /etc/rc.d/init.d/functions
> 
> 
> RETVAL=0
> 
> start() {
>       echo -n $"Configuring tape devices for amanda: "
>       /sbin/stinit && chmod g+w /dev/*st0*
>       RETVAL=$?
>       echo
> }
> 
> stop() {
>       echo -n $"Nothing to deconfigure for amanda: "
>       RETVAL=$?
>       echo
> }
> 
> restart() {
>       stop
>       start
> }
> 
> case "$1" in
>   start)
>       start
>       ;;
>   stop) 
>       stop
>       ;;
>   *)
>       echo $"Usage: $0 {start|stop}"
>       exit 1
> esac
> 
> exit $RETVAL
> 
> 
> 
> So everytime the box reboots this script calles stinit which reads the
> stinit.def file and makes sure the disk group has write access to the tapes.
> 
> I can then use the devices /dev/nst0l and /dev/st0l (the mode 2 device) and
> hardware compression is always turned off.  When I use a tape for the first
> time I make sure to clean off its header using the script that somebody
> supplied earlier when I was asking about turning hardware compression off.
> 
> 
> This has been working great in my testing - now I just have to find out how to
> set it up correctly for a LTO 1 drive on a different machine.


I very recently came across this in course materials that I'm preparing
to teach.  But I'd not done any testing to report it to the mailing list.

On Fedora Core 3  there is documentation under:

        /usr/share/doc/mt-st-*

One file of interest there is stinit.def.examples which has several
sample stinit.def examples for things like DDS and DLT and ??? drives.

In addition to the standard nst#/st# devices (mode 0 from stinit.def)
and the nst#l/st#l (I beleive that is an ell, not a one) device that
Christopher mentioned, mode 2 and mode 3 are accessed with devices
nst#m/st#m and nst#a/st#a respectively.

The course materials I'm reviewing don't describe this feature as
being RedHat/Fedora Core specific, which it does for lots of other
topics.  So perhaps it is pretty Linux generic.  Anyone else know
of it or using the feature?  It could go a long way in solving the
frequent amanda compression problems to have devices that were
specifically compressing or non-compressing as done in Solaris/HP-UX.


-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>