Ok. Thanks for the tip. I was pointing at the wrong changer.

# mtx -f /dev/sg2 status
  Storage Changer /dev/sg2:1 Drives, 20 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 2 Loaded):VolumeTag =
B00039L3                        
      Storage Element 1:Full :VolumeTag=B00023L3                        
      Storage Element 2:Empty
      Storage Element 3:Full :VolumeTag=B00029L3                        
      Storage Element 4:Full :VolumeTag=B00025L3                        
      Storage Element 5:Full :VolumeTag=B00028L3                        
      Storage Element 6:Full :VolumeTag=B00022L3                        
      Storage Element 7:Full :VolumeTag=B00026L3                        
      Storage Element 8:Full :VolumeTag=B00031L3                        
      Storage Element 9:Full :VolumeTag=B00030L3                        
      Storage Element 10:Full :VolumeTag=B00037L3

      Storage Element 11:Full :VolumeTag=B00034L3

      Storage Element 12:Full :VolumeTag=B00035L3

      Storage Element 13:Full :VolumeTag=B00036L3

      Storage Element 14:Full :VolumeTag=B00038L3

      Storage Element 15:Full :VolumeTag=B00032L3

      Storage Element 16:Full :VolumeTag=B00024L3

      Storage Element 17:Full :VolumeTag=B00021L3

      Storage Element 18:Full :VolumeTag=B00020L3

      Storage Element 19:Full :VolumeTag=B00027L3

      Storage Element 20:Full :VolumeTag=B00033L3



# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (10000):
 IM_REP_EN

# /usr/local/bacula-2.2.6/sbin/btape -c
/usr/local/bacula-2.2.6/etc/bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:285 Using device: "/dev/nst0" for writing.
17-Dec 14:06 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
command.
17-Dec 14:06 btape JobId 0: 3302 Autochanger "loaded? drive 0", result
is Slot 2.
17-Dec 14:06 btape: Fatal Error at device.c:296 because:
dev open failed: dev.c:433 Unable to open device "Drive-1" (/dev/nst0):
ERR=Input/output error

17-Dec 14:06 btape JobId 0: Fatal error: butil.c:194 Cannot open
"Drive-1" (/dev/nst0)


----------------------------------------
Robin P. Blanchard
Systems Administrator
Information Technology Outreach Services
Carl Vinson Institute of Government
The University of Georgia
fon 706.542.6295 // fax 706.542.6535
----------------------------------------


-----Original Message-----
From: John Drescher [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 17, 2007 1:52 PM
To: Robin Blanchard
Subject: Re: [Bacula-users] new to bacula; help w/autochanger

On Dec 17, 2007 1:29 PM, Robin Blanchard <[EMAIL PROTECTED]>
wrote:
>
> Bacula 2.2.6 on RHEL5 (2.6.18-53.1.4.el5xen)
>
> # cat /proc/scsi/scsi
> Attached devices:
> Host: scsi0 Channel: 00 Id: 00 Lun: 00
>   Vendor: 3ware    Model: Logical Disk 0   Rev: 1.2
>   Type:   Direct-Access                    ANSI SCSI revision:
ffffffff
> Host: scsi1 Channel: 00 Id: 00 Lun: 00
>   Vendor: 3ware    Model: Logical Disk 0   Rev: 1.2
>   Type:   Direct-Access                    ANSI SCSI revision:
ffffffff
> Host: scsi2 Channel: 00 Id: 00 Lun: 00
>   Vendor: QUALSTAR Model: RLS-8204-20      Rev: 006D
>   Type:   Medium Changer                   ANSI SCSI revision: 02
> Host: scsi2 Channel: 00 Id: 01 Lun: 00
>   Vendor: IBM      Model: ULTRIUM-TD3      Rev: 73P5
>   Type:   Sequential-Access                ANSI SCSI revision: 03
>
>
> Snippet from bacula-sd.conf:
>
> >>>
> Autochanger {
>   Name = Autochanger
>   Device = Drive-1
>   #Device = Drive-2
>   Changer Command = "/usr/local/bacula-2.2.6/scripts/mtx-changer %c %o
> %S %a %d"
>   Changer Device = /dev/sg0
> }
>
> Device {
>   Name = Drive-1
>   Drive Index = 0
>   Media Type = LTO-3
>   Archive Device = /dev/nst0
>   AutomaticMount = yes;
>   AlwaysOpen = yes;
>   RemovableMedia = yes;
>   RandomAccess = no;
>   AutoChanger = yes
>   #Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
>   ##If you have smartctl, enable this, it has more info than tapeinfo
>   ##Alert Command = "sh -c 'smartctl -H -l error %c'"
> }>>>
>
> # /usr/local/bacula-2.2.6/sbin/btape -c
> /usr/local/bacula-2.2.6/etc/bacula-sd.conf /dev/nst0
> Tape block granularity is 1024 bytes.
> btape: butil.c:285 Using device: "/dev/nst0" for writing.
> 17-Dec 13:27 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
> command.
> 17-Dec 13:27 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=0 (Unknown?!)
> mtx: Request Sense: Sense Key=No Sense
> mtx: Request Sense: FileMark=no
> mtx: Request Sense: EOM=no
> mtx: Request Sense: ILI=no
> mtx: Request Sense: Additional Sense Code = 00
> 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
>
> 17-Dec 13:27 btape: Fatal Error at device.c:296 because:
> dev open failed: dev.c:433 Unable to open device "Drive-1"
(/dev/nst0):
> ERR=Input/output error
>
> 17-Dec 13:27 btape JobId 0: Fatal error: butil.c:194 Cannot open
> "Drive-1" (/dev/nst0)
>
>
> ----------------------------------------
> Robin P. Blanchard
> Systems Administrator
> Information Technology Outreach Services
> Carl Vinson Institute of Government
> The University of Georgia
> fon 706.542.6295 // fax 706.542.6535
> ----------------------------------------
>
>
I think you will need to start at a little lower level.

First verify that mtx commands do indeed work

mtx  -f /dev/sg0 status

Then possibly

# mt -f /dev/nst0 status

Do all of this with bacula-st stopped.

John

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to