Hi List :)

At this time, I have a few hairs left on my head...(I recall a few
e-mails claiming this was "easy to do" and "ran fine")...evidently my
bacula-fu is weak...

I'm (still) running Bacula Version: 1.38.11 (28 June 2006) with a
single, external HP DLT IV VS80 40/80G drive. Platform is FreeBSD6.1 on
a P4/256 with *lots* of disk space.

I'm trying to get the mtx-changer script
(http://www.bacula.org/rel-manual/mtx-changer.txt) to work to provide
auto-eject, auto-notify and auto-resume functionality. There may be
other, better ways to do this (feel free to suggest), but the
mtx-changer seemed to fit the bill.

I've been following the instructions on
http://www.bacula.org/rel-manual/Autochanger_Support.html.

According to the above link - "That each Volume (tape) to be used must
be defined in the Catalog and have a Slot number assigned to it so that
Bacula knows where the Volume is in the autochanger. This is generally
done with the label command. See below for more details. You must
pre-label the tapes manually before using them."

Q1 - Do I need to do this *before* bacula has been told about the
auto-changer? So I label all of my tapes and then "update" the volume
manually assigning a slot number (in relation to how they have been
listed in the mtx-changer script)? Or, do I make bacula
autochanger-aware and *then* label my tapes? (so it prompts me for what
slot to use?)...or does it not matter on a well-functioning system?

My Storage Daemon's configuration is:

# Our pseudo-autochanger
#Autochanger {
#  Name = "DLT-PSEUDO-CHANGER"
#  Device = HP-DLT-VS80-01
#  Changer Device = /dev/nsa0
#  Changer Command = "/usr/local/bin/mtx-changer %o %a %S"
#}

# HP tape drive configuration
Device {
  Name = HP-DLT-VS80-01
  Description = "HP DLT VS80 EXTERNAL"
  Media Type = HPDLT-IV
  Archive Device = /dev/nsa0
  RemovableMedia = yes
  AutomaticMount = yes
  AlwaysOpen = yes
  Label Media = yes
  Device Type = tape
  Offline On Unmount = no
  Hardware End of Medium = no
  BSF at EOM = yes
  Backward Space Record = no
  Fast Forward Space File = no
  TWO EOF = yes
#  Autochanger = yes
} 

Elements have been commented out because I keep reverting back to a
single-drive operation...Offline On Unmount was commented out because I
had to keep walking across the building to re-insert the tape....does
the above config look sane?

Also, the Director is configured using:

Storage {
        Name            = nasbox-sd
        Address = nasbox1
        SDPort  = 9103
        Password        = "m00c0wTheGreat"
#       Device  = DLT-PSEUDO-CHANGER
        Device  = HP-DLT-VS80-01
        Media Type      = HPDLT-IV
#       Autochanger = yes
        }

Again, comments applied to revert to single-drive operation.

Permissions on /dev/nsa0 are:

lrwxr-xr-x  1 root    wheel            6 Jan  1  1970 nsa0 -> nsa0.0
crw-rw-rw-  1 root    bacula      0,  94 Feb 26 19:55 nsa0.0

As per Bacula documentation, /etc/devfs.conf:

own     nsa0.0  root:bacula
perm    nsa0.0  0666

Here's a second problem...when I undo the comments on the above
configurations and stop/start fd/sd/dir, tail -f /var/log/mtx.log shows:

Tue Feb 27 11:26:59 EAT 2007 : loaded /dev/nsa0 0
mtx-changer: Request loaded, dev /dev/nsa0

This would seem to be a problem (at least for me)...the mtx-changer
script does a "stat stor" to implement the "loaded" command - this
causes a "chicken-before-the-egg" lock up. Looking at ps waux we see:

root    4559  0.0  1.0  3868  1844  ??  Ss   11:26AM   0:00.01
/usr/local/sbin/bacula-fd -u root -g wheel -v -c
/usr/local/etc/bacula-fd.conf
bacula  4573  0.0  1.2  4540  2176  ??  Ss   11:26AM   0:00.02
/usr/local/sbin/bacula-sd -u bacula -g operator -v -c
/usr/local/etc/bacula-sd.conf
bacula  4575  0.0  0.6  1652  1092  ??  I    11:26AM   0:00.01 /bin/sh
/usr/local/bin/mtx-changer loaded /dev/nsa0 0
bacula  4580  0.0  0.6  1652  1092  ??  I    11:26AM   0:00.00 /bin/sh
/usr/local/bin/mtx-changer loaded /dev/nsa0 0
bacula  4582  0.0  1.2  4148  2172  ??  I    11:26AM   0:00.02
/usr/local/sbin/bconsole -c /usr/local/etc/bconsole.conf
bacula  4583  0.0  0.5  1512   864  ??  I    11:26AM   0:00.00
/usr/bin/grep /dev/nsa0
bacula  4584  0.0  0.5  1512   860  ??  I    11:26AM   0:00.00 grep
^Device
bacula  4585  0.0  0.5  1512   860  ??  I    11:26AM   0:00.00 grep -v
not open.
bacula  4586  0.0  0.5  1512   860  ??  I    11:26AM   0:00.00 grep -v
ERR=
bacula  4587  0.0  0.5  1516   864  ??  I    11:26AM   0:00.00 grep -v
no Bacula volume is mounted
bacula  4588  0.0  0.3  1232   636  ??  I    11:26AM   0:00.00 sed -e
s/^.*Volume //
bacula  4589  0.0  0.3  1192   596  ??  I    11:26AM   0:00.00 cut -d"
-f2
bacula  4597  0.0  1.3  5188  2456  ??  Ss   11:27AM   0:00.05
/usr/local/sbin/bacula-dir -u bacula -g bacula -v -c
/usr/local/etc/bacula-dir.conf
root    4600  0.0  1.4  5084  2544  p2  RV   11:28AM   0:00.00 grep
bacula (csh)

Which won't go away...the sd startup is calling mtx-changer which is in
turn calling "stat stor" in the console...the storage daemon wont(?)
reply to the mtx-changer command until it's got a response to its
"loaded" request...?!

Currently all volumes (from "list volumes") have an assigned slot of "0"
- I realise this means bacula won't consider them. Having manually
changed a single volume slot to 1, it didn't seem to make any difference
to the above problem. 

Perhaps I am missing an important directive somewhere?

Help! :)

Thank you!

Steve.






-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to