Multiple file daemons per host

36 views
Skip to first unread message

GB

unread,
Mar 1, 2022, 12:36:14 PM3/1/22
to bareos-users
I have a HA setup with a two multpathed ZFS pools that can be imported into two hosts, with pacemaker and corosync.

 In a typically configuration Zpool1 is on host 1 and zpool2 is on host b. on failover Zpool1 and Zpool 2 will be on host 2.

tthe setup is very similar to as described here

my options for backup of this are
1)  back up the NFS share from a file daemon on a remote server

2)  back up the zfs pool directly

if backing up the zfs pool directly it makes sense to configure a file daemon for each pool that travels with it in the pacemaker resources, starting after the zfs pool and stopping before zfs pool does.

I would prefer to back up the pool directly because of the extended file attributes avalable and the more performant backup speeds

I cant find a way to make two file daemons start on the same host and not interfere. I have tried editing the systemd files and config directorys of them. There is no documentation on this, has anyone got any config files that would allow this?





GB

unread,
Apr 4, 2022, 7:22:48 AM4/4/22
to bareos-users
The solution:

given each pool has a seperate IP adress through pacemaker

  FDAddresses  = {
    ip = { addr = XX.XXX.XXX.XXX; port = 9102; }
  }

add this to the filedaemon config
and add pacemaker filedaemon  resource to zfs pool group

then the syetemd config of the pools filedaemon has to be modified, you need a new /etc/bareos-POOLNAME folder for each pool

[Unit]
Description=Bareos File Daemon service tank03
Documentation=man:bareos-fd(8)
Requires=network.target nss-lookup.target time-sync.target
After=network-online.target nss-lookup.target remote-fs.target time-sync.target

[Service]
Type=simple
User=root
Group=bareos
WorkingDirectory=/var/lib/bareos
ExecStart=/usr/sbin/bareos-fd -c /etc/bareos-POOLNAME-f
SuccessExitStatus=0 15
Restart=on-failure
# IOSchedulingClass=idle

[Install]
Alias=bareos-fd-POOLNAME.service
WantedBy=multi-user.target

this setup works great, much better than backing up through NFS and you get acess to snapshots
Reply all
Reply to author
Forward
0 new messages