Hi,

I've been using Bacula successfully at several small businesses for single 
server backups for about 2 years and love it.

I have not used Bacula with an autochanger before (except to use the changer as 
a single tape drive), and am having trouble setting up a 4 slot DDS3 changer.

The btape tests work fine, including the autochanger tests.

When I try to use the label command from bconsole, I get the following errors:

Connecting to Director backup1:9101
1000 OK: backup1-dir Version: 1.38.11 (28 June 2006)
Enter a period to cancel a command.
*label
Using default Catalog name=MyCatalog DB=bacula
The defined Storage resources are:
    1: File
    2: DDS3CHANGER
Select Storage resource (1-2): 2
Connecting to Storage daemon DDS3CHANGER at backup1:9103 ...
Enter new Volume name: servers.002
Enter slot (0 or Enter for none): 2
Automatically selected Pool: Default
Connecting to Storage daemon DDS3CHANGER at backup1:9103 ...
Sending label command for Volume "servers.002" Slot 2 ...
3301 Issuing autochanger "loaded drive 0" command.
3991 Bad autochanger "loaded drive 0" command: ERR=Child exited with code 1.
3301 Issuing autochanger "loaded drive 0" command.
3991 Bad autochanger "loaded drive 0" command: ERR=Child exited with code 1.
3304 Issuing autochanger "load slot 2, drive 0" command.
3992 Bad autochanger "load slot 2, drive 0": ERR=Child exited with code 1.
Label command failed for Volume servers.002.
Do not forget to mount the drive!!!

Initially, none of the 2 parameter autochanger commands from the 
documentation's "Testing the Autochanger and Adapting Your mtx-changer Script" 
would work.  The commands with 5 paramters worked fine.  I commented out the 
"check parameter count on commandline" and "# Check for special cases where 
only 2 arguments are needed, ..." sections of mtx-changer to see what would 
happen, and then all the commands from the "Testing the Autochanger..." section 
worked.  However, I still get the above errors whether those sections of 
mtx-changer are commented out or not.

Then, I found the documentation section, "Autochanger Errors", that showed the 
"3992 Bad autochanger "load slot 1, drive 1": ERR=Child exited with code 1." is 
due to permissions.  So, I set the bacula user to be able to login, (changed 
shell from "/sbin/nologin" to "/bin/bash"), logged in as bacula and ran the 
commands from "Testing the Autochanger and Adapting Your mtx-changer Script", 
and they ran fine, so I don't think it's permissions.

My _guess_ at this point is that it's either:
 1) something to do with the the number of command paramters
 2) something to do with how Bacula sends the commands that's different from 
the test commands.

Any insight or suggestions would be greatly appreciated.

Thanks in advance,

Jack D. Browning

My Setup:

- CentOS 4.4 (running in a VMware Virtual Machine (VM) on top of VMware Server 
running on CentOS 4.4.)
- Bacula from bacula-postgresql-1.38.11-3.el4.i386.rpm
- PostgreSQL from CentOS rpms: postgresql-7.4.13-2.RHEL4.1

SCSI permissions on VM guest (where Bacula is running):
 crw-rw-rw-  1 root disk    21,   1 Dec 25 09:13 sg1
    (connected to /dev/sga on the VM host)
SCSI permissions on VM host, for device VM guest connects to (where VM guest is 
running):
 crw-rw-rw-  1 root disk    21,   0 Dec 24 10:25 sg0
 lrwxrwxrwx  1 root root          3 Dec 24 10:25 sga -> sg0


Section of bacula-sd.conf:

Autochanger {
 Name = DDS3CHANGER
 Device = DDS-3-1
 Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" 
 Changer Device = /dev/sg1
}

Device {
 Name = DDS-3-1                        # 
 Drive Index = 0
 Device Type = Tape
 Media Type = DDS-3
 Archive Device = /dev/nst0
 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
 Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
}


Section of bacula-dir.conf:

# Definition of DDS tape storage device
Storage {
 Name = DDS3CHANGER
 Address = backup1                # N.B. Use a fully qualified name here
 SDPort = 9103
 Password = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"      # password for Storage 
daemon
 Device = DDS3CHANGER                # must be same as Device in Storage daemon
 Media Type = DDS-3                  # must be same as MediaType in Storage 
daemon
 Autochanger = yes                   # enable for autochanger device
}


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to