Bacula-users

Re: [Bacula-users] Bacula and vchanger Cannot Label Volume

2016-05-11 09:07:55
Subject: Re: [Bacula-users] Bacula and vchanger Cannot Label Volume
From: Josh Fisher <jfisher AT pvct DOT com>
To: Pann Tolk <pann.tolk AT gmail DOT com>, bacula-users AT lists.sourceforge DOT net
Date: Wed, 11 May 2016 09:08:07 -0400

On 5/11/2016 2:45 AM, Pann Tolk wrote:
Ok, responding to my own post.  I believe I might have resolved the problem.

I  was looking at the working directory of vchanger and then I noticed that there were TWO entries: "drive0" and an entry "0" which is a link to the volume that was last loaded into the "drive" of the autochanger:

Yes. Vchanger always uses the drive number as the symlink name. It does not "pick up" the name from the bacula-sd config, rather you have to set Archive Device in bacula-sd.conf to be the path used by vchanger.


...
...
 



I'm off now to create more volumes in the other "magazines" (filesystems) and other tasks to complete this setup.

Another problem I'm facing so far is the udev script /usr/libexec/vchanger/vchanger-mount-uuid.sh not actually mounting the inserted disks...but instead it creates a mount point (eg /mnt/vchanger/1fde15be-83a4-4b67-accc-378d5fa10ea7) with root:root permission.

The mountpoint with root:root permission is correct. The mountpoint is created by root (a script called from a udev rule) and is a directory on the underlying filesystem until something gets mounted. When another filesystem gets mounted at that mountpoint, then the permissions for the mountpoint path will take on the permissions of the newly mounted filesystem. When the filesystem is unmounted, the permissions for that path will revert back to the underlying filesystem (ie. back to root:root). You need to make sure that the permissions are bacula:tape when it is mounted, but it doesn't matter what the permissions are when it is unmounted.

The vchanger-mount-uuid.sh script first looks in /etc/fstab for a matching uuid. If found, then it uses the mountpoint specified in fstab. If not found, then it creates a mountpoint (if it doesn't already exist) at $MOUNTDIR/$UUID, where $MOUNTDIR is set in /etc/sysconfig/vchanger (or /etc/default/vchanger). By default, if not specified in /etc/sysconfig/vchanger, $MOUNTDIR=/mnt.

If vchanger-mount-uuid.sh is creating the mountpoint directory, but nothing is getting mounted, then most likely your udev is not configured to create the /dev/disk/by-uuid symlinks. The script relies on finding /dev/disk/by-uuid/$UUID, which is a symlink (created by udev rules) pointing to the actual device node assigned to the partition having that UUID.


Thanks for your time.

You are welcome.


Pann



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users