Created attachment 189663 [details] Patch to fix mtx-changer.in The MTX changer script that gets installed with bareos-server has two problems. First, the @MTX@ variable isn't defined so that doesn't get expanded. Second, it tries to use "perl" to invoke Perl, but its PATH doesn't include /usr/local/bin. The attached patch adds MTX to the Makefile and hard-codes the path to perl in mtx-changer.in.
/usr/local/sbin/chio-bareos is also installed which should replace mtx-changer on *BSD systems. However, the installed version is bugged and the list command is not working correctly and listall is not implemented. Upstream has a working chio-changer script from OpenBSD (https://github.com/bareos/bareos/blob/master/platforms/openbsd/chio-changer). I've tested this today on FreeBSD and it is working. I don't know what the default should be, mtx-changer or chio- {changer,bareos}, but since chio-changer does not require perl and is working i'll stick with this one.
Having chio the default is fine, but I need the MTX support for our changer. Our Quantum Scalar i40 changer has import/export slots, which chio needs to access via the 'portal' slots, and Bareos decided to access this by adding them beyond the last slot number. Would you still accept the MTX patch, and keep MTX as an option in the port? For the curious, here is the "chio status -v" output from a nearly empty changer of ours: picker 0: voltag: <:0> slot 0: <ACCESS> voltag: <:0> slot 1: <ACCESS> voltag: <:0> slot 2: <ACCESS> voltag: <:0> slot 3: <ACCESS> voltag: <:0> slot 4: <ACCESS> voltag: <:0> slot 5: <ACCESS> voltag: <:0> slot 6: <ACCESS> voltag: <:0> slot 7: <ACCESS> voltag: <:0> slot 8: <ACCESS> voltag: <:0> slot 9: <ACCESS> voltag: <:0> slot 10: <ACCESS> voltag: <:0> slot 11: <ACCESS> voltag: <:0> slot 12: <ACCESS> voltag: <:0> slot 13: <ACCESS> voltag: <:0> slot 14: <ACCESS> voltag: <:0> slot 15: <ACCESS> voltag: <:0> slot 16: <ACCESS> voltag: <:0> slot 17: <ACCESS> voltag: <:0> slot 18: <ACCESS> voltag: <:0> slot 19: <ACCESS> voltag: <:0> slot 20: <ACCESS> voltag: <:0> slot 21: <ACCESS> voltag: <:0> slot 22: <ACCESS> voltag: <:0> slot 23: <ACCESS> voltag: <:0> portal 0: <INEAB,EXENAB,ACCESS> voltag: <:0> portal 1: <INEAB,EXENAB,ACCESS> voltag: <:0> portal 2: <INEAB,EXENAB,ACCESS> voltag: <:0> portal 3: <INEAB,EXENAB,ACCESS> voltag: <:0> portal 4: <INEAB,EXENAB,ACCESS> voltag: <:0> drive 0: <FULL> voltag: <ND0036:0> serial number: <IBM ULTRIUM-HH6 C38EE9E000> drive 1: <ACCESS> voltag: <:0> serial number: <IBM ULTRIUM-HH6 C38EE9E004> And the MTX status: Storage Changer /dev/pass2:2 Drives, 29 Slots ( 5 Import/Export ) Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = ND0036 Data Transfer Element 1:Empty Storage Element 1:Empty:VolumeTag= Storage Element 2:Empty:VolumeTag= Storage Element 3:Empty:VolumeTag= Storage Element 4:Empty:VolumeTag= Storage Element 5:Empty:VolumeTag= Storage Element 6:Empty:VolumeTag= Storage Element 7:Empty:VolumeTag= Storage Element 8:Empty:VolumeTag= Storage Element 9:Empty:VolumeTag= Storage Element 10:Empty:VolumeTag= Storage Element 11:Empty:VolumeTag= Storage Element 12:Empty:VolumeTag= Storage Element 13:Empty:VolumeTag= Storage Element 14:Empty:VolumeTag= Storage Element 15:Empty:VolumeTag= Storage Element 16:Empty:VolumeTag= Storage Element 17:Empty:VolumeTag= Storage Element 18:Empty:VolumeTag= Storage Element 19:Empty:VolumeTag= Storage Element 20:Empty:VolumeTag= Storage Element 21:Empty:VolumeTag= Storage Element 22:Empty:VolumeTag= Storage Element 23:Empty:VolumeTag= Storage Element 24:Empty:VolumeTag= Storage Element 25 IMPORT/EXPORT:Empty:VolumeTag= Storage Element 26 IMPORT/EXPORT:Empty:VolumeTag= Storage Element 27 IMPORT/EXPORT:Empty:VolumeTag= Storage Element 28 IMPORT/EXPORT:Empty:VolumeTag= Storage Element 29 IMPORT/EXPORT:Empty:VolumeTag= And finally, what Bareos expects: D:0:F:1:ND0036 D:1:E S:1:E S:2:E S:3:E S:4:E S:5:E S:6:E S:7:E S:8:E S:9:E S:10:E S:11:E S:12:E S:13:E S:14:E S:15:E S:16:E S:17:E S:18:E S:19:E S:20:E S:21:E S:22:E S:23:E S:24:E I:25:E I:26:E I:27:E I:28:E I:29:E So to export a tape, Bareos asks to move it to slot 25 (or the first open Import slot). Updating the chio script to do this is perhaps not a lot of work. But the MTX script does just work for me (other than those two trivial changes I have to apply each time I update bareos-server). So I've been happy setting the changer type to MTX and just going on.
I've opened Bug 225908 for chio-bareos/chio-changer. The output of listall looks like yours. I'm just a curious user. I installed Bareos this week and i'm a bit confused because of mtx-changer, chio-bareos and two chio-changer scripts in the Bareos github repo.
A commit references this bug: Author: acm Date: Fri May 18 19:00:39 UTC 2018 New revision: 470319 URL: https://svnweb.freebsd.org/changeset/ports/470319 Log: - Import chio-bareos - Fix perl path into mtx-changer - Add/modify CONFLICTS - Add GNUTLS option - Few other modifications PR: 225119 225908 227318 Changes: head/sysutils/bareos-client/Makefile head/sysutils/bareos-client-static/Makefile head/sysutils/bareos-docs/Makefile head/sysutils/bareos-server/Makefile head/sysutils/bareos-server/files/chio-bareos head/sysutils/bareos-traymonitor/Makefile head/sysutils/bareos16-bat/Makefile head/sysutils/bareos16-client/Makefile head/sysutils/bareos16-client-static/Makefile head/sysutils/bareos16-server/Makefile head/sysutils/bareos16-server/files/chio-bareos head/sysutils/bareos16-traymonitor/Makefile
- Committed to bareos16-server and bareos-server ports. Thanks