Bacula-users

Re: [Bacula-users] Problem of configuring Autochanger for Bacula 5.2.13

2014-05-15 07:30:57
Subject: Re: [Bacula-users] Problem of configuring Autochanger for Bacula 5.2.13
From: Josh Fisher <jfisher AT pvct DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 15 May 2014 07:27:48 -0400
On 5/15/2014 1:26 AM, Radosław Korzeniewski 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:

I agree, however he says he is using a two-slot USB disk device. It depends on whether or not this device is a RAID device that mounts at a single mountpoint or two separate physical devices that mount at two different mountpoints. The mentioned virtual autochanger config will work perfectly if the device is a RAID or JBOD device. However if the two drives are presented to the system as two different physical devices then it is more involved because there will be two different mountpoints.

Multiple mountpoints requires that the two Device resource definitions associated with the Autochanger resource use different Media Type values, and of course different Archive Device paths.

Also, the various drives that will be inserted into the (SATA?) slots will have to somehow be made to mount at the correct mountpoint. This will have to be done externally to Bacula using udev or autofs or manual mounting. Each disk used in these slots must always be mounted at the same mountpoint. Otherwise, if the disks are mounted at first one and then the other they will end up containing volumes of both media types. This will get very confusing real fast. In any case, if there are a lot of disks that are swapped in and out of the two slots then it becomes tedious keeping track of which disk is needed when Bacula requests a particular volume be mounted. For these reasons I use the built-in virtual autochanger for fixed disk and vchanger for removable disk.


#
# 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.

best regards
--
Radosław Korzeniewski
radoslaw AT korzeniewski DOT net


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users