[2185] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: Problems switching between DDS tapes of different length

daemon@ATHENA.MIT.EDU (Eckard Koch)
Mon Jul 21 05:49:14 1997

To: Pete Popov <pete@jones.asd.sel.sony.com>
Cc: linux-scsi@vger.rutgers.edu, linux-tape@vger.rutgers.edu
From: Eckard Koch <czkec@ocag.ch>
Date: 	21 Jul 1997 11:41:47 +0200
In-Reply-To: Pete Popov's message of Fri, 18 Jul 1997 13:17:01 -0700

Pete Popov <pete@jones.asd.sel.sony.com> writes:

> What exactly happens when you try to read 90m tapes?  Does the
> drive report some type of Check Condition?  If so, what's the 
> sense data?  It sounds like you have both, 90m and 120m tapes
> in the autoloader magazine, correct?  What's the test command
> sequence?
> 
> Pete
> 
> 

	Due to your questions I was going again trough the whole
procedures. In the end I found out that my problem is not caused by
different tape length but by the backup software changing the
block size for its own tapes. Sending "mt -f /dev/nst0 setblk 0" to
the tape cured the problem. 

	Although the problem is solved I still don't really understand
what is happening here. Especially the output of the different tape
tools is a bit confusing (block size, blocking-factor), may be it's
just my misinterpretation. Would you be so kind to comment on what is
happening below?

-----------------------------------------------------------------------
	Here is the test setup and the diagnostics I get when trying
to reproduce the reported problem. I have an autoloader magazine
loaded with one 90m (slot 1) tape and five 120m tapes (slots 2-6)..
Hardware compression is switched off by software (mt-dds comp-off).
The same tar archive has been written to the 90m tape and one of the
120m tapes. The system has been rebooted.

 $> mtx -f /dev/nst0 first

 $> mt -f /dev/nst0 status (90m tape)
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

 $> mt-dds -f /dev/nst0 tell (90m tape)
first block number is 0
block size is 20
block length is 10240		
 
 $> tar tvf /dev/nst0 
drwxr-xr-x amanda/sys        0 1997-07-21 07:54 amanda/
drwxr-xr-x amanda/sys        0 1997-05-29 10:19 amanda/snp/
drwxr-x--- amanda/sys        0 1997-07-16 16:39 amanda/bin/
-rwsr-x--- root/sys     104975 1997-03-25 17:43 amanda/bin/gtar
lrwxrwxrwx root/sys          0 1997-03-19 07:00 amanda/bin/load_tape
 ...
		
 $> mtx -f /dev/nst0 next (loading the 120m tape)

 $> mt -f /dev/nst0 status (120m tape)
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x24 (DDS-2).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

 $> mt-dds -f /dev/nst0 tell (120m tape)
first block number is 0
block size is 20
block length is 10240

 $> tar tvf /dev/nst0 (120m tape)
drwxr-xr-x amanda/sys        0 1997-07-21 07:54 amanda/
drwxr-xr-x amanda/sys        0 1997-05-29 10:19 amanda/snp/
drwxr-x--- amanda/sys        0 1997-07-16 16:39 amanda/bin/
-rwsr-x--- root/sys     104975 1997-03-25 17:43 amanda/bin/gtar
lrwxrwxrwx root/sys          0 1997-03-19 07:00 amanda/bin/load_tape
 ...

	So far so good. Changing back and forth between these two tape
does not trigger the problem. I found out today that the problem
caused by the specific backup software (Amanda) I am using. This
software changes the block size to 64. Loading such a tape mt-dds
delivers the following output.

 $> mt-dds -f /dev/nst0 tell (120m Amanda Tape) 
first block number is 0
block size is 64
block length is 32768

	The backup usually starts with labeling the tape:

 $> amlabel test test_VOL3

	Having done so and changing back to one of the tapes
with tar archives on it everything attempt to read the tape
produces I/O errors and the syslog says:
	
 kernel: st0: Incorrect block size.

	The tape itself seems to detected correctly:

 $> mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 32768 bytes. Density code 0x24 (DDS-2).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

	This applies to tar and dd as well as mt and mt-dds
commands trying to set the block size to 20.

 $> tar tv --blocking-factor=20 -f /dev/nst0 
tar: Read error on /dev/nst0: I/O error
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

 $> dd if=/dev/nst0 bs=20
dd: /dev/nst0: I/O error
0+0 records in
0+0 records out

 $> mt-dds -b 20 -f /dev/nst0 tell
dds2tar: I/O error
		
	Finally, the solution to the problem is:

 $> mt -f /dev/nst0 setblk 0

Thanks,

	Eckard
-- 
------------------------------------------------------------------
Eckard Koch                 		  email : czkec@ocag.ch 
Contraves Space; W-EE3                            ekoch@access.ch
------------------------------------------------------------------

home help back first fref pref prev next nref lref last post