Amanda-Users

Re: newbie questions about setting up amanda

2005-05-13 13:57:38
Subject: Re: newbie questions about setting up amanda
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 13 May 2005 19:41:47 +0200
Stefan G. Weichinger wrote:
Hi, Matt,

on Freitag, 13. Mai 2005 at 16:03 you wrote to amanda-users:

MH> If you are using software to disable compression, and you are using DDS
MH> tapes, you will want to look in the archives for Gene Heskett's script that
MH> rewrites tapes...DDS stores compression on/off flags on the tape itself, so
MH> disabling the compression on your drive may not be enough.

I have read several postings regarding that DDS-tape-issue, describing
why and how to reset these tapes. I have heard pros and cons and would
like to ask all of you how I could sum up this topic for the
AMANDA-docs. If this is an issue that comes up for amanda-users when
using DDS-drives (and it seems to be so) then we should document this
in the docs. I am ready to do that, I just ask for your help to get
all the facts straight.


Actually it has nothing to do with DDS-tapes.

On Solaris, you have different device names that control how to
write to tape (low density, medium density, high density, with or
without compression -- because most modern devices have no density
difference, people believe there is only a difference between with
or without compression).
The name is important when you write to a tape.

But when you read from a tape, the OS (or tapedrive itself, I don't
know) can easily see that you are trying to read a tape with or
without compressed format, or low or high density, by just checking
the builtin error control:  when reading in the wrong setting,
the result is garbage, full of errors.

When you're near the tapedrive, you can even hear it try out the
different settings for the first read.

On Solaris, when writing on a tape, Solaris does know what to do
depending on the device name.  However, when you have e.g.
a compressed tape, and you skip to end of file, and then append
to tape, Solaris also sets the settings to the current settings
and keeps these, and ignores the settings implied by tapedevicename.

On linux, there is no setting implied by device name (*).  So
when you read something from a tape, the settings become those
of the tape. Everything you write then, are in these settings.
Even with when writing from the beginning.

The trick is to set whatever you want with "mt", and then write
to the tape without any reading of that tape.
The trouble is that amcheck, amdump first read the tape
to verify its label, and then start writing.
Since 2.4.4 amlabel does the same thing.

So the only solution is to write some garbage using dd or
any program that does not read before writing to tape.

(*) In Linux there is a not-well documented file /etc/stinit.def
that has potential to accomplish the same thing as Soliaris:
different devicenames, having different settings.  At least
that's what I think.
But I never got there to investigate this decently.
Any clear explanation here would be welcome.


PS very fast typed, because I need to go home...

--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************