Bacula-users

Re: [Bacula-users] multiple mtx-changer scripts

2008-07-22 17:47:35
Subject: Re: [Bacula-users] multiple mtx-changer scripts
From: Mark Nienberg <gmane AT tippingmar DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 22 Jul 2008 14:47:12 -0700
John Drescher wrote:

> Thanks. I see that now. I assume that you are never near the tape
> drive when this happens to see if the drive goes online and the starts
> processing. I know that vxa drives do some type of error checking at
> the beginning of a load.
> 
> I am thinking of several possible solutions for this problem (reading
> the part tape fsf ... in mtx-changer) but they all seem to have a snag
> or two.

I'm grateful for your thinking.  Keep it up.

> Can you modify the mtx-changer script so that after the wait_for_drive
> returns successful that it will echo the entire status of the mt
> status command to a log? It would be interesting to see what the drive
> was doing and if it was anything different than a successful load.

OK, I've modified the script as you suggested.  Here is the sample output from 
a 
successful mount command.  I have not yet captured an unsuccessful one with the 
improved logging.  Maybe they only happen in the middle of the night!

20080722-14:32:47 ---Started with Parms: /dev/sg3 load 7 /dev/nst0 0
20080722-14:32:47 Doing libTool /dev/sg3 -m s7 d1
20080722-14:33:16 libTool load returned 0
20080722-14:33:16 entered wait_for_drive
20080722-14:33:26 39 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:33:36 49 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:33:46 59 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:33:56 69 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:34:06 79 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:34:16 89 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:34:26 99 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:34:36 109 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:34:46 119 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:34:56 129 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:35:06 139 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:35:16 149 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:35:26 159 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:35:36 169 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:35:46 179 sec - mt status for /dev/nst0 returned  IM_REP_EN
20080722-14:35:57 189 sec - mt status for /dev/nst0 returned  BOT ONLINE 
IM_REP_EN
20080722-14:35:57 The full mt status after final check is:
20080722-14:35:57 SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x82 (DLT 20GB uncompressed).
Soft error count since last status=0
General status bits on (41010000):
  BOT ONLINE IM_REP_EN
20080722-14:35:57 Waiting 30 sec for good measure
20080722-14:36:27 Elapsed time from start to drive ready: 220 sec
20080722-14:36:27 Attempting to read bacula label on tape in drive

     --note the following entries come from btape calling--
20080722-14:36:27 ---Started with Parms: /dev/sg3 loaded 0 /dev/nst0 0
20080722-14:36:27 Doing mtx -f /dev/sg3 status -- to find what is loaded
20080722-14:36:27 ---Started with Parms: /dev/sg3 loaded 0 /dev/nst0 0
20080722-14:36:27 Doing mtx -f /dev/sg3 status -- to find what is loaded

    --ok, back now to output from the mount--
20080722-14:36:39 read bacula label A0000008
20080722-14:36:39 read label, so load succeeded
20080722-14:36:39 ---Started with Parms: /dev/sg3 loaded 7 /dev/nst0 0
20080722-14:36:39 Doing mtx -f /dev/sg3 status -- to find what is loaded

Mark


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users