Bacula-users

Re: [Bacula-users] Bacula 7 will only see the first storage resource in bacula-dir.conf

2014-07-16 11:29:11
Subject: Re: [Bacula-users] Bacula 7 will only see the first storage resource in bacula-dir.conf
From: Kern Sibbald <kern AT sibbald DOT com>
To: Joe Rhodes <lists AT joerhodes DOT com>, bacula-users AT lists.sourceforge DOT net
Date: Wed, 16 Jul 2014 17:25:46 +0200
Hello,

I suggest you read the new features for 7.0 in the manual.  The fourth item talks specifically about the status sd command.  I see absolutely nothing wrong with your config file or with what Bacula is doing.   As the manual says, if you enter:

status select storage

you will probably get what you expected, but you will also get "duplicate" entries listed.

Best regards,
Kern

On 07/16/2014 05:01 AM, Joe Rhodes wrote:
Hey everyone!

I’m running Bacula 7.0.4 on Ubuntu 14.04.  I’m backing up to two different devices.  One is a hot-swap hard drive bay which I’m treating as a changer using the vchanger program.   These drives get changed out and rotated off site.   The other is a fixed drive.  The two devices will use two distinct pools.

The issue I’m having is that no matter what I do, Bacula seems to see the FIRST storage resource only.  This ultimately causes problems because bacula will look to the wrong device for volumes associated with the pool the job calls for.

I have a similar setup on a Bacula 5.2 setup that is working great.  So I’m not sure what I’m doing wrong.  Config files look the same between the two.   If anyone has some suggestions, I’d be eternally grateful.

The stanza’s from bacula-dir.com:

#########################################################################
#
# Storage
#
#########################################################################

# Definition of file Virtual Autochanger device
Storage {
  Name = removeable-drives
  Address = 10.11.1.2      # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "RoundHouseBackup"
  Device = ExternalDrives
  Media Type = File
  Maximum Concurrent Jobs = 1        # run up to 10 jobs a the same time
}

Storage {
  Name = LocalStorage
  Address = 10.11.1.2      # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "RoundHouseBackup"
  Device = LocalStorage
  Media Type = File1
  Maximum Concurrent Jobs = 1        # run up to 10 jobs a the same time
}


And the stanza’s from my bacula-sd.conf:


# Define a Virtual autochanger
#
Autochanger {
  Name = ExternalDrives
  Device = ExternalDrives-Drive1
  Changer Command = "/usr/local/bin/vchanger -u root  %c %o %S %a %d"
  Changer Device = "/etc/bacula/vchanger1.conf"
}

Device {
  Name = ExternalDrives-Drive1
  DriveIndex = 0
  Autochanger = yes
  DeviceType = File
  Media Type = File
  Archive Device = /var/lib/bacula/removeable-drives/0/drive0
  #LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 5;
  Maximum Volume Size = 476250 MB;  # with 8 volumes per drive, this should leave about 
                                # 4,800 MB free for other things, or about 0.125%
}

Device {
  Name = LocalStorage
  Device Type = File
  Media Type = File1
  Archive Device = /mnt/localstorage/
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Volume Size = 237500 MB
}


When I execute “status sd” in bconsole, I get this:


*status sd
Automatically selected Storage: removeable-drives
Connecting to Storage daemon removeable-drives at 10.11.1.2:9103

mail.roundhouse.local-sd Version: 7.0.4 (04 June 2014) x86_64-unknown-linux-gnu ubuntu 14.04
Daemon started 15-Jul-14 21:55. Jobs: run=0, running=0.
 Heap: heap=270,336 smbytes=198,653 max_bytes=354,151 bufs=88 max_bufs=90
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 mode=0,0

Running Jobs:
No Jobs running.
====

Device status:
Autochanger "ExternalDrives" with devices:
   "ExternalDrives-Drive1" (/var/lib/bacula/removeable-drives/0/drive0)

Device "ExternalDrives-Drive1" (/var/lib/bacula/removeable-drives/0/drive0) is not open.
    Drive 0 is not loaded.
==

Device "LocalStorage" (/mnt/localstorage/) is not open.
==
====

Used Volume status:
====



If I swap the order of the two “Storage” stanza’s in bacula-dir.cong, I get this:



*status sd
Automatically selected Storage: LocalStorage
Connecting to Storage daemon LocalStorage at 10.11.1.2:9103

mail.roundhouse.local-sd Version: 7.0.4 (04 June 2014) x86_64-unknown-linux-gnu ubuntu 14.04
Daemon started 15-Jul-14 21:55. Jobs: run=0, running=0.
 Heap: heap=270,336 smbytes=199,230 max_bytes=354,151 bufs=89 max_bufs=91
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 mode=0,0

Running Jobs:
No Jobs running.
====

...

Device status:
Autochanger "ExternalDrives" with devices:
   "ExternalDrives-Drive1" (/var/lib/bacula/removeable-drives/0/drive0)

Device "ExternalDrives-Drive1" (/var/lib/bacula/removeable-drives/0/drive0) is not open.
    Drive 0 is not loaded.
==

Device "LocalStorage" (/mnt/localstorage/) is not open.
==
====

Used Volume status:


Notice how the “Automatically selected Storage:” line changes?  It just picks the first one and seems to ignore the other.  On the 5.2 install, I get a sub menu asking which Storage I want to get status on:

*status sd
The defined Storage resources are:
     1: File
     2: LocalStorage
Select Storage resource (1-2): 1


Hopefully someone can see what I’m doing wrong here.

Thanks!
-Joe








------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds


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

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>