On 5/6/2016 3:07 AM, Pann Tolk wrote:
Hi Josh,
......
May 06 14:34:06 deneb systemd-udevd[2578]:
'/usr/libexec/vchanger/vchanger-launch-mount.sh
1fde15be-83a4-4b67-accc-378d5fa10ea7'(err) ' device-enumerator:
scanning /sys/class'
====>> May 06 14:34:06 deneb systemd-udevd[2578]: Process
'/usr/libexec/vchanger/vchanger-launch-mount.sh
1fde15be-83a4-4b67-accc-378d5fa10ea7' succeeded.
^^^
^^^ Here, udevd says that
/usr/libexec/vchanger/vchanger-launch-mount.sh script has completed
running successfully.
Udev expects any scripts launched by udev rules to execute quickly and
not cause delays, therefore the vchanger-launch-mount.sh script launched
by udev simply causes the /usr/libexec/vchanger/vchanger-mount-uuid.sh
script to be invoked as a background process and then terminates. So a
success simply means that vchanger-launch-maount.sh successfully invoked
vchanger-mount-uuid.sh in a background process, not that it mounted
successfully.
The default mountdir is /mnt. To mount under say /mnt/vchanger it is
necessary to set MOUNTDIR=/mnt/vchanger in /etc/sysconfig/vchanger.
Alternatively, you can use a line like
UUID=1fde15be-83a4-4b67-accc-378d5fa10ea7 /any/existing/directory/name
ext4 defaults,rw,relatime,data=ordered 0 0
in /etc/fstab to cause vchanger-mount-uuid.sh to mount it wherever you
like. When specified as magazine=uuid:, vchanger will lookup the
mountpoint using libudev and so doesn't really care where it gets
mounted. When using magazine=/some/static/path, it must be mounted at
the specified path.
You can umount the partition and then run vchanger-mount-uuid.sh (as
root) with the uuid as its only parameter to see what it does.
Unfortunately, the script is very simple and doesn't provide logging.
A point to note about the kernel reporting that it has mounted the
filesystem. When I checked with mount command, the filesystem was not
mounted.
[root@deneb ~]# mount | grep vchanger
[root@deneb ~]#
Don't know why. Did /usr/libexec/vchanger/vchanger-launch-mount.sh
actually mounts it?
No. /usr/libexec/vchanger/vchanger-mount-uuid.sh does. If mount info for
the partition is not specified by uuid in /etc/fstab, then it mounts it
at $MOUNTDIR/$1, where $1 is the filesystem UUID. So you can use mount |
grep 1fde15be-83a4-4b67-accc-378d5fa10ea7 to find it.
Anyway, to test further, I manually mount it:
[root@deneb ~]# mount
/dev/disk/by-uuid/1fde15be-83a4-4b67-accc-378d5fa10ea7
/mnt/vchanger/1fde15be-83a4-4b67-accc-378d5fa10ea7/
[root@deneb ~]# mount | grep vchanger
/dev/sdb1 on /mnt/vchanger/1fde15be-83a4-4b67-accc-378d5fa10ea7 type
ext4 (rw,relatime,data=ordered)
[root@deneb ~]#
Then, I did what you mentioned:- I modified
/etc/vchanger/vchanger01.conf and changed the
bconsole="/usr/sbin/bconsole" line to bconsole = "".
Then I tried the following again.
[root@deneb ~]# vchanger /etc/vchanger/vchanger01.conf listmags
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
0:18:1:/mnt/vchanger/1fde15be-83a4-4b67-accc-378d5fa10ea7
1:::
2:::
3:::
So vchanger is working properly when run as root. What does it do when
you run that same command as user bacula:tape? Are you sure bacula-sd is
running as user bacula:tape? vchanger must run as the same user as
bacula-sd. It could still be a permissions issue. You can set 'log level
= 7' and 'logfile = /path/to/logfile' in vchanger.conf to debug
vchanger, but you must run it as user bacula:tape to debug if it is a
permissions issue.
[root@deneb ~]# vchanger /etc/vchanger/vchanger01.conf list
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
device-enumerator: scan all dirs
device-enumerator: scanning /sys/bus
device-enumerator: scanning /sys/class
1:vchanger01_0_0
2:vchanger01_0_1
3:vchanger01_0_10
4:vchanger01_0_11
5:vchanger01_0_12
6:vchanger01_0_13
7:vchanger01_0_14
8:vchanger01_0_15
9:vchanger01_0_16
10:vchanger01_0_17
11:vchanger01_0_2
12:vchanger01_0_3
13:vchanger01_0_4
14:vchanger01_0_5
15:vchanger01_0_6
16:vchanger01_0_7
17:vchanger01_0_8
18:vchanger01_0_9
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
[root@deneb ~]# bconsole
Connecting to Director deneb.chuakt.local:9101
1000 OK: 102 bacula-dir Version: 7.4.0 (16 January 2016)
Enter a period to cancel a command.
*update slots
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: vchanger01
Connecting to Storage daemon vchanger01 at deneb.chuakt.local:9103 ...
3306 Issuing autochanger "slots" command.
Device "SATA-vchanger01" has 0 slots.
No slots in changer to scan.
*
In the end, I'm still getting the error in bconsole:
Device "SATA-vchanger01" has 0 slots.
No slots in changer to scan.
By any chance I may have misconfigured something within
bacula-dir.conf and bacula-sd.conf?
Thanks again,
Pann
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users