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