[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Couple questions about using a "disk-changer"

On Monday 18 August 2008 06:13:29 Joshua J. Kugler wrote:
> I'm working on an idea for using Amazon S3 in conjunction with the
> disk-changer functionality.  I have several of the ideas worked out in
> my head, but there are a couple things that still aren't clear after
> reading the docs.  If there is documentation or a library I missed
> somewhere, please feel free to point them out.

There is very little documentation for the disk_changer script, because it was 
originally intended for testing, and is extensively used in the Bacula 
regression scripts.  There is at least one very large user that is using 
disk_changer in production ...

The main place for "user" documentation on using the script is at the top of 
the file.

> 1. The docs (and disk-changer script) don't seem to answer the question
> of what happens if "slot" has not previously been written to?  Does the
> disk-changer put an empty (zero byte) file there?  Or is there some
> initialization I'm missing?

Before using disk_changer to access a slot, you must create the slot (sort of 
like inserting a blank tape).  Typically I do it by:

  touch <disk-changer-directory>/slot<n>

where <n> is the slot number you want to use.

By default, disk_changer allows a maximum of 10 slots, and two drives.  The 
doc (at the top of the file) tells you how to modify it.

> 2. Is there a database independent way of getting information about
> volumes?  

list volume=xxx
llist volume=xxx

or the equivalent SQL commands.

> Here's why I'm wondering: if bacula requests slotN, and slotN 
> is purged, there is no reason for downloading it from Amazon, and
> instead I would just create an empty file, and upload it when it
> gets "removed" from the virtual drive.*  I know I could pipe my command
> through bconsole, but I'd rather have a library, even if I'm binding
> via ctypes or such.

There is a C interface to the databases that is mostly SQL database 
independent, but it is written only for Bacula so would not be easy to use in 
an external program.

You can always use a DBI interface -- e.g. perl, or libdbi ...

> *Yes, I'm aware of concurrency issues, delays, etc.  The architecture
> isn't all there yet, still in the idea formation stage.

I am a bit skeptical about the practical use of S3, but it is clearly 
something we need.

I believe the best way (maybe not the easiest) is to implement it as a Bacula 
device driver in the trunk svn.  The trunk has a fairly well defined 
interface to device drivers that make adding new ones more or less trivial.  
For the moment it requires compiling it into Bacula, but at some point we 
will have a plugin interface.  For the moment, this interface is only 
documented by the code.

Doing it via the disk_changer probably will not be possible since accessing S3 
with any degree of security and control requires programming at the open, 
read, write, lseek, close levels via their API.

> Thanks for any input!  I'll be posting more about this when the idea is
> more congealed.

Best regards,


This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.