berta & antares: shares from local gluster server not mounted at boot (attempt to mount before glulsterfs-server is fully started)
This affects only berta (and antares), as those are the only hosts that have a gluster volume that is only provided by the local machine. For antares it doesn't matter if volumes aren't mounted at reboot, but for berta it is critical that the backup-berta volume is mounted for rsnapshot.
I tired to add order in the mounts by adding corresponding systemd unit files to add dependencies, but this unfortunately not enough, the mount still is attempted too early.
what is needed nevertheless is to have glusterfs-server depend not only on network (the systemd default target), but networking (the init.d job/service) as otherwise dhcp is not done yet, and gluster might fail to resolve berta.tdf/the other gluster peers:
[Unit] Wants=networking.service After=networking.service
This ensures that gluster is started after the internal network is brought up
Failed attemts to ensure the volume mounts succeed:
x-systemd.requires=glusterfs-server.serviceto options in
/etc/fstab- this seems to be ignored completely by debian 8
/etc/systemd/system/srv-fileshare-mnt.mountwith following content
[Unit] Description=Loads the local fileshare volume Wants=glusterfs-server.service After=glusterfs-server.service basic.target [Mount] What=antares.tdf:fileshare-antares Where=/srv/fileshare/mnt Type=glusterfs [Install] WantedBy=multi-user.target
while enabling that unit correctly attempts to mount after the glusterfs-server job is started, it is still too early, gluster isn't done with its initializing and the mount fails. Problem might be that the glusterfs-server is not a native systemd unit, but only a sysvinit one...
So easy workaround would be to add a @reboot cronjob with a sleep.... but of course still remains the chance of having a rsnapshot job triggered before the backup-berta volume is mounted (didn't try what happens when the /srv/rsnapshot symlink points to non-available dir and rsnapshot is run)
Updated by Florian Effenberger about 4 years ago
- Assignee changed from Christian Lohmaier to Guilhem Moulin
- Target version changed from Q3/2016 to Pool
Assinging to Guilhem
From what I recall, it's not that urgent - maybe you can quickly sync with Cloph about the impacts/caveats so we can prioritize and plan accordingly?
Adding to pool for the moment, as it doesn't look that super-urgent (anymore)
Updated by Guilhem Moulin over 3 years ago
- Priority changed from Normal to Low
Last time we rebooted berta (june 18) we indeed had to manually mount the gluster fileshare. IMHO not a big deal as long as it doesn't interrupt the boot process and drops to a rescue shell. rsnapshot will complain loud enough (through cron mails) that the mountpoints don't exist ;-)
I'll see if I can adapt cloph's systemd.mount(5) suggested unit file next time we reboot the box, but I'm lowering the priority in the meantime.
Updated by Guilhem Moulin about 2 years ago
- Status changed from In Progress to Closed
Yeah, that was brought during at infra call, closing:
Guilhem Moulin wrote:
It doesn't disrupt the boot process anymore, and we've got a safety net in place to ensure we don't forget to mount what needs to be mounted.