The version 1.0.2 doesn't have this issue, so it is probably a regression in version 1.0.3. Temporary solution is to use the version 1.0.2 in the meantime. Configuration
Log
Configuration
Failed to create named mutex on Windows Server 2019
udev helper scripts fail to parse quoted strings in vchanger config file
udev helper scripts fail to parse quoted strings in vchanger config file
Missing group after privileges dropped when invoked by root
configure --prefix=/usr/local does not create a workable system.
Fix for bug 17, wrong number of virtual slots used
Fix for bug 18, compile-time conflict on FreeBSD
SMB Share & VChanger
The same vchanger config should work with either Bacula or Bareos. I'm glad you found a solution. I'll go ahead and close this support ticket.
Thank you for your help but we tested on friday bareos and it worked almost outside the box. Maybe becouse we Installed it on Ubuntu instead of Red Hat like in bacule's case. Anyway after 3 weeks of setting up bacula with literally no progress we think It's a rabbit hole for us. Switching to bareos and setting it up in few hours was great and we gonna stick with it. Thanks again.
Sorry. I gave you the wrong default vchanger working dir. It should be /var/spool/vchanger/vchanger. The idea is that you can have multiple vchangers, each with their own working dir under /var/spool/vchanger. The owner for all directories and files under /var/spool/vchanger should be bacula:disk, or whatever user bacula-sd runs as. With the exception of making sure that the vchanger working dir exists and is owned by bacula:disk, I think you have vchanger setup correctly. The problem is that bacula-sd...
Ok I changed /var/spool/vchanger permissions to bacula:disk. I had no folder or files in there. I checked sudo -u bacula touch test in /mnt/Workstations/Magazine1. And the file was created in that directory. The error is still there: Open File device "Magazine1" (/mnt/Workstations) Volume "vchanger_0292" failed: ERR=file_dev.c:190 Could not open(/mnt/Workstations,CREATE_READ_WRITE,0640): ERR=Is Directory
The Magazine directives in the vchanger config would point to existing directories. For example a line like: magazine = /mnt/Workstation/Magazine1 means that there should be an existing directory at /mnt/Workstation/Magazine1 with premissions set to allow write access to bacula:dir. The SMB share must be mounted before vchanger is invoked. To test, su to the bacula user and try to create a file in /mnt/Workstation/Magazine1. You might need to change the bacula user's default shell to allow the su...
To be clear path to magazine I should add to in Archive Device, or Path to /mnt/Workstations ?
Ok, so process is running by that user and group. Folders and files on /mnt/Workstations also. And that selinux I did it and still no go.
The User and Group in the vchanger config should be the same as the user and group that the bacula-sd daemon runs as. See results of ps aux|grep bacula-sd. The bacula-sd daemon invokes vchanger, so vchanger runs as that same user:group. Then make sure that all directories and files in /mnt/Workstation are owned by that same user. You may also need to make sure that selinux or apparmor is not blocking write access. See https://sysadm.mielnet.pl/bacula-and-selinux-denying-access/
Well my vchanger.conf looks like this: User=bacula Group=disk Work Dir = /mnt/Workstations magazine = /mnt/Workstations/Magazine1 magazine = /mnt/Workstations/Magazine2 magazine = /mnt/Workstations/Magazine3 magazine = /mnt/Workstations/Magazine4 On each magazine I have 15 Volumes. Directory and Files have permission like in config file bacula:disk So Should I change it to bacula:tape?
SMB Share & VChanger
To be clear, I think you are saying that you have one SMB share mounted at .mnt.Workstations and that you have created 4 volume files in that mountpoint. You would then specify one magazine in the vchanger.conf file as: magazine = /mnt/Workstation Based on the error you are seeing, I believe it to be a permissions problem. With the SMB share mounted, the permissions of /mnt/Workstations must allow read-write to the user:group that bacula-sd runs as. This is usually bacula:tape put you must check...
SMB Share & VChanger
configure --prefix=/usr/local does not create a workable system.
Compilation fails on FreeBSD 13 (head)
Fixed in release 1.0.3
Fixes for release 1.0.3
Fix for bug 18, compile-time conflict on FreeBSD
Fix name conflict between LogHandler log() and cmath log() functions
Compilation fails on FreeBSD 13 (head)
No code in vchanger includes either math.h or cmath.h, so I'm not sure why it is conflicting. My guess is that it gets linked in from because some other standard library function uses it. I haven't seen this on Linux, so I assume it is a difference in the C++ library implementation. The fix is to rename the LogHandler global variable in vchanger so that it doesn't conflict. I will post a patch once fixed.
Compilation fails on FreeBSD 13 (head)
createvols and "disk as tape"
SIZE/LIST commands return wrong number of slots
Fixed by patch #4.
Fix for bug 17, wrong number of virtual slots used
SIZE/LIST commands return wrong number of slots
Race condition in bconsole call may hang vchanger
Fixed in release 1.0.2
Hang when bconsole called to update slots
Fixed in release 1.0.2
LOAD command allows loading slot into multiple drives
Fixed in release 1.0.2
Release 1.0.2 is a bug fix release
Sorry for the long delay in getting back to this. First the UUID error. Vchanger uses libudev and libuuid and possibly libblkid. I haven't seen these errors, but I only test on Centos 6.x and Centos 7.x. You do have to make sure that those libraries are installed. When magazine=/mnt/mountpoint, vchanger uses whatever is mounted there and doesn't care what volumes it has. When you mount disk N at /mnt/mountpoint and do a "update slots", Bacula will query vchanger (just as it would a tape autochanger...
All I get from using uuids is logful of "ERROR! system error determining mountpoint from UUID", but that's a side issue probably specific to my setup. I think it's a documentation / my understanding bug. Let's say I have volume X on disk N that isn't currently mounted, bacula asks for it, and I mount it someplace listed as "magazine =" in the config. Does anyone/anything care if it was written as "magazine 10" and is now mounted as "magazine 2"? Our tape backup software did not care, as I recall:...
createvols and "disk as tape"
Each disk should have its own Magazine= line in vchanger.conf. There is indeed a 1:1 relationship between Magazine= line (the 'magazine bay') and the target of that Magazine= line (the disk mountpoint or directory). This is by design and is how vchanger determines which magazine bay is which. Note that I am calling it a 'magazine bay' as opposed to 'slot', since slot is usually used to refer to the virtual slot that a volume file is located in. Keep in mind that there is no requirement that the target...
createvols and "disk as tape"
Race condition in bconsole call may hang vchanger
LOAD command allows loading slot into multiple drives
Hang when bconsole called to update slots
Race condition in bconsole call may hang vchanger
Hang when bconsole called to update slots
LOAD command allows loading slot into multiple drives
Mounted magazines specified by UUID not always detected
Fixed in release 1.0.1
Missing libwinpthread-1.dll error in Windows version
Fixed in release 1.0.1
uuidlookup.c compilation failure on FreeBSD 9.3
Fixed in release 1.0.1
Fixed in release 1.0.1
Vchanger may hang when issuing commands to Bacula
Release 1.0.1 to fix bugs 9,10,11, and 12
Mounted magazines specified by UUID not always detected
Missing libwinpthread-1.dll error in Windows version
Missing libwinpthread-1.dll error in Windows version
It is a non-reentrancy issue in vchanger. When vchanger invokes bconsole, Bacula...
uuidlookup.c compilation failure on FreeBSD 9.3
Is the hang due to exceeding bacula's "Maximum Concurrent Jobs", or because of non-reentrancy...
Typo. That should read line 218: strncpy(mountp, fs[n].f_mnttoname, mountp_sz);
uuidlookup.c compilation failure on FreeBSD 9.3
Vchanger may hang when issuing commands to Bacula
device has no slots
Got errors compiling vchanger under ubuntu or debian
Broken libblkid workaround
Adds basic error handing to WriteMagazineLoaded(con
Integrated into version 1.0.0
Compile errors under Solaris 10
Fixed in version 1.0.0
Limitation on number of virtual drives
Fixed in version 1.0.0
Broken libblkid returns wrong device for UUID