Bacula-users

Re: [Bacula-users] cannot access tape device

2008-05-13 16:28:04
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: Tue, 13 May 2008 22:01:41 +0200
Randy,

please see below for comments.

Attila

Randy Schultz wrote:
> Heya,
> 
> Being new to bacula(and autochangers), this may be largely PEBCAK but I cannot
> get btape to talk to my autochanger.
> 
> The hardware is a Dell Powervault 124T with 1 drive, and shows up as:
> root dude ? camcontrol devlist
>     <QUANTUM ULTRIUM 3 2023>           at scbus0 target 6 lun 0 (sa0,pass0)
>     <DELL PV-124T 0053>                at scbus0 target 6 lun 1 (ch0,pass1)
> 
> tapeinfo shows:
>     root dude ? tapeinfo -f /dev/pass0
>     Product Type: Tape Drive
>     Vendor ID: 'QUANTUM '
>     Product ID: 'ULTRIUM 3       '
>     Revision: '2023'
>     Attached Changer API: No
>     SerialNumber: 'JN0746AME50728'
>     MinBlock: 1
>     MaxBlock: 16777215
>     Ready: no
> 
>     root dude ? tapeinfo -f /dev/pass1
>     Product Type: Medium Changer
>     Vendor ID: 'DELL    '
>     Product ID: 'PV-124T         '
>     Revision: '0053'
>     Attached Changer API: No
>     SerialNumber: 'CK8CCD5299'
>     Ready: yes
> 
> 
> As I read this, pass1, or ch0, is the autochanger and pass0, or sa0, is the
> actual drive.  From this I have in my bacula-sd.conf:
>     Autochanger {
>       Name = Autochanger
>       Device = Drive-1
>       Changer Command = "/usr/local/share/bacula/mtx-changer %c %o %S %a %d"
>       Changer Device = /dev/pass1
>     }
> 
>     Device {
>       Name = Drive-1                      #
>       Drive Index = 0
>       Media Type = "Ultrium 2"
>       Archive Device = /dev/pass0

Change this to Archive Device = /dev/nsa0

The raw scsi device is only needed by mtx to control the changer.


>       AutomaticMount = yes;               # when device opened, read it
>       AlwaysOpen = yes;
>       RemovableMedia = yes;
>       RandomAccess = no;
>       AutoChanger = yes
>       #
>       # Enable the Alert command only if you have the mtx package loaded
>       # Note, apparently on some systems, tapeinfo resets the SCSI controller
>       #  thus if you turn this on, make sure it does not reset your SCSI
>       #  controller.  I have never had any problems, and smartctl does
>       #  not seem to cause such problems.
>       #
>       Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
>     }
> 
> When I issue a simple btape command I get:
>     root dude ? btape -c /usr/local/etc/bacula-sd.conf /dev/pass0
>     Tape block granularity is 1024 bytes.
>     btape: butil.c:285 Using device: "/dev/pass0" for writing.
>     13-May 13:59 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
>     command.
>     13-May 13:59 btape JobId 0: 3302 Autochanger "loaded? drive 0", result:
>     nothing loaded.
>     13-May 14:04 btape: Fatal Error at device.c:297 because:
>     dev open failed: dev.c:433 Unable to open device "Drive-1" (/dev/pass0):
>     ERR=Operation not permitted
> 
>     13-May 14:04 btape JobId 0: Fatal error: butil.c:194 Cannot open "Drive-1"
>     (/dev/pass0)
> 
> 
> Seeing that btape was trying to issue an autochanger command I swapped the
> Archive Device/Changer Device settings.  This seemed wrong but I'm easy.  This
> gave me a different error:
>     root dude ? btape -c /usr/local/etc/bacula-sd.conf /dev/pass1
>     Tape block granularity is 1024 bytes.
>     btape: butil.c:285 Using device: "/dev/pass1" for writing.
>     13-May 14:13 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
>     command.
>     13-May 14:13 btape JobId 0: 3991 Bad autochanger "loaded? drive 0" 
> command:
>     ERR=Child exited with code 1.
>     Results=mtx: Request Sense: Long Report=yes
>     mtx: Request Sense: Valid Residual=no
>     mtx: Request Sense: Error Code=70 (Current)
>     mtx: Request Sense: Sense Key=Illegal Request
>     mtx: Request Sense: FileMark=no
>     mtx: Request Sense: EOM=no
>     mtx: Request Sense: ILI=no
>     mtx: Request Sense: Additional Sense Code = 20
>     mtx: Request Sense: Additional Sense Qualifier = 00
>     mtx: Request Sense: BPV=no
>     mtx: Request Sense: Error in CDB=no
>     mtx: Request Sense: SKSV=no
>     READ ELEMENT STATUS Command Failed
> 
>     13-May 14:18 btape: Fatal Error at device.c:297 because:
>     dev open failed: dev.c:433 Unable to open device "Drive-1" (/dev/pass1):
>     ERR=Operation not permitted
> 
>     13-May 14:18 btape JobId 0: Fatal error: butil.c:194 Cannot open "Drive-1"
>     (/dev/pass1)
> 
> 
> This makes sense because bacula is is now talking to the changer and not
> directly to the drive, I think(due to the "Issuing autochanger" output).
> 
> The console on the PV124T says it's loaded and ready to go.  My
> /etc/devfs.conf contains:
>     own     pass0   root:bacula
>     perm    pass0   0666
>     own     pass1   root:bacula
>     perm    pass1   0666
> 
> 
> Any idea what I'm missing?
> 
> --
>   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