Bacula-users

Re: [Bacula-users] cannot access tape device

2008-05-15 16:22:01
Subject: Re: [Bacula-users] cannot access tape device
From: Attila Fülöp <lichtscheu AT gesindel DOT org>
To: Bacula-users AT lists.sourceforge DOT net
Date: Thu, 15 May 2008 20:16:11 +0200
Randy,

Randy Schultz wrote:
> On Tue, 13 May 2008, Attila Fülöp spaketh thusly:
> 
> -}Mh,
> -}
> -}what does ls -l /usr/local/share/bacula/mtx-changer reports? IIRC it got 
> installed
> -}as root:root on my setup whereas it should be bacula:bacula.
> 
> root dude ? ls -l /usr/local/share/bacula/mtx-changer
> -rwxr-xr--  1 bacula  bacula  5559 May  7 13:17
> /usr/local/share/bacula/mtx-changer
> 
> -}
> -}Does "mtx -f /dev/pass1 status" produce reasonable output (as root/bacula)?
> 
> root dude ? mtx -f /dev/pass1 status
>   Storage Changer /dev/pass1:1 Drives, 8 Slots ( 0 Import/Export )
> Data Transfer Element 0:Empty
>       Storage Element 1:Empty
>       Storage Element 2:Full :VolumeTag=000001L3
>       Storage Element 3:Empty
>       Storage Element 4:Empty
>       Storage Element 5:Empty
>       Storage Element 6:Empty
>       Storage Element 7:Empty
>       Storage Element 8:Empty
> 
> -}
> -}What does "/usr/local/share/bacula/mtx-changer /dev/pass1 list" show?
> -}I assume your changer has a barcode reader. If not try "slots" instead of 
> "list"
> 
> Yupper:
> root dude ? /usr/local/share/bacula/mtx-changer /dev/pass1 list
> 2:000001L3

This all looks good, the strange thing is that you definitely have a problem 
with
mtx:

 >   13-May 16:49 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
 >   command.
 >   13-May 16:49 btape JobId 0: 3991 Bad autochanger "loaded? drive 0" command:
 >   ERR=Child exited with code 1.

I have no real idea whats going on here, maybe you had the wrong changer device 
in your
config file. You could test with

/usr/local/share/bacula/mtx-changer /dev/pass1 loaded 0 /dev/nsa0.0 0

and then do thesteps below.

> Is there perhaps some config file that btape uses that I have not yet
> configured?  I had thought that with none of the daemons running that all I
> would need to work with to get btape working is bacula-sd.conf.  Does btape
> need anything out of bacula-dir.conf or any other config?  The bacula-sd.conf
> says to make sure dird.conf has any changes made to the Media Type keyphrase.
> I have mine set to "Ultrium 2" using the info at
>    
> http://www.bacula.org/manuals/en/concepts/concepts/Supported_Tape_Drives.html
> but as I'm new here I may have mis-interpreted something.

No I don't think so. I had to run the btape tests yesterday since I did a major
upgrade of my OS (mail is soon to follow). So now I know what I'm talking about 
;-)
The first problem you have is that, at least under FreeBSD, btape can't access 
the
tape drive without a  tape in it. I would suggest the following procedure:

        - place two blank tapes into slots 1 + 2, btape looks for them there.
        - load the first tape: mtx -f /dev/pass1 load 1 and wait for the changer
           to settle
        - run btape, it should now have no problem with the tape drive.
        - run the test command, it will test the changer as well
         - run the fill test

HTH

> -}
> -}BTW i have
> -}own     pass4   bacula:operator
> -}perm    pass4   0660
> -}
> -}you should at least change the perm from 0666 to 0660. Same holds for the
> -}sa0.0 device.
> 
> Yeah, I thought of doing this but since right now I'm the only one on the
> system with firewalling turned on, I figured it was reasonably safe until I
> can get the bloomin' thing running.  I'm just being lazy on that but tnx for
> the smack upside the head.   ;>
> 
> --
>  Randy    (schulra AT earlham DOT edu)      765.983.1283         <*>
> 
> Love with your heart, think with your head;  not the other way around.
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft 
> Defy all challenges. Microsoft(R) Visual Studio 2008. 
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users