>>>>> "Kern" == Kern Sibbald <[EMAIL PROTECTED]> writes:

Kern> On Thursday 29 November 2007 04:36, John Stoffel wrote:
>> Kern,
>> 
>> I'd like to propose a change to how tapes are managed in Bacula with
>> the addition of a new column to the Media table of a 'Barcode' column
>> with a type of tinyblob.  This is what is used for the VolumeName
>> column at least, and they are similar.
>> 
>> The idea is that if I do an 'update slots' and Bacula goes through and
>> checks all my volumes in a jukebox and discovers that it doesn't know
>> what barcode XYZ123 is, loads the volume, and sees it has a VolumeName
>> of "BackupVol-003", it would then associate that Barcode with the
>> proper MediaId and VolumeName.
>> 
>> There would ideally also be an option which says to use the Bacode on
>> the physical media as the VolumeName by default.

Kern> Well, the first part of what you are suggesting above is really
Kern> a request for a change (new feature request).  As far as I can
Kern> tell, you are suggesting to allow a Volume to be referenced by
Kern> either its volume name or by the barcode value that Bacula finds
Kern> for that Volume and that the two may not be the same.

Correct, I want to allow users to refer to a piece of media by either
its VolumeName, it's MediaId or is MediaBarcode values.  Actually, I
think end user interactions should never allow the MediaId attribute
to be used, it's purely for Bacula's own user and not relevant to the
user.  Seperate issue though.

So let me back up and explain a bit more of what I want, and how I view
things, so that might help here.  It's a bit basic, but this way were
all on the same page.

A piece of media can have upto three different labels on it, two of
them reabable by Bacula, and one only by the user.  Those would be the
VolumeName written to the tape header, the machine readable barcode,
and the user written label on the media.  They could all be different,
or (ideally) all the same.  

Kern> I think this request would require a good deal of thought simply
Kern> because the current way that Bacula works is to require the
Kern> volume name and the barcode to be the same.  If they are
Kern> different, and if Bacula attempts to update it automatically, I
Kern> think there could be some serious problems -- i.e. Bacula could
Kern> get mixed up.  Perhaps if no Barcode field exists, Bacula could
Kern> accept the first one it found, but thereafter, if the barcode
Kern> changed, it would have to reject the tape.

Umm... as far as I can tell, Bacula does NOT require that they be the
same.  For example I have a bunch of media which I labeled
'BackupVol-###' before I had a jukebox.  But Bacula happily uses them
if I put Barcode labels on them and put them in.  It *seems* to handle
it ok.  Are you saying I'm going to run into problems?

Kern> In any case, this is really a feature request that needs to be
Kern> handled as such (see the web page for more ...).  I think it
Kern> could be very confusing to have two different volume names so I
Kern> am not too much in favor of this idea.

I'll file a proper request sometime soon then.  

As for having two different labels causing confusion, I agree.  But if
you are in the process of upgrading your media to use Barcodes, it's
vital to allow a mixed case use.

Currently, if I put media into the jukebox labeled 'BackupVol-001' and
it has a barcode of 'ABC123' and I do an 'mount slot=12' to mount that
piece of media, Bacula is perfectly happy to do so.  The 'update
slots' command found volume ABC123 in slot 12, but once I've mounted
it, it does showup in the 'list volumes' command as being from slot
12, with the proper name.

Of course it's a total pain to actually *list* the slots in the
jukebox and their contents without doing an 'update' slots and then it
doesn't show all the slots depending on media status etc. 

Kern> One solution for you would be to do a Volume migration of all
Kern> the data on the tape in question to a second tape that is
Kern> correctly labeled with its barcode value.  Then simply either
Kern> delete the first Volume and recreate it with the correct label,
Kern> or simply relabel the first tape with the barcode and use it for
Kern> new data.

Now this is a neat piece of information, I hadn't realized I could do
a volume migration, so I think I'll have to try that out and see how
it goes.  Thanks!

>> Also, how hard would it be to have Bacula offer the option to Relabel
>> a piece of media so I can change the VolumeName to match a Barcode,
>> but without changing anything else on the actual media or being forced
>> to do a full relabel which wipes the tape?

Kern> Bacula can relabel a Volume only if all the current job records
Kern> are purged from that Volume, the volume is recycled, and in
Kern> relabeling the volume, all prior data will be lost forever.  As
Kern> I mentioned above, you can accomplish this by doing a Volume
Kern> migration.

Kern> On a tape, it is physically impossible to change the Volume
Kern> label without destroying some data on the volume as Martin
Kern> indicated.  On a disk volume this would be possible, but
Kern> Bacula's philosophy is to attempt to treat disk volumes and tape
Kern> volumes the same to the extent it is possible (and in any case
Kern> your request is for tapes ...).

Yeah, two seconds of thought would have told me that, god knows I've
been doing backups for long enough.  I was just hoping, but then I
remembered the End of Block marks that get put onto tape when writes
are done, etc.  Tapes are append only.

And I agree about keeping media volumes as alike as possible, though
you might want to think about whether disk volumes need to be limited
in terms of the number of readers who can access them at the same
time.  

John

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to