Amanda-Users

RE: Wait for dumping

2005-09-22 01:43:40
Subject: RE: Wait for dumping
From: "Lengyel, Florian" <FLengyel AT gc.cuny DOT edu>
To: <amanda-users AT amanda DOT org>
Date: Thu, 22 Sep 2005 01:34:17 -0400

Resend, with unforgivable typos corrected.

-----Original Message-----
From: John R. Jackson [mailto:jrj AT purdue DOT edu]
Sent: Wed 9/21/2005 10:35 PM
To: Lengyel, Florian
Cc: amanda-users AT amanda DOT org
Subject: Re: Wait for dumping

>mt -f /dev/nst0 compression off
>
>[by the way, the argument "off" is worth a small fortune in
>consulting fees, since it has to be guessed]

Yeah, I've been down that path, too.  In my case, I wanted to turn
compression *on* and absolutely nothing I tried worked.  And you're
absolutely right that the documentation for this particular area is,
shall we say, minimal.

So, compliments of the wonders of open source, I went to the actual code.
Turns out the "value" for any mt "command" (e.g. "fsf") is handled by a
common routine that uses atoi(), i.e. it has to be a number.  This makes
some sense because most of time you're doing things like "mt fsf 5".

Tried "mt compression 1" and everything got happy (and '0' turned it
back off again).

I don't recall what Linux flavor this was -- Debian something or another
as a guess.

What confused things so much was that both "on" and "off" turned
compression off.  The reason is passing "on" to atoi() returns zero
since it just stops converting at the first non-digit character.

Which is why I always use strtol (et al) and gripe mercilessly if someone
tries to hand in "garbage" :-).

>-F

JJ

And here I was ready to believe that the argument to
mt commands had to confirm to some obscure, machine-independent
"W3C MAGTAPE-XML" specification.* **


The epilogue to my war story is that, according to the manual,
the jaundiced amber tape changer LED on my Spectra Logic 2K wasn't
amber because the unit needed a cleaning tape. The manual doesn't
mention that the unit would cease to function, even after
power-cycling, if the unit needs a cleaning tape.
According to the manual, an amber led on the tape picker
means that the drive isn't ready for use; they suggest checking
SCSI connections and terminations. No joy. Of course, the connector
and terminator were reversed, if you believe the manual. 
For some reason, the cleaning tape worked.

F

PS. The asterisks refer to the following scholarly footnotes.

*One day, Motorola will invent a chip that requires XML in its data registers.

**I didn't actually find a reference to "compression off" in
Latvian--might have been German.

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