The driver reports DEVICE_STATUS_DEVICE_ERROR while see below the mt command 
reports EOT.

-- GG 

$  amtapetype   -f /dev/rmt/0n
Applying heuristic check for compression.
blocksize = 32768 blocks written = 14176
blocksize = 32768 blocks written = 14176
Wrote random (uncompressible) data at 7492244.64516129 bytes/sec
Wrote fixed (compressible) data at 35732243.6923077 bytes/sec
Compression: enabled
Writing one file to fill the volume.
blocksize = 32768 blocks written = 12417107
Wrote 406883762176 bytes at 7552 kb/sec
Writing smaller files (4068835328 bytes) to determine filemark.
amtapetype: Error writing label 'amtapetype-2046333855': Error writing block: 
Mysterious short write on tape device: Tried 32768, got 0 at 
/opt/sfw/sbin/amtapetype line 89.

$ mt -f /dev/rmt/0n status
HP Ultrium LTO 3 tape drive:
   sense key(0x13)= EOT   residual= 0   retries= 0
   file no= 2   block no= 0


-----Ursprungligt meddelande-----
Från: [email protected] [mailto:[email protected]] För Dustin J. Mitchell
Skickat: den 21 maj 2010 16:44
Till: Gunnarsson, Gunnar
Kopia: [email protected]
Ämne: Re: amtapetype Amanda 3.1.0beta2

Ah - after the device has encountered an error, it won't give properties 
anymore (case doesn't matter).  Try moving the block_size up in the script:

diff --git a/device-src/amtapetype.pl b/device-src/amtapetype.pl index 
5bd7411..80c0ad7 100644
--- a/device-src/amtapetype.pl
+++ b/device-src/amtapetype.pl
@@ -117,6 +117,9 @@ sub write_one_file(%) {
     my $pattern = $options{'PATTERN'} || 'FIXED';
     my $max_time = $options{'MAX_TIME'} || 0;

+    # get the block size now, while the device is still working
+    my $block_size = $device->property_get("block_size");
+
     # start the device
     my $hdr = Amanda::Header->new();
     $hdr->{type} = $Amanda::Header::F_DUMPFILE; @@ -182,7 +185,6 @@ sub 
write_one_file(%) {

     # OK, we finished, update statistics (even if we saw an error)
     my $blocks_written = $device->block();
-    my $block_size = $device->property_get("block_size");
     $stats->{$pattern}->{BYTES} += $blocks_written * $block_size;
     $stats->{$pattern}->{FILES} += 1;
     $stats->{$pattern}->{TIME}  += $duration;

Let me know if that helps?  Thanks for your patience!

Dustin

--
Open Source Storage Engineer
http://www.zmanda.com

Reply via email to