Project

General

Profile

Actions

Task #1976

closed

berta & antares: shares from local gluster server not mounted at boot (attempt to mount before glulsterfs-server is fully started)

Added by Christian Lohmaier almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Low
Category:
Backups
Target version:
Team - Pool
Start date:
Due date:
% Done:

0%

Tags:

Description

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:

  • /etc/systemd/system/glusterfs-server.service.d/require_nw-online.conf
    [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:

  • adding x-systemd.requires=glusterfs-server.service to options in /etc/fstab - this seems to be ignored completely by debian 8
  • adding /etc/systemd/system/srv-fileshare-mnt.mount with 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)

Actions

Also available in: Atom PDF