Bacula-users

Re: [Bacula-users] Labeling when using native virtual autochanger

2015-09-02 22:12:04
Subject: Re: [Bacula-users] Labeling when using native virtual autochanger
From: Dan Langille <dan AT langille DOT org>
To: "Ana Emília M. Arruda" <emiliaarruda AT gmail DOT com>
Date: Wed, 2 Sep 2015 22:06:56 -0400

On Aug 25, 2015, at 6:55 PM, Ana Emília M. Arruda <emiliaarruda AT gmail DOT com> wrote:

Hello Dan,

Heitor is right :)

Thank you.

Ana: what are you using to quickly test these configurations?  I suspect a VM or similar.


I run tests with exactly your configuration and had the same issue. The drive index 0 must exist and belongs to the autochanger resource. You have an Index 0 drive in your configuration: vRestore. But it is not in the Autochanger definition. If you put it there, it will work:

Autochanger {
Name = VirtualDisk
Changer Device = /dev/null
Changer Command = /dev/null
Device = vRestore, vDrive-1, vDrive-2, vDrive-3, vDrive-4, vDrive-5
}

I tried defining the vRestore drive with "autoselect = no" (this work for physical autochangers). But it seems to make no sense when dealing with virtual disk autochangers.

Do we need vRestore in there?  Instead, I renumbered my Drive Index fields from zero.

Autochanger {
  Name = VirtualDisk

  Changer Device  = /dev/null
  Changer Command = /dev/null

  Device          = vDrive-1, vDrive-2, vDrive-3, vDrive-4, vDrive-5
}

Device {
  Name           = vDrive-1
  Media Type     = File
  Archive Device = /usr/local/bacula/volumes
  LabelMedia     = yes
  Random Access  = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen     = no

  Autochanger    = yes
  Drive Index    = 0

  Maximum Concurrent Jobs = 1
  Volume Poll Interval    = 15
}

Device {
  Name           = vDrive-2
...same as above
  Autochanger    = yes
  Drive Index    = 1

  Maximum Concurrent Jobs = 1
  Volume Poll Interval    = 15
}

Device {
  Name           = vDrive-3
...same as above
  Autochanger    = yes
  Drive Index    = 2

  Maximum Concurrent Jobs = 1
  Volume Poll Interval    = 15
}

Device {
  Name           = vDrive-4
...same as above
  Autochanger    = yes
  Drive Index    = 3

  Maximum Concurrent Jobs = 1
  Volume Poll Interval    = 15
}

Device {
  Name           = vDrive-5
...same as above
  Autochanger    = yes
  Drive Index    = 4

  Maximum Concurrent Jobs = 25
  Volume Poll Interval    = 15
}



Having a single drive for restores worked for me. I was able to restore files from jobs/volumes that used the autochanger for backup.
 
​​
Device {
Name = Restore
​-Drive​
Media Type = File
Archive Device = /usr/local/bacula/volumes
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = yes
AlwaysOpen = yes
​​
}

I have this in my bacula-sd.conf:

Device {
  Name           = Restore-Drive
  Media Type     = File
  Archive Device = /usr/local/bacula/volumes
  LabelMedia     = yes
  Random Access  = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen     = no

  Maximum Concurrent Jobs = 1
  Volume Poll Interval    = 15
}

When I run a restore job, it selects vDrive-1 automatically.

How did you get the restore to use Restore-Drive?


Best regards,
Ana


On Tue, Aug 25, 2015 at 6:15 PM, Dan Langille <dan AT langille DOT org> wrote:

> On Aug 25, 2015, at 5:13 PM, Heitor Faria <heitor AT bacula.com DOT br> wrote:
>
>>> Dan,
>>>
>>> At a glance I think you must have a "Drive Index=0" at the universe of drives of
>>> your autochanger.
>>>
>>> "Device = vDrive-1, vDrive-2, vDrive-3, vDrive-4, vDrive-5"
>>
>> I never considered that I needed to start indexing my drives from zero.  Hmm.
>> Thank you.  I will look into that.
>
> It is just a wild shot from a non-developer.

Do not undervalue that.  :)

> But with some user perception of C plus Kern's elegant and merciless coding I think it would worth a try. =P

I'll have a look soon.  Thanks.


Dan Langille
http://langille.org/






------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

— 
Dan Langille





------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users