In the message dated: Thu, 26 Jul 2007 08:48:46 PDT, The pithy ruminations from Mike Vasquez on <[Bacula-users] Setting up a Dell PV 132T> were: => => I am trying to migrate my bacula system to a newer machine. I have installed => bacula with mysql with no problems. I installed a Dell PV 132 T to this
I've also got an PV132T, which I've been using with bacula for about a year. => machine and ran "cat /proc/scsi/scsi" and got the following results: => Attached devices: => Host: scsi0 Channel: 00 Id: 06 Lun: 00 => Vendor: PE/PV Model: 1x6 SCSI BP Rev: 1.0 => Type: Processor ANSI SCSI revision: 02 => Host: scsi0 Channel: 02 Id: 00 Lun: 00 => Vendor: MegaRAID Model: LD 0 RAID1 279G Rev: 521X => Type: Direct-Access ANSI SCSI revision: 02 => Host: scsi1 Channel: 00 Id: 06 Lun: 00 => Vendor: IBM Model: ULTRIUM-TD2 Rev: 333K => Type: Sequential-Access ANSI SCSI revision: 03 => => Then when I run the command "mtx -f /dev/sg2 inquiry," I get the following Um, why are you using /dev/sg2? There isn't necessarily a relationship between the SCSI channel number or even the device listing in /proc/scsi/scsi and the SG number. If you've installed the sg3_utils package, try using sg_map. On my server, the assignment of the tape changer to an SG device is not fixed...the SG number will change depending on which (and how many) SAN devices were detected at boot time, whether other SCSI devices are present, and whether any devices have been manually added or removed (by sending the SCSI "add-single-device" or "remove-single-device" commands to /proc/scsi/scsi). See: http://www.linux.org/docs/ldp/howto/SCSI-2.4-HOWTO/sg.html I find it very helpful to set up symbolic links from: /dev/tape0 ==> the "0" tape drive in the changer /dev/tape1 ==> the "1" tape drive in the changer /dev/changer ==> the tape changer device These are set at boot time, so that the configs for bacula and other tools can always refer to the same devices, regardless of the /dev/sg numbering. I use the following script to assist with setting the links: =========================================================================== #! /bin/bash -x # Shell script to create the /dev/changer symlink to the correct device. This is necessary # because the /dev/sg* devices can (and do) change their targets upon reboot. if [ -z $CREATECHANGERATTEMPTS ] ; then CREATECHANGERATTEMPTS=0 fi if [ $CREATECHANGERATTEMPTS -gt 1 ] ; then echo "$0: error. Could not determine the /dev/sg\* device connected to the autochanger. /dev/changer not created." exit 1 else CREATECHANGERATTEMPTS=$((CREATECHANGERATTEMPTS + 1)) export CREATECHANGERATTEMPTS if [ -e /dev/changer -a ! -h /dev/changer ]; then echo "$0: error. /dev/changer exists but is not a symlink" exit 1 fi rm -f /dev/changer # Walk through the /dev/sg* devices, running the mtx command. Upon success, create # the link for device in /dev/sg* do mtx -f $device status 1> /dev/null 2>&1 # mtx -f $device status 1> /tmp/create_changer.out 2> /dev/create_changer.errs if [ $? = 0 ] ; then ln -s $device /dev/changer exit 0 fi done # We can only get here if the attempt failed...in that case...try: # # force the HBA to rescan the devices # # adding any devices that aren't registered with the OS # # do a SCSI reset on those devices # Collect the initial sg_map, so that we can determine any new devices sgmapBEFORE=`sg_map | cut -f1 -d" "` # Find the correct host number for the HBA: hostnum=`cd /proc/scsi/qla2300; ls [0-9]*` bus=0 # force a rescan echo "scsi-qlascan" > /proc/scsi/qla2300/$hostnum # Find all the devices that are not registered with the OS: grep "\*" /proc/scsi/qla2300/$hostnum | grep flags | while read line do id=`echo $line | sed -e "s/:.*//" -e "s/.* //"` lun=`echo $line | sed -e "s/).*//" -e "s/.* //"` echo "scsi add-single-device $hostnum $bus $id $lun " > /proc/scsi/scsi done sgmapAFTER=`sg_map | cut -f1 -d" "` sgmapADDL=`echo $sgmapBEFORE $sgmapAFTER | tr " " "\012" | sort | uniq -u` if [ -z $sgmapADDL ] ; then echo "No new /dev/sg devices created" exit 1 fi for dev in $sgmapADDL do sg_reset $dev done # Now, re-run this script $0 fi =========================================================================== => 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 => INQUIRY Command Failed => => Would anyone know the cause of this error? I have the device set at the => factory default settings except I have turned off the scanner, since I don't => have any barcodes. => => TIA => Mike => ---- Mark Bergman [EMAIL PROTECTED] System Administrator Section of Biomedical Image Analysis 215-662-7310 Department of Radiology, University of Pennsylvania http://pgpkeys.pca.dfn.de:11371/pks/lookup?search=mark.bergman%40.uphs.upenn.edu ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users