Bacula fails on FreeBSD 10.x / "mt fsf" infinitely proceeds
Joerg Wunsch
frebsd-scsi at uriah.heep.sax.de
Thu Jul 31 20:17:45 UTC 2014
As Joerg Wunsch wrote:
> Next attempt: in saerror(), rather than basing the decision whether
> this status report belongs to a read/write or control operation on
> some CCB flag that needs to be set explicitly, base it on the actual
> command that led to the status report (SA_READ or SA_WRITE
> vs. anything else). A similar decision is already done in saerror().
Now, tested for real, too.
I am content with that patch, and would be willing to commit it.
Note that much of the changes there are whitespace changes only since
I removed a switch/case statement where Alexander Motin only left a
single case in, so a large block of code is unindented by one TAB now.
Here's a typescript of handling a real Bacula tape with the suggested
patch.
Script started on Thu Jul 31 21:58:26 2014
root at uriah:/tmp # mt stat
Mode Density Blocksize bpi Compression
Current: 0x41:DLTapeIV(40GB) variable 98250 IDRC
---------available modes---------
0: 0x41:DLTapeIV(40GB) variable 98250 IDRC
1: 0x41:DLTapeIV(40GB) variable 98250 IDRC
2: 0x41:DLTapeIV(40GB) variable 98250 IDRC
3: 0x41:DLTapeIV(40GB) variable 98250 IDRC
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0 Record Number: 0 Residual Count 0
root at uriah:/tmp # mt fsf 32767
root at uriah:/tmp # mt stat
Mode Density Blocksize bpi Compression
Current: 0x41:DLTapeIV(40GB) variable 98250 IDRC
---------available modes---------
0: 0x41:DLTapeIV(40GB) variable 98250 IDRC
1: 0x41:DLTapeIV(40GB) variable 98250 IDRC
2: 0x41:DLTapeIV(40GB) variable 98250 IDRC
3: 0x41:DLTapeIV(40GB) variable 98250 IDRC
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 49 Record Number: 0 Residual Count 0
root at uriah:/tmp # mt errstat
Last I/O Residual: 0
Last I/O Command: 08 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00
Last I/O Sense:
F0 00 20 FF FF 24 00 16 00 00 00 01 00 00 00 00
00 00 80 08 B7 00 00 8B AB 00 96 30 C7 00 00 00
Last Control Residual: 0
Last Control Command: 11 01 00 7F FF 00 00 00 00 00 00 00 00 00 00 00
Last Control Sense:
F0 00 08 00 00 7F CE 16 00 0A 19 B2 00 05 00 00
00 00 80 08 B7 00 00 8B AB 00 18 C7 BA 00 00 00
root at uriah:/tmp # mt rewind
root at uriah:/tmp # exit
exit
Script done on Thu Jul 31 22:02:15 2014
--
cheers, Joerg .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)
More information about the freebsd-scsi
mailing list