Re: [Bacula-users] Problem of configuring Autochanger for Bacula 5.2.13
2014-05-27 07:32:21
Hi Radoslaw,
I am trying to backup data to two HDDs using two USB dockings. I tried the configurations as below but still failed.
#bacula-sd.conf Autochanger { Name = usb-changer-1 Device = usb-changer-1-drive-0 Device = usb-changer-1-drive-1 Changer Command = "" #if not added, got error Changer Device = /dev/null #if not added, got error }
Device { Name = usb-changer-1-drive-0 Drive Index = 0 Autochanger = yes; Device Type = File Media Type = Disk Archive Device = /mnt/usbdocking1 LabelMedia = yes; Random Access = Yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = yes; Maximum Concurrent Jobs = 5 }
Device { Name = usb-changer-1-drive-1 Drive Index = 1 Autochanger = yes; Device Type = File Media Type = Disk #Archive Device = /mnt/usbdocking1 Archive Device = /mnt/usbdocking2 LabelMedia = yes; Random Access = Yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = yes; Maximum Concurrent Jobs = 5 }
#bacula-dir.conf
JobDefs { Name = "TestJob" Type = Backup Level = Full Client = bacula-fd FileSet = "Test Backup" Storage = usbchanger1 Messages = Standard Pool = TestPool Priority = 11 }
Storage { Name = usbchanger1 Address = localhost SDPort = 9103 Password = "WfYdG2,/8P" Device = usb-changer-1 Media Type = File Autochanger = yes; }
Pool { Name = TestPool Pool Type = Backup Recycle = no AutoPrune = yes Volume Retention = 7 days Label Format = Test- }
#Error 27-May 19:18 bacula-dir JobId 867:
Start Backup JobId 867, Job=TestBkup.2014-05-27_19.18.40_03 27-May 19:18 bacula-sd JobId 867: Fatal error: Device reservation failed for JobId=867: 27-May 19:18 bacula-dir JobId 867: Fatal error: Storage daemon didn't accept Device "usb-changer-1" because: 3924 Device "usb-changer-1" not in SD Device resources or no matching Media Type. 27-May 19:18 bacula-dir JobId 867: Error: Bacula bacula-dir 5.2.13 (19Jan13): Build OS: x86_64-unknown-linux-gnu redhat JobId: 867
Job: TestBkup.2014-05-27_19.18.40_03 Backup Level: Full Client: "bacula-fd" 5.2.13 (19Jan13) x86_64-unknown-linux-gnu,redhat, FileSet: "Test Backup" 2014-05-27 12:40:48 Pool: "TestPool" (From Job resource) Catalog: "MyCatalog" (From Client resource) Storage: "usbchanger1" (From Job resource) Scheduled time: 27-May-2014 19:18:38 Start time: 27-May-2014 19:18:42 End time: 27-May-2014 19:18:42 Elapsed time: 0 secs Priority: 11 FD Files Written: 0 SD Files Written: 0
FD Bytes Written: 0 (0 B) SD Bytes Written: 0 (0 B) Rate: 0.0 KB/s Software Compression: None VSS: no Encryption: no Accurate: no Volume name(s): Volume Session Id: 1 Volume Session Time: 1401189512 Last Volume Bytes: 0 (0 B) Non-fatal FD errors: 1 SD Errors: 0 FD termination status: SD termination status: Termination: *** Backup Error ***
When changed Media Type from "Disk" to "File', I could run the job but a new volume was created on usbdocking1 but not usbdocking2 when HDD is full on usbdocking1? If using same archive device (e.g. usbdocking1), it won't backup on to another even the HDD is full. Any hints? Thanks in advance!
Regards, Keith
On Thursday, May 15, 2014 1:26 PM, Radosław Korzeniewski <radoslaw AT korzeniewski DOT net> wrote: Hello,
2014-05-13 13:26 GMT+02:00 Keith T <keithbacu AT yahoo DOT com>:
Thanks all for your reply and informative document!
As stated on my previous message, I was using root to run bacula services and assumed it has no privilege issue. But not sure whether I have to run as bacula ID since I saw some suggested to do so?
root 14419 1 4 May08 ? 06:03:09 /sbin/bacula-sd -v -c /etc/bacula/bacula-sd.conf root 14440 1 25 May08 ? 1-07:39:19 /sbin/bacula-fd -v -c /etc/bacula/bacula-fd.conf root 14463 1 0 May08 ? 00:02:01 /sbin/bacula-dir -v -c
/etc/bacula/bacula-dir.conf
I wonder why the command prompted me to check "sg device" but not "sd device" since I was connected a USB docking with dual slots.
Recap:
#Bacula is running as root
[root@backupsys bacula]# /etc/bacula/mtx-changer /etc/bacula/usbchanger1.conf list /etc/bacula/usbchanger1.conf is not an sg device, or old sg driver
In My Very Humble Opinion you are going in the wrong way!!! Stop before someone gets hurt. :)
First of all. Do you have a tape library or autochanger connected into your Bacula server? Could you show an output of the command (run as root):
# lsscsi -g
If you do not have any tape library then please forget about mtx-changer script. It is for tape library/autochanger not disks. In this case (hard disk storage) you should use a very simple configuration, i.e. for two virtual devices:
# # An autochanger device # Autochanger {
Name = disk-storage Device = File-Storage-0 Device = File-Storage-1
}
Device { Name = File-Storage-0
Media Type = disk Device Type = File Archive Device = /backup/volumes
Automatic Mount = yes; AlwaysOpen = yes; RemovableMedia = no;
RandomAccess = yes; Drive Index = 0 AutoChanger = yes
Label Media = yes Maximum Concurrent Jobs = 1
}
Device { Name = File-Storage-1 Media Type = disk
Device Type = File Archive Device = /backup/volumes Automatic Mount = yes;
AlwaysOpen = yes; RemovableMedia = no; RandomAccess = yes;
Drive Index = 1 AutoChanger = yes Label Media = yes
Maximum Concurrent Jobs = 1
}
Thats all. You need to tune Archive Device parameter to suits your needs. And works like a charm.
------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk _______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
|
|