Skip to contentSkip to conversation

unable to read from IDE tape

DISCUSSION John Guthrie 2 participants 2 messages Jul 4, 2001 – Jul 5, 2001

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Note: the following is my reply to a private reply to my initial post regarding my problem reading from my tape drive. I thought that this info might be helpful on the mailing list as well.

Quoted 4 lines · Willem Riede
Quoted 3 lines · John Guthrie

Hi all,

Quoted 8 lines
Quoted 5 lines

Lately, I have been having problems reading from from my HP Colorado IDE tape drive. I can use mt to get the status of the drive and to forward the drive to a different file. I can even use tar to write to the tape. But whenever I try to read the tar files that I have written to tape, I get an I/O error, and there doesn't even seem to be any attempt by the

Can you be more specific, and post exactly what commands you issued after inserting the tape, and what error you get when, including any log messages?

First, I run

mt rewind

just to get the tape back to the beginning. (I think that I may have /dev/tape as asymlink to /dev/nht0, not /dev/ht0.) Then just as a test, I can do something like

tar -cvf /dev/nht0 /boot

This command actually runs fine with no errors. If I then run

mt status

I get the output

SCSI 2 tape drive:
File number=0, block number=16841, partition=0. Tape block size 512 bytes. Density code 0x0 (default). Soft error count since last status=0
General status bits on (0):

At least the block number is non-zero as I should expect it to be since I did the tar to /dev/nht0. If I then run

mt rewind; mt status

I get the output

SCSI 2 tape drive:
File number=0, block number=0, partition=0. Tape block size 512 bytes. Density code 0x0 (default). Soft error count since last status=0
General status bits on (0):

So now the block number is at 0, which is good since I did just rewind the thing. At this point, I would expect (perhaps mistakenly) that I should be able to run the following

tar -tf /dev/ht0

The output of this command is

tar: /dev/ht0: Cannot read: Input/output error
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

Quoted 7 lines
Quoted 4 lines

driver to read the tape. This is currently happening under 2.4.5, and has been happening undeer at least 2.4.2 and 2.4.3, I think it was also happening under 2.4.1 as well.

Can you verify that (by rebooting to previous kernels if you still have them)? Does it happen with all your tapes?

This is the same error that I have gotten from both 2.4.2 and 2.4.3. It definitely happens with all of my tapes including my new ones. (Due to circumstanes of my setup, I can't verify 2.4.1 this exact minute, but I can get back to you on that.)

I am also getting the following lines of dmesg output:

ide-tape: Reached idetape_chrdev_open
ide-tape: ht0: I/O error, pc = 8, key = 5, asc = 2c, ascq = 0

I don't know if this helps. Apparently IDETAPE_DEBUG_LOG is set to 1 by default. Which actually results in a large number of copies of the first line. I only get the second line when I try to open the tape for reading.

Quoted 1 line

Regards. Willem Riede.

John Guthrie
[email protected]

#1 lore raw

Upgrade to mt-st version .5b or greater. Older mt versions had known bugs particularly with positioning. I suggest scsi emulation + scsi tape rather than ATAPI tape.

rgds,
tim.

...
hdd: HP COLORADO 20GB, ATAPI TAPE drive
...
scsi0 : SCSI host adapter emulation for IDE ATAPI devices scsi : 1 host.
Vendor: HP Model: COLORADO 20GB Rev: 4.01
Type: Sequential-Access ANSI SCSI revision: 02
Detected scsi tape st0 at scsi0, channel 0, id 0, lun 0
...

[17:12] abit:/etc/dump > mt -v
mt-st v. 0.5b
[17:12] abit:/etc/dump > tar --version | head -1
tar (GNU tar) 1.13.17
[17:12] abit:/etc/dump > ls -l /dev/tape
lrwxrwxrwx 1 root root 4 Jul 14 2000 /dev/tape ->
nst0
[17:12] abit:/etc/dump > mt status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x47 (unknown to this mt). Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
[17:12] abit:/etc/dump > tar cvf /dev/tape /boot
tar: Removing leading `/' from member names
boot/
boot/kernel.h
boot/vmlinuz-2.2.14-12
boot/vmlinuz.prev
boot/System.map.prev
boot/linux-2.2.14-12
boot/linux-prev
boot/linux-2.2.20p6ai
boot/module-info
boot/boot.b
boot/chain.b
...
[17:12] abit:/etc/dump > mt status
SCSI 2 tape drive:
File number=1, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x47 (unknown to this mt). Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN
[17:12] abit:/etc/dump > mt tell
At block 11421.
[17:12] abit:/etc/dump > mt rewind
[17:13] abit:/etc/dump > mt status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x47 (unknown to this mt). Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
[17:13] abit:/etc/dump > mt tell
At block 0.
[17:13] abit:/etc/dump > tar tvf /dev/tape
drwxr-xr-x root/root 0 2001-06-25 22:21:52 boot/
-rw-r--r-- root/root 237 2001-05-03 23:04:36 boot/kernel.h
-r--r--r-- root/root 589225 2000-05-09 05:43:45
boot/vmlinuz-2.2.14-12
-rw-rw-r-- root/root 606292 2001-06-25 18:08:21 boot/vmlinuz.prev
-rw-rw-r-- root/root 195903 2001-06-25 18:08:21 boot/System.map.prev
lrwxrwxrwx root/root 0 2001-05-03 23:10:10 boot/linux-2.2.14-12
-> vmlinuz-2.2.14-12
lrwxrwxrwx root/root 0 2001-06-25 18:08:21 boot/linux-prev ->
vmlinuz.prev
lrwxrwxrwx root/root 0 2001-06-25 18:08:21 boot/linux-2.2.20p6ai
-> vmlinuz-2.2.20p6ai-0625-18:08:09
lrwxrwxrwx root/root 0 2000-04-10 21:15:54 boot/module-info ->
module-info-2.2.14-5.0
-rw-r--r-- root/root 4568 2000-02-02 14:03:10 boot/boot.b
-rw-r--r-- root/root 612 2000-02-02 14:03:10 boot/chain.b
...
[17:13] abit:/etc/dump > mt tell
At block 11420.
[17:14] abit:/etc/dump > mt status
SCSI 2 tape drive:
File number=0, block number=11420, partition=0.
Tape block size 512 bytes. Density code 0x47 (unknown to this mt). Soft error count since last status=0
General status bits on (1010000):
ONLINE IM_REP_EN
[17:14] abit:/etc/dump > mt fsf 1
[17:14] abit:/etc/dump > mt tell
At block 11421.
[17:14] abit:/etc/dump > mt status
SCSI 2 tape drive:
File number=1, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x47 (unknown to this mt). Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN

--