LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-27-2010, 01:11 AM   #1
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,533
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Bacula + vchanger: bconsole "label barcodes" does not find the autochanger


Hello

This problem is almost certainly caused by my mis-configuring something but I can't find what (it's almost exactly from the setup instructions) and I don't know how to investigate further.

Sorry this post is so long but all of the information given may be essential.

Setting up Bacula + vchanger 0.8.5, following instructions in the vchanger 0.8.5 tarball's doc/vchangerHowto.html (excellent). Using a USB HDD. Got to the step of using bconsole to issue "label barcodes" command. Output was
Code:
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: File
Connecting to Storage daemon File at ps1:9103 ...
3995 Device "FileStorage" (/tmp) is not an autochanger.
Device "FileStorage" has 0 slots.
No slots in changer to scan.
Which showed that the new virtual Autochanger was not found. Started bacula-sd in foreground debug mode from the command line:
Code:
root@ps1:~# bacula-sd -u bacula -g bacula -d 100 -f -c /etc/bacula/bacula-sd.conf
bacula-sd: stored_conf.c:698-0 Inserting director res: ps1-mon
bacula-sd: stored_conf.c:698-0 Inserting device res: usb-changer-drive-0
ps1-sd: jcr.c:140-0 read_last_jobs seek to 188
ps1-sd: jcr.c:147-0 Read num_items=2
ps1-sd: stored.c:534-0 calling init_dev /tmp
ps1-sd: dev.c:285-0 init_dev: tape=0 dev_name=/tmp
ps1-sd: stored.c:536-0 SD init done /tmp
ps1-sd: stored.c:534-0 calling init_dev /var/bacula/changer1/0/drive0
ps1-sd: dev.c:285-0 init_dev: tape=0 dev_name=/var/bacula/changer1/0/drive0
ps1-sd: stored.c:536-0 SD init done /var/bacula/changer1/0/drive0
ps1-sd: autochanger.c:273-0 Run program=/usr/local/bin/vchanger /etc/bacula/changer1.conf loaded 0 /var/bacula/changer1/0/drive0 0
ps1-sd: bnet_server.c:96-0 Addresses host[ipv4:0.0.0.0:9103]
ps1-sd: autochanger.c:275-0 run_prog: /usr/bin/vchanger /etc/bacula/changer1.conf loaded 0 /var/bacula/changer1/0/drive0 0 stat=268435664 result=ps1-sd: stored.c:549-0 calling first_open_device "usb-changer-drive-0" (/var/bacula/changer1/0/drive0)
And there it stopped. Plugged in the USB HDD. df showed it hadn't automounted. Inspected /var/bacula/changer1/0/drive0 and found it empty. Viewed vchanger log /var/bacula/changer1/changer1.log and found no messages from today. Viewed Bacula log /var/bacula/log and found no messages from today [strange?!].

Checked that vchanger was able to trigger automounting by
Code:
root@ps1:~# vchanger -u bacula -g bacula /etc/bacula/changer1.conf listmags
1:changer1:1:/mnt/vchanger/efa8a079-ab80-41c9-b018-85810dd3c45d
root@ps1:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
[snip]
/dev/sdb1            488237820     59800 488178020   1% /mnt/vchanger/efa8a079-ab80-41c9-b018-85810dd3c45
OK. Still no progress from bacula-sd running at command prompt until started bconsole and tried "label barcodes" again when got
Code:
ps1-sd: bnet.c:669-0 who=client host=192.168.1.41 port=36643
ps1-sd: cram-md5.c:73-0 send: auth cram-md5 <691048060.1267249865@ps1-sd> ssl=0
ps1-sd: cram-md5.c:133-0 cram-get received: auth cram-md5 <1496701667.1267249865@ps1-dir> ssl=0
ps1-sd: cram-md5.c:152-0 sending resp to challenge: V8/vdTZWgk/gn88JX//KQC
ps1-sd: dircmd.c:213-0 Message channel init completed.
ps1-sd: dircmd.c:588-0 Found device FileStorage
ps1-sd: dircmd.c:628-0 Found device FileStorage
Here is bacula-sd.conf
Code:
root@ps1:/etc/bacula# grep -E -v '^$|^#' bacula-sd.conf
Storage {                             # definition of myself
  Name = ps1-sd
  SDPort = 9103
  WorkingDirectory = "/var/bacula"
  Pid Directory = "/var/run"
  Maximum Concurrent Jobs = 20
}
Director {
  Name = ps1-dir
  Password = "<not shown>"
}
Director {
  Name = ps1-mon
  Password = "<not shown>"
  Monitor = yes
}
Device {
  Name = FileStorage
  Media Type = File
  Archive Device = /tmp
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}
Autochanger {
  Name = usb-changer
  Device = usb-changer-drive-0
  Changer Command = "/usr/bin/vchanger %c %o %S %a %d"
  Changer Device = "/etc/bacula/changer1.conf"
}
Device {
  Name = usb-changer-drive-0
  DriveIndex = 0
  Autochanger = yes;
  DeviceType = File
  MediaType = File
  ArchiveDevice = /var/bacula/changer1/0/drive0
  RemovableMedia = no;
  RandomAccess = yes;
}
Messages {
  Name = Standard
  director = ps1-dir = all
}
Here is vchanger's changer1.conf
Code:
root@ps1:/etc/bacula# grep -E -v '^$|^#' changer1.conf
changer_name = "changer1"
work_dir = "/var/bacula/changer1"
logfile = "/var/bacula/changer1/changer1.log"
  Virtual_Drives = 1
slots_per_magazine = 5
magazine_bays = 1
automount_dir = /mnt/vchanger
magazine = "UUID:efa8a079-ab80-41c9-b018-85810dd3c45d"
What to do?

Best

Charles
 
Old 02-28-2010, 08:16 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,533
Blog Entries: 28

Original Poster
Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
The necessary Storage definition was missing from bacula-dir.conf:
Code:
# Virtual autochanger based on USB HDD drive
Storage {
  Name = changer1
  Address = ps1
  Password = "<not shown>"
  Device = usb-changer  # name of the Autochanger resource in bacula-sd.conf
  Media Type = File
  Autochanger = yes;
}
 
  


Reply

Tags
bacula


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removed HD resulted in "Unable to resolve LABEL " error during boot nooto Linux - Hardware 2 12-26-2008 08:58 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
unclean shutdown causes "Couldn't find matching filesystem: label=" error irnerdette Red Hat 3 06-02-2006 01:44 PM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
dump + restore to backup linux ; "Couldn't find matching filesystem: LABEL=/" on boot markus1982 Linux - General 4 09-21-2002 01:16 PM


All times are GMT -5. The time now is 10:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration