Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-17 Thread Marc Muehlfeld

Hi,

Am 15.04.2011 19:11, schrieb Jean-Louis Martineau:

Can you try the attached patch?


looks good here. An "amdump" now found and used the tape, even with

0 KAS071 reuse BARCODE:KAS071

syntax in the tapelist. Thanks.


Regards,
Marc



--
Marc Muehlfeld (IT-Leiter)
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-780
http://www.medizinische-genetik.de


Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-15 Thread Jean-Louis Martineau

Marc,

Can you try the attached patch?

Jean-Louis

Marc Muehlfeld wrote:

Anything new about this bug?





diff --git a/perl/Amanda/Changer.pm b/perl/Amanda/Changer.pm
index a6857a5..5bc63c6 100644
--- a/perl/Amanda/Changer.pm
+++ b/perl/Amanda/Changer.pm
@@ -185,6 +185,7 @@ has one of the following values:
   volinuse  The requested volume or slot is already in use
   driveinuseAll drives are in use
   unknown   Unknown reason
+  empty The slot is empty
 
 Like types, checks for particular reasons should use the methods, to avoid
 undetected typos:
@@ -1413,7 +1414,7 @@ use overload
 'cmp' => sub { $_[0]->{'message'} cmp $_[1]; };
 
 my %known_err_types = map { ($_, 1) } qw( fatal failed );
-my %known_err_reasons = map { ($_, 1) } qw( notfound invalid notimpl driveinuse volinuse unknown device );
+my %known_err_reasons = map { ($_, 1) } qw( notfound invalid notimpl driveinuse volinuse unknown device empty );
 
 sub new {
 my $class = shift; # ignore class
@@ -1468,6 +1469,7 @@ sub notimpl { $_[0]->failed && $_[0]->{'reason'} eq 'notimpl'; }
 sub driveinuse { $_[0]->failed && $_[0]->{'reason'} eq 'driveinuse'; }
 sub volinuse { $_[0]->failed && $_[0]->{'reason'} eq 'volinuse'; }
 sub unknown { $_[0]->failed && $_[0]->{'reason'} eq 'unknown'; }
+sub empty { $_[0]->failed && $_[0]->{'reason'} eq 'empty'; }
 
 # slot accessor
 sub slot { $_[0]->{'slot'}; }
diff --git a/perl/Amanda/Changer/robot.pm b/perl/Amanda/Changer/robot.pm
index 41919e3..aa53f98 100644
--- a/perl/Amanda/Changer/robot.pm
+++ b/perl/Amanda/Changer/robot.pm
@@ -416,7 +416,7 @@ sub load_unlocked {
 
 	if ($state->{'slots'}->{$slot}->{'state'} eq Amanda::Changer::SLOT_EMPTY) {
 	return $self->make_error("failed", $params{'res_cb'},
-		reason => "notfound",
+		reason => "empty",
 		message => "slot $slot is empty");
 	}
 
diff --git a/perl/Amanda/Taper/Scan/traditional.pm b/perl/Amanda/Taper/Scan/traditional.pm
index 0488742..7a697f8 100644
--- a/perl/Amanda/Taper/Scan/traditional.pm
+++ b/perl/Amanda/Taper/Scan/traditional.pm
@@ -427,6 +427,8 @@ sub stage_2 {
 	# or if we loaded the 'current' slot and it was invalid (this happens if
 	# the user changes 'use-slots', for example
 	$ignore_error = 1 if ($loaded_current && $err->invalid);
+	$ignore_error = 1 if ($loaded_current && $err->notfound);
+	$ignore_error = 1 if ($err->empty);
 
 	if ($ignore_error) {
 		$self->_user_msg(slot_result => 1, err => $err);


Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-15 Thread Marc Muehlfeld

Anything new about this bug?



--
Marc Muehlfeld (IT-Leiter)
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-780
http://www.medizinische-genetik.de


Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-04 Thread Marc Muehlfeld

Am 04.04.2011 19:12, schrieb Jean-Louis Martineau:

Put '0 KAS071 reuse BARCODE:KAS071' in the tapelist

Done.




$ amtape KAS slot 2

slot   2: time X  label KAS071
changed to slot 2



$ amtape KAS taper 



Searching for label 'KAS019': label 'KAS019' not recognized or not found 



slot 2: volume 'KAS071' 



Will write to volume KAS071 in slot 2.






--
Marc Muehlfeld (Leitung Systemadministration)
Zentrum fuer Humangenetik und Labormedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-780
http://www.medizinische-genetik.de


Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-04 Thread Marc Muehlfeld

Am 04.04.2011 14:03, schrieb Nicolino Curalli:

i have a strange error about Amanda.


Please don't hijack other peoples threads!!!

If you want to start your own thread send a *new* mail and never reply 
just to others mails!





--
Marc Muehlfeld (Leitung Systemadministration)
Zentrum fuer Humangenetik und Labormedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-780
http://www.medizinische-genetik.de


Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-04 Thread Jean-Louis Martineau
It looks like the scan of the library stop as soon as it find an empty 
slot, just to be sure, can you try the following:


Put '0 KAS071 reuse BARCODE:KAS071' in the tapelist
$ amtape KAS slot 2  #load the KAS071 tape.
$ amtape KAS taper

Jean-Louis

Marc Muehlfeld wrote:

Am 04.04.2011 13:11, schrieb Jean-Louis Martineau:
Do you know if it is changing the datestamp or removing the barcode 
from the

tapelist that help?


No. Nothing changed or was removed from the tapelist entry.





Can you also post the taperdebug file when it worked, I want to see the
difference.


After I changed the tapelist entry as descriped it worked. This is the 
taper.*.debug from the working amflush then.

http://www.onlyfree.de/php/pasteservice/show.php?id=21608





What's the output of 'amtape KAS inventory'.


tapelist contains currently one labled, unused tape:
0 KAS071 reuse BARCODE:KAS071


$ amtape KAS inventory
slot 1: unknown state
slot 2: label KAS071 barcode KAS071
.





What's the output of 'amtape KAS taper', it should find the tape.


$ amtape KAS taper
Searching for label 'KAS019': label 'KAS019' not recognized or not found
UNKNOWN
ERROR: No acceptable volumes found



If I change the tapelist entry to
2001010100 KAS071 reuse
it returns:

$ amtape KAS taper
Searching for label 'KAS071': found in slot 2: volume 'KAS071'
Will write to volume KAS071 in slot 2.









Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-04 Thread Nicolino Curalli

Hi All,
i have a strange error about Amanda.
I found no solution to this bug.

Amcheck make his job :



amcheck axis
Amanda Tape Server Host Check
-
Holding disk /media/contessa/backup/backup-giornalieri: 833545744 KB 
disk space available, using 41943040 KB as requested





but on kern.log i have:

Apr 4 13:01:24 ambrogio kernel: [ 198.473965] amcheck[6244]: segfault at 
 eip b74cd323 esp bfbf328c error 4


Backup jobs have a successfull conclusion.

can someone help me to solve this problem?


Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-04 Thread Marc Muehlfeld

Am 04.04.2011 13:11, schrieb Jean-Louis Martineau:

Do you know if it is changing the datestamp or removing the barcode from the
tapelist that help?


No. Nothing changed or was removed from the tapelist entry.





Can you also post the taperdebug file when it worked, I want to see the
difference.


After I changed the tapelist entry as descriped it worked. This is the 
taper.*.debug from the working amflush then.

http://www.onlyfree.de/php/pasteservice/show.php?id=21608





What's the output of 'amtape KAS inventory'.


tapelist contains currently one labled, unused tape:
0 KAS071 reuse BARCODE:KAS071


$ amtape KAS inventory
slot 1: unknown state
slot 2: label KAS071 barcode KAS071
.





What's the output of 'amtape KAS taper', it should find the tape.


$ amtape KAS taper
Searching for label 'KAS019': label 'KAS019' not recognized or not found
UNKNOWN
ERROR: No acceptable volumes found



If I change the tapelist entry to
2001010100 KAS071 reuse
it returns:

$ amtape KAS taper
Searching for label 'KAS071': found in slot 2: volume 'KAS071'
Will write to volume KAS071 in slot 2.





--
Marc Muehlfeld (IT-Leiter)
Zentrum fuer Humangenetik und Laboratoriumsmedizin Dr. Klein und Dr. Rost
Lochhamer Str. 29 - D-82152 Martinsried
Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-780
http://www.medizinische-genetik.de


Re: Bug in 3.2.2: No acceptable volumes found for new labled tapes

2011-04-04 Thread Jean-Louis Martineau

Marc,

Do  you know if it is changing the datestamp or removing the barcode 
from the tapelist that help?
Can you also post the taperdebug file when it worked, I want to see the 
difference.


What's the output of 'amtape KAS inventory'.
What's the output of 'amtape KAS taper', it should find the tape.

Jean-Louis

Marc Muehlfeld wrote:

Hi,

I'm running amanda 3.2.2 and encountered the following problem:

I want to flush the holdingdisk content to a new labled tape, but 
amanda always reports "No acceptable volumes found" - but a new labled 
tape is in the changer!



$ amadmin KAS tape
The next Amanda run should go onto tape KAS019 or a new tape.
.
The next 2 new tapes already labelled are: KAS016, KAS071


The changer is having a new labled tape:
$ mtx status | grep KAS016
  Storage Element 3:Full :VolumeTag=KAS016


I found out when I switch the tapelist entry from
   0 KAS016 reuse BARCODE:KAS016
to the style of an used tape, just with an very old date
   200101010 KAS016 reuse
the tape is found and used.


I used a paste service for the taper.*.debug (because the list doesn't 
allow me to attach files): 
http://www.onlyfree.de/php/pasteservice/show.php?id=21607



Regards,
Marc