Dennis,

The attached patch fix the traditional taperscan bug.

It's hard to say what's wrong with the oldest taperscan without more information:
  - the debug files
  - the changet state file
  - the output of: mtx -f /dev/sg?? status

Jean-Louis

On 01/07/2013 05:00 AM, Dennis Benndorf wrote:
Hello,

I am using Amanda version 3.3.2.svn.5082 with labelstr "^D0[0-9]*$". In Tapelist there are tapes starting with D0 and D1. These tapes are in different libraries and are vaulted with amvault.

Now that the taperscan "oldest" does not really seam to work for us anylonger ( it moans about no acceptable volumes found ), I change taperscan to traditional and got this messages:

amanda@dl380-54:~$ amcheck -t daily
Amanda Tape Server Host Check
-----------------------------
Searching for label 'D10234': label 'D10234' not recognized or not found
slot 129: volume 'D00235' is still active and cannot be overwritten
slot 130: volume 'D00192' is still active and cannot be overwritten
slot 131: volume 'D00193' is still active and cannot be overwritten
slot 132: volume 'D00075'
Will write to volume 'D00075' in slot 132.
NOTE: skipping tape-writable test
Server check took 221.838 seconds

As you can see, it would like to have a D1 tape but lablestr is "^D0[0-9]*$". This is a robot with nearly 700 tapes in it. Sequentail scanning might take some time, in worst case....

Regards,
Dennis

P.S. What might be wrong that taperscan "oldest", which is the better scan-algorithm I think, does not find the tapes, but taperscan "traditional" does?

diff --git a/perl/Amanda/Taper/Scan.pm b/perl/Amanda/Taper/Scan.pm
index 50857b1..7d05c73 100644
--- a/perl/Amanda/Taper/Scan.pm
+++ b/perl/Amanda/Taper/Scan.pm
@@ -338,6 +338,7 @@ sub oldest_reusable_volume {
     for my $tle (@{$self->{'tapelist'}->{'tles'}}) {
 	next unless $tle->{'reuse'};
 	next if $tle->{'datestamp'} eq '0' and !$params{'new_label_ok'};
+	next if $tle->{'label'} !~ $self->{'labelstr'};
 	$num_acceptable++;
 	$best = $tle;
     }

Reply via email to