problem with ide-scsi and IDE tape drive
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines
I originally found this under 2.2.19, and upgraded to 2.4.13 to see if the problem was still there when running more recent code. It is.
mt -f $TAPE rewind
echo "tape 1" | dd conv=sync of=$TAPE bs=$hsize count=1
Quoted 6 lines
for x in 1 2 3; do
mt -f $TAPE rewind
dd if=$TAPE of=/dev/null bs=$hsize
date
tar -c -b 20 -f $TAPE /boot
done
Try "mt fsf" instead dd, see if that helps.
-- Pete
Quoted 14 lines · Pete Zaitcev
Quoted 7 lines
I originally found this under 2.2.19, and upgraded to 2.4.13 to see if the problem was still there when running more recent code. It is.
mt -f $TAPE rewind
echo "tape 1" | dd conv=sync of=$TAPE bs=$hsize count=1Quoted 6 lines
for x in 1 2 3; do
mt -f $TAPE rewind
dd if=$TAPE of=/dev/null bs=$hsize
date
tar -c -b 20 -f $TAPE /boot
done
Quoted 3 lines
Try "mt fsf" instead dd, see if that helps.
-- Pete
dd is not guaranteed toposition you beyond the filemark after the first record. You have to be positioned beyond the filemark to start writing. Pete's suggestion is a good one. "mt fsf" will position the tape beyond the filemark and writing to the tape should work at that point.
Signature · 6 lines
Khalid ==================================================================== Khalid Aziz Linux Systems Operation R&D (970)898-9214 Hewlett-Packard [email protected] Fort Collins, CO
Quoted 9 lines · Khalid Aziz
Quoted 1 line · Pete Zaitcev
Try "mt fsf" instead dd, see if that helps.
dd is not guaranteed toposition you beyond the filemark after the first record. You have to be positioned beyond the filemark to start writing. Pete's suggestion is a good one. "mt fsf" will position the tape beyond the filemark and writing to the tape should work at that point.
Thankyou for the suggestions. However, mt reports that the tape is positioned beyond the filemark before the failed write. Using "mt fsf" doesn't make any difference - the problem still occurs.
sfere# cat t
#! /bin/sh
set -e
TAPE=/dev/nst0
hsize=512
set -x
mt -f $TAPE rewind
echo "tape 1" | dd conv=sync of=$TAPE bs=$hsize count=1
for x in 1 2 3; do
mt -f $TAPE rewind
dd if=$TAPE of=/dev/null bs=$hsize
date
mt -f $TAPE status
tar -c -b 20 -f $TAPE /boot
done
sfere# ./t
+ mt -f /dev/nst0 rewind
+ echo 'tape 1'
+ dd conv=sync of=/dev/nst0 bs=512 count=1
0+1 records in
1+0 records out
+ mt -f /dev/nst0 rewind
+ dd if=/dev/nst0 of=/dev/null bs=512
1+0 records in
1+0 records out
+ date
Wed Oct 31 09:06:24 GMT 2001
+ mt -f /dev/nst0 status
drive type = Generic SCSI-2 tape
drive status = 1191182848
sense key error = 0
residue count = 0
file number = 1
block number = 0
Tape block size 512 bytes. Density code 0x47 (unknown). Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN
+ tar -c -b 20 -f /dev/nst0 /boot
tar: Removing leading `/' from absolute path names in the archive
+ mt -f /dev/nst0 rewind
+ dd if=/dev/nst0 of=/dev/null bs=512
1+0 records in
1+0 records out
+ date
Wed Oct 31 09:06:59 GMT 2001
+ mt -f /dev/nst0 status
drive type = Generic SCSI-2 tape
drive status = 1191182848
sense key error = 0
residue count = 0
file number = 1
block number = 0
Tape block size 512 bytes. Density code 0x47 (unknown). Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN
+ tar -c -b 20 -f /dev/nst0 /boot
tar: Removing leading `/' from absolute path names in the archive
tar: Cannot write to /dev/nst0: I/O error
tar: Error is not recoverable: exiting now
sfere# cat ./t
#! /bin/sh
set -e
TAPE=/dev/nst0
hsize=512
set -x
mt -f $TAPE rewind
echo "tape 1" | dd conv=sync of=$TAPE bs=$hsize count=1
for x in 1 2 3; do
mt -f $TAPE rewind
# dd if=$TAPE of=/dev/null bs=$hsize
mt -f $TAPE fsf
date
mt -f $TAPE status
tar -c -b 20 -f $TAPE /boot
done
sfere# ./t
+ mt -f /dev/nst0 rewind
+ echo 'tape 1'
+ dd conv=sync of=/dev/nst0 bs=512 count=1
0+1 records in
1+0 records out
+ mt -f /dev/nst0 rewind
+ mt -f /dev/nst0 fsf
+ date
Wed Oct 31 09:14:16 GMT 2001
+ mt -f /dev/nst0 status
drive type = Generic SCSI-2 tape
drive status = 1191182848
sense key error = 0
residue count = 0
file number = 1
block number = 0
Tape block size 512 bytes. Density code 0x47 (unknown). Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN
+ tar -c -b 20 -f /dev/nst0 /boot
tar: Removing leading `/' from absolute path names in the archive
+ mt -f /dev/nst0 rewind
+ mt -f /dev/nst0 fsf
+ date
Wed Oct 31 09:14:52 GMT 2001
+ mt -f /dev/nst0 status
drive type = Generic SCSI-2 tape
drive status = 1191182848
sense key error = 0
residue count = 0
file number = 1
block number = 0
Tape block size 512 bytes. Density code 0x47 (unknown). Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN
+ tar -c -b 20 -f /dev/nst0 /boot
tar: Removing leading `/' from absolute path names in the archive
tar: Cannot write to /dev/nst0: I/O error
tar: Error is not recoverable: exiting now
sfere#
ttfn/rjk