Bacula-users

Re: [Bacula-users] Device

2011-06-28 16:41:37
Subject: Re: [Bacula-users] Device
From: Josh Fisher <jfisher AT pvct DOT com>
To: Mike Hobbs <mhobbs AT mtl.mit DOT edu>
Date: Tue, 28 Jun 2011 16:38:55 -0400
On 6/28/2011 2:23 PM, Mike Hobbs wrote:
> I'm almost ready with putting bacula into production but I'm still
> debugging a few things and one of them is the "Device" line in my bacula
> mail reports, and I was hoping someone could help me with this.
>
> I'm running disk-based backups.  Bacula 5.0.3, Vchanger 0.8.6 and a
> 16-bay Promise jbod.
>
> In my bacula-sd.conf file, I have these configurations:
>
> Autochanger {
>     Name = backup2-vchanger
>     Device = jbod1-drive-1
>     Device = jbod1-drive-2
>     Device = jbod1-drive-3
>     Device = jbod1-drive-4
>     Device = jbod1-drive-5
>     Device = jbod1-drive-6
>     Device = jbod1-drive-7
>     Device = jbod1-drive-8
>     Device = jbod1-drive-9
>     Device = jbod1-drive-10
>     Device = jbod1-drive-11
>     Device = jbod1-drive-12
>     Device = jbod1-drive-13
>     Device = jbod1-drive-14
>     Device = jbod1-drive-15
>     Device = jbod1-drive-16
>     Changer Command = "/usr/local/vchanger/bin/vchanger %c %o %S %a %d"
>     Changer Device = "/usr/local/bacula/etc/vchanger.conf"
> }
>
> Device {
>     Name = jbod1-drive-1
>     DriveIndex = 0
>     Autochanger = yes;
>     DeviceType = File
>     MediaType = File
>     ArchiveDevice = /usr/local/bacula/working/backup2-vchanger/0/drive0
>     RemovableMedia = no;
>     RandomAccess = yes;
> }
>
> Device {
>     Name = jbod1-drive-2
>     DriveIndex = 1
>     Autochanger = yes;
>     DeviceType = File
>     MediaType = File
>     ArchiveDevice = /usr/local/bacula/working/backup2-vchanger/1/drive1
>     RemovableMedia = no;
>     RandomAccess = yes;
> }
>
> etc..
>
> I have a Device entry for each of my 16 drives (I am not even sure this
> is necessary because I am using the autochanger config above).

It isn't necessary. jbod1-drive-1, jbod1-drive-2, etc. are virtual 
drives. The ArchiveDevice path in each virtual drive contains a symlink. 
The symlink is created by vchanger to point to the folder containing the 
volume file that is to be used. Any of the virtual drives may be 
"loaded" with a volume from any of the "magazines" (ie physical drives). 
It is possible for all 16 of your virtual drives to be simultaneously 
writing to different volume files on the same physical drive. It just 
depends on which volumes are being used. vchanger knows which physical 
drive those volumes are on and sets the symlink for the SD device 
accordingly when Bacula issues the load command to load a volume into a 
SD device. With vchanger, there is no relationship between SD device 
(virtual drive) and physical drive, or at least not a direct relationship.

> My question, bacula mail reports have this line in them:
>
> 28-Jun 13:10 mtl-backup2-dir JobId 1: Using Device "jbod1-drive-1"
>
> The backup worked fine, but the backup actually wrote all data to
> "jbod1-drive-16", not drive-1.  I can't seem to figure out where bacula
> is pulling the device name from.  I have written backups to many
> different drives, but regardless of the drive it writes to, the mail
> report always says it is using drive-1.  I'd like to get this to reflect
> what drive it actually wrote to, if this is possible.

Most likely, all jobs were indeed written to SD device jbod1-drive-1. 
However, the volume file that was used was apparently located on the 
physical drive specified by the 16th magazine= line in the vchanger 
config file. What this is telling you is that you are not running jobs 
concurrently, so they are all using SD device jbod1-drive-1. They are 
going to different physical drives because they are being written to 
volume files which may reside on any of those physical drives. Bacula 
first selects a volume, then if that volume is not already loaded, then 
it selects a SD device to load the selected volume into and issues a 
load command to vchanger. vchanger responds to the load command by 
setting the symlink associated with that SD device to point to the 
physical drive where the selected volume resides. If you will not be 
running jobs concurrently, then there is no reason to have more than one 
SD device (virtual drive). That one virtual drive will still be able to 
write to volumes on any of the 16 physical drives, one at a time.

So, it is working as expected. :) When using vchanger, the physical 
drive (or drives) used by a job is reflected in the volume labels of the 
volumes that the job wrote to. Every magazine (physical drive) is 
assigned a unique magazine number when initialized. The magazine number 
is used as the zero-padded number between the '_' characters in the 
volume label. Volumes are associated with a physical drive, but SD 
devices (virtual drives) are not.


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
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>