Patch attached.
Jean-Louis
Jean-Louis Martineau wrote:
Try the attached patch, it will gives more debug output on stderr.
Which changer script are you using? what is its config?
Jean-Louis
Jean-Francois Malouin wrote:
The amfetchdump debug file must be in /tmp/amanda/server/spantest,
can you send it?
no such file:
find . /tmp/amanda-spantest -name '*fetch*'
returns nothing.
diff -u -r --show-c-function --new-file
--exclude-from=/home/martinea/src.orig/amanda.diff
--ignore-matching-lines='$Id:' amanda-2.5.2/restore-src/restore.c
amanda-2.5.2.tapedev/restore-src/restore.c
--- amanda-2.5.2/restore-src/restore.c 2007-05-04 07:39:06.000000000 -0400
+++ amanda-2.5.2.tapedev/restore-src/restore.c 2007-06-06 15:04:36.000000000
-0400
@@ -1732,6 +1732,7 @@ search_tapes(
/* Suss what tape device we're using, whether there's a changer, etc. */
if(!use_changer || (have_changer = changer_init()) == 0) {
+fprintf(stderr,"aa\n");
if (flags->alt_tapedev) {
cur_tapedev = stralloc(flags->alt_tapedev);
} else if(!cur_tapedev) {
@@ -1744,13 +1745,16 @@ search_tapes(
fprintf(stderr, "%s: Using tapedev %s\n", get_pname(), cur_tapedev);
have_changer = 0;
} else if (have_changer != 1) {
+fprintf(stderr,"bb\n");
error("changer initialization failed: %s", strerror(errno));
/*NOTREACHED*/
}
else{ /* good, the changer works, see what it can do */
+fprintf(stderr,"cc\n");
amfree(curslot);
changer_info(&slots, &curslot, &backwards);
}
+fprintf(stderr,"dd %s\n", cur_tapedev);
if(tapelist && !flags->amidxtaped){
slots = num_entries(tapelist);
@@ -1778,8 +1782,10 @@ search_tapes(
desired_tape = tapelist;
if(use_changer && !cur_tapedev) { /* load current slot */
+fprintf(stderr,"ee %s\n", cur_tapedev);
amfree(curslot);
changer_loadslot("current", &curslot, &cur_tapedev);
+fprintf(stderr,"ff %s\n", cur_tapedev);
}
/*
@@ -1819,6 +1825,7 @@ search_tapes(
label = stralloc(desired_tape->label);
} else {
/* check current_slot */
+fprintf(stderr,"gg %s\n", cur_tapedev);
label = label_of_current_slot(cur_tapedev, prompt_out,
&tapefd, &file, flags,
their_features, &read_result,
@@ -1830,6 +1837,7 @@ search_tapes(
* the right one
* (or just see what the next available one is).
*/
+fprintf(stderr,"hh %s\n", cur_tapedev);
slot = load_next_tape(&cur_tapedev, prompt_out,
backwards, flags,
their_features, desired_tape);
@@ -1843,6 +1851,7 @@ search_tapes(
slot_num += slot;
/* check current_slot */
+fprintf(stderr,"ii %s\n", cur_tapedev);
label = label_of_current_slot(cur_tapedev, prompt_out,
&tapefd, &file, flags,
their_features, &read_result,
@@ -1851,10 +1860,12 @@ search_tapes(
}
if (label == NULL) {
+fprintf(stderr,"jj %s\n", cur_tapedev);
ret = load_manual_tape(&cur_tapedev, prompt_out, prompt_in,
flags,
their_features, desired_tape);
if (ret == 0) {
+fprintf(stderr,"hh %s\n", cur_tapedev);
label = label_of_current_slot(cur_tapedev, prompt_out,
&tapefd, &file, flags,
their_features, &read_result,
Binary files amanda-2.5.2/restore-src/.restore.c.swp and
amanda-2.5.2.tapedev/restore-src/.restore.c.swp differ
|