View Issue Details

IDProjectCategoryView StatusLast Update
0000448bareos-corewebuipublic2015-04-16 22:48
ReporterRyushin Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSDebianOS Version7
Product Version14.2.4 
Summary0000448: View slots under storage when using vchanger does not work
DescriptionRunning vchanger and latest debian nightlies.

Viewing the slots under the bareos-webui does not show the slots, but an error instead.
Steps To ReproduceUnder the bareos-webui interface, click Storages tab, click View slots:

Results in this output:
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon vchanger_8tb at windwalker:9103 ...
3306 Issuing autochanger "slots" command.
Device "vchanger_8tb_drives" has 280 slots.
Connecting to Storage daemon vchanger_8tb at windwalker:9103 ...
3306 Issuing autochanger "listall" command.
Illegal output from autochanger listall: listall not a recognized command
Illegal output from autochanger listall: /etc/bareos/vchanger_8tb_drives.conf is config file
Illegal output from autochanger listall: USAGE:
Illegal output from autochanger listall:
Illegal output from autochanger listall: vchanger config_file [options] command slot device drive
Illegal output from autochanger listall: Perform Bacula Autochanger API command for virtual
Illegal output from autochanger listall: changer defined by vchanger configuration file
Illegal output from autochanger listall: 'config_file' using 'slot', 'device', and 'drive'
Illegal output from autochanger listall: vchanger config_file [options] INITMAG mag_bay [-m|--magnum mag_number]
Illegal output from autochanger listall: Initialize new magazine in magazine bay 'mag_bay'. The list of
Illegal output from autochanger listall: assigned magazines is defined by one or more 'magazine'
Illegal output from autochanger listall: directives in the specified 'config_file'. The first mounted magazine
Illegal output from autochanger listall: from the list of assigned magazines is defined to be in bay 1, the
Illegal output from autochanger listall: second mounted magazine in bay 2, etc. If 'mag_num' is not given,
Illegal output from autochanger listall: then the next available magazine number is chosen automatically.
Illegal output from autochanger listall: vchanger config_file [options] LISTMAGS
Illegal output from autochanger listall: List all magazine bays and their current magazine mountpoints.
Illegal output from autochanger listall: vchanger --version
Illegal output from autochanger listall: print version
Illegal output from autochanger listall: vchanger --help
Illegal output from autochanger listall: print help
Illegal output from autochanger listall:
Illegal output from autochanger listall: Options:
Illegal output from autochanger listall: -u, --user=uid user to run as (when invoked by root)
Illegal output from autochanger listall: -g, --group=gid group to run as (when invoked by root)
Illegal output from autochanger listall:
Illegal output from autochanger listall: Report bugs to jfisher@jaybus.com.
3998 Autochanger error: ERR=Child exited with code 1
No Volumes found, or no barcodes.
You have messages.
TagsNo tags attached.

Activities

mvwieringen

mvwieringen

2015-03-31 11:24

developer   ~0001662

Seems vchanger didn't get updated in ages and as such is unusable
with any bacula > 5.1 as it needs to support the new listall keyword
which is added to mtx-changer and disk-changer but not to vchanger it
seems.

Output needs to look like this:

# Drive content: D:Drive num:F:Slot loaded:Volume Name
# D:0:F:2:vol2 or D:Drive num:E
# D:1:F:42:vol42
# D:3:E
#
# Slot content:
# S:1:F:vol1 S:Slot num:F:Volume Name
# S:2:E or S:Slot num:E
# S:3:F:vol4
#
# Import/Export tray slots:
# I:10:F:vol10 I:Slot num:F:Volume Name
# I:11:E or I:Slot num:E
# I:12:F:vol40

So this is more an enhancement that needs to be made for vchanger
to support bacula and bareos then anything else. Given that there
are very limited updates on vchanger (last update Thu May 20 12:25:52 2010)
I think chances are very slim this gets ever added.
Ryushin

Ryushin

2015-03-31 12:34

reporter   ~0001663

Is there a updated replacement to be used instead of vchanger? Is disk-changer that replacement? When I was setting this up over the last four months I was reading that vchanger was the replacement for disk-changer and to use vchanger instead.

Would the Bareos project would want to take vchanger under their wing as well since the source is available under the GPLv2?
mvwieringen

mvwieringen

2015-03-31 13:02

developer   ~0001664

disk-changer is a script part of Bacula and Bareos which is used mostly for
regression testing. It emulates a VTL using the same interface that mtx-changer
uses. I use it myself with a fixed set of volumes and it works well not sure
it will however work well with devices that are semi permanent.

Think vchanger was one time invented to handle removable media but its biggest
problem is that its unmaintained and as such misses stuff needed nowadays.

As to updates to vchanger from the Bareos project, not likely to happen unless
we have enough spare time and nothing else to do. There seem to be really a lot
of earlier Bacula related projects which are orphans now.
Ryushin

Ryushin

2015-03-31 13:11

reporter   ~0001665

So vchanger is still the software to use for removable media. I'll see if I can contact the author to see if he can provide any updates, though I'm not hopeful.

I understand the time factor as I'm also don't have enough time in the day to get my projects done.
Ryushin

Ryushin

2015-03-31 13:27

reporter   ~0001666

I guess at this time, this bug should be reclassified as an enhancement or will not fix.
mvwieringen

mvwieringen

2015-04-01 13:21

developer   ~0001676

Given it was bad weather here anyway last night, in some lost hours I had
a quick hack at vchanger.

https://github.com/bareos/contrib-vchanger

This is however fully unsupported but I think in essence it shouldn't break
anything else I only added the two extra keywords needed for BAREOS e.g.
listall and transfer.

The bareos-master branch has the commit to add bareos specific stuff.
I haven't bother documenting it. Feel free to fork it on github and add
the documentation as that is something I really don't fancy doing. If it
works (from my limited testing it looked alright.) great if not maybe I
can see what is wrong but again no promises.

I saw you asked questions on the vchanger mailing list and reading that list
seems that some enhancements in other fields were in the pipeline in 2013
but it seems they never landed.
Ryushin

Ryushin

2015-04-01 21:26

reporter   ~0001677

Thank you for taking a look at the code and modifying it. I'll be able to test in probably this weekend. My full backup takes place on the first and it takes 3 days to complete.
Ryushin

Ryushin

2015-04-03 17:25

reporter   ~0001678

Good news. I got this response back from the developer:

Actually, I have been working on vchanger, and version 1.0.0 should be released soon, hopefully in April or early May.

While the LISTALL command is indeed implemented in mtx-changer and disk-changer since Bacula version 5.1, it is not documented in the Bacula Autochanger Interface documentation, or anywhere else to my knowledge.

Since neither the Storage Daemon nor the Director use the LISTALL command, the statement that vchanger will not work with any bacula > 5.1 is simply not true. It just will not work with some of the web-based GUIs. My guess is that one of the GUI projects added LISTALL to mtx-changer, but it was never documented. Nevertheless, another user has already requested LISTALL support and it is being added in vchanger 1.0.0..

New features for 1.0.0 will be:

1. Change in the way volume files are mapped to virtual slots and in the way virtual drives are loaded.
��� When vchanger began, Bacula supported Storage Daemon on Windows Server 2003. Since that
��� version of Windows could symlink to directories, but not to files, symlinks had to be created to the
��� magazine mountpoint and metadata stored on the magazine to track loaded drives. Vchanger will
��� now simply use symlinks as the virtual drive, the target of the symlink being the volume file that is
��� loaded in the virtual drive. This allows a number of nice features, including:
������� * Individual magazines can have any number of volume files
������� * Volume files can have any filename
������� * New volume files can be added or removed dynamically without config file change
������� * Volume files can be moved from one magazine to another without affecting volume labeling
������� * Volume files created for a native disk Device resource can be moved to a magazine used
���������� with a vchanger Autochanger resource as long as the Media Type matches.
������� * Dynamic and unlimited number of virtual drives without config file change. The actual number
���������� of Virtual drives used is determined only by the number of Device resources defined in the
���������� Storage Daemon config file.
2. Now uses libudev, if available, to determine magazine filesystem mountpoints by UUID
3. Supports sending 'update slots' and 'label barcodes' commands via bconsole as needed
4. New udev rules generator supplies udev rules to send 'update slots' command at udev hotplug
��� event detection to support plug-n-play of external drives
5. Added support for undocumented LISTALL command
6. Deprecated INITMAG extended command
7. Added CREATEVOLS extended command to support dynamic creation of volume files
8. Added REFRESH extended command to support udev hotplug events
9. Added spec files for building RHEL6 and RHEL7 RPM s
10. Updated documentation
mvwieringen

mvwieringen

2015-04-03 17:42

developer   ~0001679

Ok great his response as to the fact that Bacula 5.1 don't use listall is
however not accurate but he is right nothing is documented.

At least BAT uses listall as in so called API mode its used for status slots.
Bareos now uses it in most cases so that is the actual change to Bacula.

But we wait then for a new vchanger to see what happens but its been kind
of dead for almost 5 years so I didn't expect it to see a new release.
mvwieringen

mvwieringen

2015-04-16 22:48

developer   ~0001691

vchanger 1.0.0 was released 3 days ago which has LISTALL support.
This morning added some small changes to the 1.0.0 version for the transfer
command so that is at least accepted. The new vchanger has quite a different
approach to some things so you might want to have a close look on the changes
needed to your config.

Issue History

Date Modified Username Field Change
2015-03-31 04:57 Ryushin New Issue
2015-03-31 04:57 Ryushin Status new => assigned
2015-03-31 04:57 Ryushin Assigned To => frank
2015-03-31 11:24 mvwieringen Note Added: 0001662
2015-03-31 11:24 mvwieringen Assigned To frank =>
2015-03-31 11:24 mvwieringen Status assigned => feedback
2015-03-31 12:34 Ryushin Note Added: 0001663
2015-03-31 12:34 Ryushin Status feedback => new
2015-03-31 13:02 mvwieringen Note Added: 0001664
2015-03-31 13:11 Ryushin Note Added: 0001665
2015-03-31 13:27 Ryushin Note Added: 0001666
2015-03-31 14:08 mvwieringen Severity minor => feature
2015-03-31 14:08 mvwieringen Status new => acknowledged
2015-04-01 13:21 mvwieringen Note Added: 0001676
2015-04-01 13:22 mvwieringen Status acknowledged => feedback
2015-04-01 21:26 Ryushin Note Added: 0001677
2015-04-01 21:26 Ryushin Status feedback => new
2015-04-03 17:25 Ryushin Note Added: 0001678
2015-04-03 17:42 mvwieringen Note Added: 0001679
2015-04-03 17:42 mvwieringen Status new => feedback
2015-04-16 22:48 mvwieringen Note Added: 0001691
2015-04-16 22:48 mvwieringen Status feedback => closed
2015-04-16 22:48 mvwieringen Resolution open => no change required