Steven,

I committed the attached patch which will not report DATA-ERROR error if there is a problem with the changer.

Jean-Louis

On 12/30/2013 08:19 AM, Jean-Louis Martineau wrote:
On 12/29/2013 09:29 AM, Steven Backus wrote:
amcheck-device.20131227152134.debug:

Fri Dec 27 15:21:34 2013: thd-0x62799e0: amcheck-device: pid 5437 ruid 0 euid 0 version 3.3.5: start at Fri Dec 27 15:21:34 2013 Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: pid 5437 ruid 0 euid 0 version 3.3.5: rename at Fri Dec 27 15:21:35 2013 Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: Amanda::Changer::compat initialized with script /local/libexec/amanda/chg-zd-mtx, temporary directory /local/etc/amanda/gen Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: Amanda::Taper::Scan::traditional stage 1: search for oldest reusable volume Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: Amanda::Taper::Scan::traditional oldest reusable volume is 'gen051' Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: Amanda::Changer::compat: invoking /local/libexec/amanda/chg-zd-mtx with -info Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: Amanda::Changer::compat: Got response '<none> mtx: Request Sense: Long Report=yes' with exit status 2 Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: new Amanda::Changer::Error: type='fatal', message='mtx: Request Sense: Long Report=yes' Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: Amanda::Taper::Scan::traditional result: error=mtx: Request Sense: Long Report=yes Fri Dec 27 15:21:35 2013: thd-0x62799e0: amcheck-device: pid 5437 finish time Fri Dec 27 15:21:35 2013


mtx fail, look in the chg-zd-mtx debug file for the reason.

I suggest you stop using chg-zd-mtx and start using chg-robot, it should be as simple as adding the following to amanda.conf:

  define changer my_robot {
    tpchanger "chg-robot:/dev/sg??"
    changerfile "/etc/amanda/gen/chg-robot.state"
    property "tape-device" "0=tape:/dev/nst?"
    property "use-slots" "1-??"
    property "verbose" "yes"
    device-property "LEOM" "TRUE"
  }
  tpchanger "my_robot"

Replace the '?' by your device values and slot.

Jean-Louis

diff --git a/server-src/amcheck.c b/server-src/amcheck.c
index 2b0e9e6..f709e02 100644
--- a/server-src/amcheck.c
+++ b/server-src/amcheck.c
@@ -81,8 +81,8 @@ static am_feature_t *our_features = NULL;
 static char *our_feature_string = NULL;
 static char *displayunit;
 static long int unitdivisor;
-static gboolean dev_amanda_data_path = FALSE;
-static gboolean dev_directtcp_data_path = FALSE;
+static gboolean dev_amanda_data_path = TRUE;
+static gboolean dev_directtcp_data_path = TRUE;
 
 static int client_verbose = FALSE;
 static gboolean exact_match = FALSE;
@@ -662,6 +662,8 @@ static gboolean test_tape_status(FILE * outf) {
 	while ((line = agets(dev_outf)) != NULL) {
 	    if (strncmp(line, "DATA-PATH", 9) == 0) {
 		char *c = line;
+		dev_amanda_data_path = FALSE;
+		dev_directtcp_data_path = FALSE;
 		while ((c = strchr(c, ' ')) != NULL) {
 		    c++;
 		    if (strncmp(c, "AMANDA", 6) == 0) {

Reply via email to