Amanda-Users

Re: Wait for dumping

2005-09-21 22:50:53
Subject: Re: Wait for dumping
From: "John R. Jackson" <jrj AT purdue DOT edu>
To: Florian Lengyel <flengyel AT gc.cuny DOT edu>
Date: Wed, 21 Sep 2005 21:35:03 -0500
>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

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