Heiko,

This bug is fixed in 3.3.5, but the attached is also needed.

Jean-Louis

On 05/21/2014 08:04 AM, Heiko Schlittermann wrote:
Jean-Louis Martineau <[email protected]> (Mi 21 Mai 2014 13:56:28 CEST):
Heiko,

What's the autolabel setting?
Do you allow config monthly to relabel tape from other config?
No.

Here comes the configuration, with #… lines removed

# AMANDA CONFIGURATION FROM FILE "/etc/amanda/MonthlySet1/amanda.conf":



diff --git a/server-src/amtape.pl b/server-src/amtape.pl
index 0555e6a..bedccd9 100644
--- a/server-src/amtape.pl
+++ b/server-src/amtape.pl
@@ -576,7 +576,7 @@ sub {
 		    print STDERR "slot $params{'err'}->{'slot'}:";
 		}
 		print STDERR " $params{'err'}\n";
-	    } else { # res must be defined
+	    } elsif ($params{'res'}) {
 		my $res = $params{'res'};
 		my $dev = $res->{'device'};
 		if (exists($params{'search_result'})) {
@@ -589,7 +589,9 @@ sub {
 		    } elsif ($params{'does_not_match_labelstr'}) {
 			print STDERR " volume '$volume_label' does not match labelstr '$params{'labelstr'}'\n";
 		    } elsif ($params{'not_in_tapelist'}) {
-			print STDERR " volume '$volume_label' is not in the tapelist\n"
+			print STDERR " volume '$volume_label' is not in the tapelist\n";
+		    } elsif ($params{'relabeled'}) {
+			print STDERR " volume '$volume_label' from another config will be relabeled\n";
 		    } else {
 			print STDERR " volume '$volume_label'\n";
 		    }
@@ -646,8 +648,10 @@ sub {
 
 	my $modestr = ($mode == $ACCESS_APPEND)? "append" : "write";
 	my $slot = $res->{'this_slot'};
-	if (defined $res->{'device'} and defined $res->{'device'}->volume_label()) {
+	if (defined $res->{'device'} and defined $res->{'device'}->volume_label() and $res->{'device'}->volume_label() eq $label) {
 	    print STDERR "Will $modestr to volume '$label' in slot $slot.\n";
+	} elsif (defined $res->{'device'} and defined $res->{'device'}->volume_label()) {
+	    print STDERR "Will $modestr label '$label' to '" . $res->{'device'}->volume_label() . "' labelled volume in slot $slot.\n";
 	} else {
 	    my $header = $res->{'device'}->volume_header();
 	    if ($header->{'type'} == $Amanda::Header::F_WEIRD) {

Reply via email to