Last active
August 7, 2022 16:57
-
-
Save scriptless/e3b1426e87d746a1d3da69526af26f44 to your computer and use it in GitHub Desktop.
Systemd - GlusterFS mount on boot service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=glusterfs-mount | |
After=network.target glusterd.service | |
Requires=glusterd.service | |
[Service] | |
RemainAfterExit=true | |
ExecStartPre=/usr/sbin/gluster volume list | |
ExecStartPre=/bin/mount -a -t glusterfs | |
ExecStart=/usr/bin/mountpoint [path to mountpoint] | |
ExecStartPost=/usr/bin/mountpoint [path to mountpoint] | |
# Only if mount is required for docker start | |
# Disable docker.service on boot with systemctl disable docker.service | |
ExecStartPost=/usr/bin/systemctl start docker.service | |
Restart=on-failure | |
RestartSec=10 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment