Re: question about chg-scsi config

2005-11-16 Thread Jon LaBadie
On Wed, Nov 16, 2005 at 07:05:15PM +, Rodrigo Ventura wrote:
> 
> But are all tapes operations non-blocking? The most efficient way
> seems to be to perform all operations in blocking mode, meaning that
> the next operation is performed after finnishing the current one.

The problem is correct action from the drivers.  An example of what
was happening to me, from the command line, not from within amanda.

I'd do two commands like:

$ mt rewind
$ tar x

And I would get an error from tar that the device was not ready,
or did not exist, or ???  I forget the exact message.  The problem
is that the device driver was telling mt the tape was rewound but
I could see it still running.  Even after it stop moving there were
several seconds before the hardware was ready for the next command.

So, "knowing the rewind was complete", mt exited and released the
drive so that tar could begin extracting.  But the drive was not
really ready, so when tar opened it and tried to issue the next
tape command it received an error.

This is the type of delay the sleep is trying to deal with.  A time
when everything says the drive should be ready for the next operation
but it isn't really.

> What happens if one sets sleep to zero?

Set it and find out what happens on your system; then let us know.

I use chg-mtx and had to add some sleeps or increase the sleeps in
that script.  Otherwise it tried to read the next tape header too soon,
thought it was an empty slot or "non-amanda" tape and skipped that slot.

-- 
Jon H. LaBadie  [EMAIL PROTECTED]
 JG Computing
 4455 Province Line Road(609) 252-0159
 Princeton, NJ  08540-4322  (609) 683-7220 (fax)


Re: question about chg-scsi config

2005-11-16 Thread Rodrigo Ventura

But are all tapes operations non-blocking? The most efficient way
seems to be to perform all operations in blocking mode, meaning that
the next operation is performed after finnishing the current one.

Either (1) amtape does everything non-blocking, meaning that the sleep
time must be an upper bound of the worst case sequence of operations,
or (2) amtape does everything in blocking mode, but adds a sleep time
in case commands return before the completion of the operation.

What is the case with amanda?

What happens if one sets sleep to zero?

Cheers,

Rodrigo

-- 

*** Rodrigo Martins de Matos Ventura <[EMAIL PROTECTED]>
***  Web page: http://www.isr.ist.utl.pt/~yoda
***   Teaching Assistant and PhD Student at ISR:
***Instituto de Sistemas e Robotica, Polo de Lisboa
*** Instituto Superior Tecnico, Lisboa, PORTUGAL
*** PGP fingerprint = 0119 AD13 9EEE 264A 3F10  31D3 89B3 C6C4 60C6 4585


Re: question about chg-scsi config

2005-11-15 Thread George Kelbley
When we got our first changer I actually did some timing tests to get a 
rough idea on how long "longest case" rewind-eject-load-calibrate (I'm 
using DLT) took.  Then I starting shaving the time down until I saw 
problems and then bumped the time back up.


Jon LaBadie wrote:

On Tue, Nov 15, 2005 at 02:50:17PM +, Rodrigo Ventura wrote:


What exactlty means the "sleep" configuration parameter in the
changer.conf file? I notice some lag in the tape commands (it seems
the tape is doing nothing, and the amtape is just sleeping...), so
maybe the default value of 90 is too conservative for my system. How
can I safely tune it?



Honestly, the only way is reduce it and see if it causes problems.

If I were to try and "measure" what might be needed, I'd position
a tape about 'half unwound' (fun to try and figure that out on
serpentine tape formats :)  Then I'd type in a rewind with mt,
and while it was rewinding, but before you get a shell prompt,
enter another tape command, say a dd for a gigabyte to /dev/null.
But don't hit the enter key on the dd command until you see the
prompt return from the mt command.  Probably when the prompt
appears, the tape will actually still be rewinding.  However,
immediately upon seeing the prompt hit the return key and notice
how long it takes the tape to begin moving forward.

Some drivers would give an error to status requests during this 
period between the apparent command completion and the actual

"drive ready" condition.  This is the delay for which chg-scsi
is trying to accomodate.  If dd receives an error, keep repeating
the dd command until it does work.

As a fudge factor, I'd double your measured delay.



--
George Kelbley  System Support Group
Computer Science Department University of New Mexico
505-277-6502Fax: 505-277-6927


Re: question about chg-scsi config

2005-11-15 Thread Jon LaBadie
On Tue, Nov 15, 2005 at 02:50:17PM +, Rodrigo Ventura wrote:
> 
> What exactlty means the "sleep" configuration parameter in the
> changer.conf file? I notice some lag in the tape commands (it seems
> the tape is doing nothing, and the amtape is just sleeping...), so
> maybe the default value of 90 is too conservative for my system. How
> can I safely tune it?

Honestly, the only way is reduce it and see if it causes problems.

If I were to try and "measure" what might be needed, I'd position
a tape about 'half unwound' (fun to try and figure that out on
serpentine tape formats :)  Then I'd type in a rewind with mt,
and while it was rewinding, but before you get a shell prompt,
enter another tape command, say a dd for a gigabyte to /dev/null.
But don't hit the enter key on the dd command until you see the
prompt return from the mt command.  Probably when the prompt
appears, the tape will actually still be rewinding.  However,
immediately upon seeing the prompt hit the return key and notice
how long it takes the tape to begin moving forward.

Some drivers would give an error to status requests during this 
period between the apparent command completion and the actual
"drive ready" condition.  This is the delay for which chg-scsi
is trying to accomodate.  If dd receives an error, keep repeating
the dd command until it does work.

As a fudge factor, I'd double your measured delay.

-- 
Jon H. LaBadie  [EMAIL PROTECTED]
 JG Computing
 4455 Province Line Road(609) 252-0159
 Princeton, NJ  08540-4322  (609) 683-7220 (fax)


question about chg-scsi config

2005-11-15 Thread Rodrigo Ventura

What exactlty means the "sleep" configuration parameter in the
changer.conf file? I notice some lag in the tape commands (it seems
the tape is doing nothing, and the amtape is just sleeping...), so
maybe the default value of 90 is too conservative for my system. How
can I safely tune it?

And BTW, are the cleanmax, cleancart, and cleanfile actually used for
automatic tape cleaning? (is such cleaning visible in the amanda
reports?)

Cheers,

Rodrigo

-- 

*** Rodrigo Martins de Matos Ventura <[EMAIL PROTECTED]>
***  Web page: http://www.isr.ist.utl.pt/~yoda
***   Teaching Assistant and PhD Student at ISR:
***Instituto de Sistemas e Robotica, Polo de Lisboa
*** Instituto Superior Tecnico, Lisboa, PORTUGAL
*** PGP fingerprint = 0119 AD13 9EEE 264A 3F10  31D3 89B3 C6C4 60C6 4585