Good to know that it works for you now.
Yes, you are right, that is necesary because bareos-sd runs as user bareos:
gluster volume set VOLNAME server.allow-insecure on
and adding the line
option rpc-auth-allow-insecure on
to /etc/glusterfs/glusterd.vol
and restart glusterd:
service glusterd restart
Without these settings, there will be error messages like
E [rpcsvc.c:617:rpcsvc_handle_rpc_call] 0-rpc-service: Request received from non-privileged port. Failing request
in /var/log/glusterfs/etc-glusterfs-glusterd.vol.log
Not sure, but I don't think that this makes it much more insecure, as it
could be hacked from privileged ports as well. There may be other options
for increasing security or restricting access.
There are also other reasons that require these setting, for example see
https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/chap-Managing_Snapshots.html#Prerequisites37
Some more hints here, just in case somebody else wants to test it:
To create the directory for bareos-sd in the glusterfs Volume,
a FUSE mount can be used, eg.
mount -t glusterfs c6glfs01.stephand.kvm:/repvol1 /mnt
mkdir -p /mnt/deb7tst01/bareos-storage
chown bareos.bareos /mnt/deb7tst01/bareos-storage
chmod 770 /mnt/deb7tst01/bareos-storage
It's easiest to do this from the system that runs bareos-sd, because
the numerical uid/gid must match:
root@deb7tst01:~# ls -la /mnt/deb7tst01/
total 0
drwxr-xr-x 3 root root 27 Feb 17 22:12 .
drwxr-xr-x 8 root root 123 Feb 17 22:11 ..
drwxrwx--- 2 bareos bareos 22 Feb 17 22:25 bareos-storage
root@deb7tst01:~# ls -lan /mnt/deb7tst01/
total 0
drwxr-xr-x 3 0 0 27 Feb 17 22:12 .
drwxr-xr-x 8 0 0 123 Feb 17 22:11 ..
drwxrwx--- 2 104 106 22 Feb 17 22:25 bareos-storage
root@deb7tst01:~# id bareos
uid=104(bareos) gid=106(bareos) groups=106(bareos),6(disk),26(tape)
umount /mnt
bareos-sd config example:
#
# Preparations:
#
# include this configuration file in bareos-sd.conf by
# @/etc/bareos/bareos-sd.d/device-gluster.conf
#
Device {
Name = GlusterStorage
Archive Device = gluster://
192.168.122.47/repvol1/deb7tst01/bareos-storage
Device Type = gfapi
Media Type = GlusterFile
Label Media = yes
Random Access = yes
Automatic Mount = yes
Removable Media = no
Always Open = no
}
and add configuration in bareos-dir.conf:
Storage {
Name = GlusterFile
# Do not use "localhost" here
Address = deb7tst01.stephand.kvm # N.B. Use a fully qualified name here
Password = "xJe56FBrbUnKJFR0/Z1X/HCm3NiaJ0XwK84XFv+WtQ3Y"
Device = GlusterStorage
Media Type = GlusterFile
}
The Name is arbitrary, but Media Type must be GlusterFile.
To run a test, in bconsole do:
run job=BackupClient1 level=Full storage=GlusterFile
Regards,