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

Re: [Bacula-devel] Trying out the virtual disk changer feature.


On Fri, Oct 17, 2008 at 05:54:05PM +0200, Kern Sibbald wrote:
> On Friday 17 October 2008 17:37:00 Graham Keeling wrote:
> > Hello,
> > Going back a couple of months, there was this short exchange:
> >
> > On Fri, Aug 15, 2008 at 10:49:50AM +0200, Kern Sibbald wrote:
> > > On Friday 15 August 2008 10:36:36 Graham Keeling wrote:
> > > > It would be nice if it did let you read/write to the same storage if it
> > > > were possible - as it is in my case, as I am exclusively using
> > > > disk-based storage.
> > >
> > > Unfortunately it is not possible to read and write to the same device,
> > > because on a tape it is just impossible, and on a disk, it requires two
> > > I/O packets.
> > >
> > > The above said, it is possible to read and write to the same disk
> > > directory providing the volumes are different.  This is most easily
> > > accomplished by using something such as the virtual disk changer
> > > (disk-changer script), which provides two or more virtual drives.  It is
> > > probably also possible by using the virtual disk device, which is a sort
> > > of automatic disk changer, but I don't use that code, so I hesitate to
> > > recommend it.
> >
> > I've been trying to get the disk-changer script to work for me, looking at
> > the virtual backup regression tests for clues.
> >
> > Unless I'm wrong, it seems that you can't just schedule jobs and let it get
> > on with it, filling up the slots with data and switching between them, as
> > you have to manually enter commands to load, unload and label the slots.
> 
> No, it is totally automatic.

Sorry, I don't believe that this is correct, and here are some reasons:

If, for example, I comment out these lines in tests/virtual-backup-test...

label storage=File volume=FileVolume001 Pool=Default
label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0

...then the test seems to get stuck when it tries to run the first job. I
connect to the director and it gives me the following message:

20-Oct 10:36 localhost-dir JobId 1: Start Backup JobId 1, Job=Vbackup.2008-10-20_10.36.03
20-Oct 10:36 localhost-dir JobId 1: Using Device "FileStorage"
20-Oct 10:36 localhost-sd JobId 1: Job Vbackup.2008-10-20_10.36.03 waiting. Cannot find any appendable volumes.
Please use the "label"  command to create a new Volume for:
    Storage:      "FileStorage" (/usr/bin/bacula/regress/tmp)
    Pool:         Default
    Media type:   File


Secondly, there is this comment in the top of the disk-changer script:
# The Volumes will be created with names slot1, slot2, slot3, ... maxslot in the
#  base directory.

But the virtual backup-test runs scripts/prepare-disk-changer at the beginning,
which does the following:
#!/bin/sh
#
# Create fresh virtual disk changer directory
#
rm -rf tmp/disk-changer
mkdir tmp/disk-changer
# Create 10 slots
for i in 1 2 3 4 5 6 7 8 9 10 ; do
   touch tmp/disk-changer/slot$i
done

So, either the comment in the disk-changer script is wrong, or
prepare-disk-changer is unnecessary.


Thirdly, when I set up my bacula to use the disk-changer script, and run a
job, I get a comment in my log that looks similar to this section in the
'kernstodo' file in svn:

- Auto update of slot:
   rufus-dir: ua_run.c:456-10 JobId=10 NewJobId=10 using pool Full priority=10
   02-Nov 12:58 rufus-dir JobId 10: Start Backup JobId 10, Job=kernsave.2007-11-02_12.58.03
   02-Nov 12:58 rufus-dir JobId 10: Using Device "DDS-4"
   02-Nov 12:58 rufus-sd JobId 10: Invalid slot=0 defined in catalog for Volume "Vol001" on "DDS-4" (/dev/nst0). Manual load my be required.
   02-Nov 12:58 rufus-sd JobId 10: 3301 Issuing autochanger "loaded? drive 0" command.

(after this point, my messages diverge with different problems - I can send
them to the list later)


> > I've also tried to find out what you mean by 'the virtual disk device', but
> > I'm not able to find anything. Is there any documentation about this
> > anywhere?
> 
> At the top of the disk-changer script.

I think you misunderstood me. Here is your original comment again:

> > > The above said, it is possible to read and write to the same disk
> > > directory providing the volumes are different.  This is most easily
> > > accomplished by using something such as the virtual disk changer
> > > (disk-changer script), which provides two or more virtual drives.
...
> > > It is probably also possible by using the virtual disk device, which is
> > > a sort of automatic disk changer, but I don't use that code, so I
> > > hesitate to recommend it.

You appear to be talking about two different things here. Firstly, the
'virtual disk changer (disk-changer script)', and secondly, the 'virtual disk
device'.

As I am having trouble getting the disk-changer script to work for me, I
thought that the alternative 'virtual disk device' that you mentioned could
be worth trying. There is no mention of such a thing at the top of the
disk-changer script. So what is the 'virtual disk device'?

Thanks for any help,
Graham.


-------------------------------------------------------------------------
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
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.