Amanda-Users

Re: amtapetype

2004-01-20 18:27:07
Subject: Re: amtapetype
From: Antoine Reid <areid AT logient DOT com>
To: gene.heskett AT verizon DOT net, Alastair Neil <ajn AT ite.gmu DOT edu>, donald.ritchey AT exeloncorp DOT com
Date: Tue, 20 Jan 2004 18:24:01 -0500
--On Friday, January 16, 2004 7:21 PM -0500 Gene Heskett <gene.heskett AT verizon DOT net> wrote:

On Friday 16 January 2004 17:16, Alastair Neil wrote:
Yes I was aware, I thought using the device file without the "c" in
it implied no compression.  I have searched in vain for information
about how to turn off compression.

Thats often via a dip-switch setting someplace on the drive.  If you
don't have adequate docs on it, you should contact the vendor.

This is not an amanda problem, but we'll try to help you if any of us
has a drive like that one, I do not myself.

If someone on this list has a DLT-8000, please try to help here with
the specifics.

For the record, I have recently setup Amanda for a customer who bought a brand new Dell PowerEdge 2600 with a Dell provided DLT 40/80 Drive (Identifies itself as: "sa0: <BNCHMARK DLT1 5538> Removable Sequential Access SCSI-2 device"). I did not want to physically change any jumpers. The system is running FreeBSD 5.2-RELEASE.

One of the first test tools I ran (I believe was amtapetype) confirmed hardware compression was indeed active. After doing "/usr/bin/mt -f /dev/nsa0 comp off" the drive would report compression to be disabled. You can check the current setting by doing "/usr/bin/mt -f /dev/nsa0 status". This will not be reset when changing tapes, but will when rebooting the server.

At first, I added the command to /etc/rc.local which seemed to work fine. Unfortunately, it only works when there is a tape in the drive, so rebooting the machine with no tape in the drive will leave it with compression enabled. What I did then is cron the "/usr/bin/mt -f /dev/nsa0 comp off" 5 minutes before running amcheck and also 5 minutes before my amdump. You could also create a wrapper but I didn't bother.


This is what the output of "/usr/bin/mt -f /dev/nsa0 status" looks like:

Mode      Density              Blocksize      bpi      Compression
Current:  same                 variable       0        disabled
---------available modes---------
0:        same                 variable       0        IDRC
1:        same                 variable       0        IDRC
2:        same                 variable       0        IDRC
3:        same                 variable       0        IDRC
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0  Record Number: 1        Residual Count 0

The key here is the "disabled" keyword at the end of the "Current" line. If it did say "IDRC", then compression is still enabled. I suppose I could define a mode with compression and a mode without and just switch between the two but this specific system uses only one type of tapes (bpi settings is superfluous) and a simple "comp off" gave me the results I was looking for.


You can also set the environment variable TAPE to /dev/nsa0 and then mt will work without the -f ... argument. In cron jobs, it might be best to always include it, but for interactive shells, it's a nice timesaver.


For the record, here is the tapetype definition I use:

define tapetype DLT40 {
       comment "BNCHMARK DLT1 5538 with hardware compression off"
       length 38500 mbytes
       filemark 0 kbytes
       speed 2792 kps
}


This is what tapetype had to say:

amanda@fileserv1(p3)(0):~% amtapetype -e 40g -f /dev/nsa0 -t DLT40
Writing 64 Mbyte   compresseable data:  25 sec
Writing 64 Mbyte uncompresseable data:  25 sec
Estimated time to write 2 * 40960 Mbyte: 32000 sec = 8 h 53 min
wrote 1232058 32Kb blocks in 94 files in 14024 seconds (short write)
wrote 1238517 32Kb blocks in 189 files in 14287 seconds (short write)
define tapetype DLT40 {
   comment "just produced by tapetype prog (hardware compression off)"
   length 38602 mbytes
   filemark 0 kbytes
   speed 2792 kps
}
amtapetype -e 40g -f /dev/nsa0 -t DLT40 3.47s user 71.27s system 0% cpu 7:56:36.28 total
amanda@fileserv1(p3)(0):~%


I did reduce the length a bit just to be on the safe side (just in case a filemark really isn't 0 kbytes..)


Hope that helps!

Antoine

--
Antoine Reid
Administrateur Système - System Administrator

         __________________________________________________

Logient Inc.
Solutions de logiciels Internet - Internet Software Solutions
417 St-Pierre, Suite #700
Montréal (Qc) Canada H2Y 2M4
T. 514-282-4118 ext.32
F. 514-288-0033
www.logient.com

*AVIS DE CONFIDENTIALITÉ*
L'information apparaissant dans ce message est légalement privilégiée et
confidentielle. Elle est destinée à l'usage exclusif de son destinataire
tel qu'identifié ci-dessus. Si ce document vous est parvenu par erreur,
soyez par la présente avisé que sa lecture, sa reproduction ou sa
distribution sont strictement interdites. Vous êtes en conséquence prié de
nous aviser immédiatement par téléphone au (514) 282-4118 ou par courriel.
Veuillez de plus détruire le message. Merci.

*CONFIDENTIALITY NOTE*
This message along with any enclosed documents are confidential and are
legally privileged. They are intended only for the person(s) or
organization(s) named above and any other use or disclosure is strictly
forbidden. If this message is received by anyone else, please notify us at
once by telephone (514) 282-4118 or e-mail and destroy this message. Thank
you.



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