Last active 1710702440

anduin's Avatar anduin revised this gist 1710702440. Go to revision

1 file changed, 2 insertions, 1 deletion

mount.sh

@@ -29,7 +29,8 @@ gluster volume status
29 29 gluster volume info swarm-vol
30 30
31 31 # Mount the volume (Run on all nodes)
32 - echo 'localhost:/swarm-vol /swarm-vol glusterfs defaults,_netdev,noauto,x-systemd.automount 0 0' >> /etc/fstab
32 + echo 'localhost:/swarm-vol /swarm-vol glusterfs defaults,_netdev,x-systemd.requires=glusterd.service,x-systemd.automount 0 0' >> /etc/fstab
33 +
33 34 mkdir -p /swarm-vol
34 35 mount /swarm-vol
35 36 chown -R root:docker /swarm-vol

anduin's Avatar anduin revised this gist 1710608900. Go to revision

1 file changed, 3 insertions, 1 deletion

mount.sh

@@ -36,4 +36,6 @@ chown -R root:docker /swarm-vol
36 36
37 37 # Final check
38 38 cd /swarm-vol/
39 - df -Th .
39 + df -Th .
40 +
41 + # READ: https://docs.gluster.org/en/v3/Administrator%20Guide/Managing%20Volumes/

anduin's Avatar anduin revised this gist 1710605296. Go to revision

1 file changed, 2 insertions, 17 deletions

mount.sh

@@ -28,27 +28,12 @@ gluster volume start swarm-vol
28 28 gluster volume status
29 29 gluster volume info swarm-vol
30 30
31 - # Mount the volume (Run on all nodes)
32 - echo 'localhost:/swarm-vol /swarm-vol glusterfs defaults,_netdev,backupvolfile-server=localhost 0 0' >> /etc/fstab
31 + # Mount the volume (Run on all nodes)
32 + echo 'localhost:/swarm-vol /swarm-vol glusterfs defaults,_netdev,noauto,x-systemd.automount 0 0' >> /etc/fstab
33 33 mkdir -p /swarm-vol
34 34 mount /swarm-vol
35 35 chown -R root:docker /swarm-vol
36 36
37 - # Hack to fix gluster not mounting on boot (Run on all nodes)
38 - sudo mkdir /etc/systemd/system/swarm-vol.mount.d
39 - echo "[Unit]
40 - Requires=glusterfs-server.service
41 - After=network-online.target
42 - Wants=glusterfs-server.service
43 - Restart=always
44 - RestartSec=3
45 -
46 - [Intall]
47 - WantedBy=multi-user.target
48 - " | sudo tee /etc/systemd/system/swarm-vol.mount.d/override.conf
49 - sudo systemctl daemon-reload
50 - sudo systemctl start swarm\\x2dvol.mount
51 -
52 37 # Final check
53 38 cd /swarm-vol/
54 39 df -Th .

anduin's Avatar anduin revised this gist 1710604461. Go to revision

1 file changed, 2 insertions, 2 deletions

mount.sh

@@ -40,8 +40,8 @@ echo "[Unit]
40 40 Requires=glusterfs-server.service
41 41 After=network-online.target
42 42 Wants=glusterfs-server.service
43 - StartLimitInterval=0
44 - StartLimitBurst=0
43 + Restart=always
44 + RestartSec=3
45 45
46 46 [Intall]
47 47 WantedBy=multi-user.target

anduin's Avatar anduin revised this gist 1710604115. Go to revision

1 file changed, 2 insertions

mount.sh

@@ -40,6 +40,8 @@ echo "[Unit]
40 40 Requires=glusterfs-server.service
41 41 After=network-online.target
42 42 Wants=glusterfs-server.service
43 + StartLimitInterval=0
44 + StartLimitBurst=0
43 45
44 46 [Intall]
45 47 WantedBy=multi-user.target

anduin's Avatar anduin revised this gist 1710603928. Go to revision

1 file changed, 1 insertion, 1 deletion

mount.sh

@@ -45,7 +45,7 @@ Wants=glusterfs-server.service
45 45 WantedBy=multi-user.target
46 46 " | sudo tee /etc/systemd/system/swarm-vol.mount.d/override.conf
47 47 sudo systemctl daemon-reload
48 -
48 + sudo systemctl start swarm\\x2dvol.mount
49 49
50 50 # Final check
51 51 cd /swarm-vol/

anduin's Avatar anduin revised this gist 1710602583. Go to revision

1 file changed, 11 insertions, 1 deletion

mount.sh

@@ -35,7 +35,17 @@ mount /swarm-vol
35 35 chown -R root:docker /swarm-vol
36 36
37 37 # Hack to fix gluster not mounting on boot (Run on all nodes)
38 - echo -e "\n\nsleep 10s && mount -a" >> /etc/rc.local
38 + sudo mkdir /etc/systemd/system/swarm-vol.mount.d
39 + echo "[Unit]
40 + Requires=glusterfs-server.service
41 + After=network-online.target
42 + Wants=glusterfs-server.service
43 +
44 + [Intall]
45 + WantedBy=multi-user.target
46 + " | sudo tee /etc/systemd/system/swarm-vol.mount.d/override.conf
47 + sudo systemctl daemon-reload
48 +
39 49
40 50 # Final check
41 51 cd /swarm-vol/

anduin's Avatar anduin revised this gist 1710600621. Go to revision

1 file changed, 4 insertions

mount.sh

@@ -36,3 +36,7 @@ chown -R root:docker /swarm-vol
36 36
37 37 # Hack to fix gluster not mounting on boot (Run on all nodes)
38 38 echo -e "\n\nsleep 10s && mount -a" >> /etc/rc.local
39 +
40 + # Final check
41 + cd /swarm-vol/
42 + df -Th .

anduin's Avatar anduin revised this gist 1710600570. Go to revision

1 file changed, 1 insertion, 1 deletion

mount.sh

@@ -23,7 +23,7 @@ gluster volume create swarm-vol replica 3 \
23 23 node1:/var/no-direct-write-here/gluster-bricks/swarm-vol \
24 24 node2:/var/no-direct-write-here/gluster-bricks/swarm-vol \
25 25 node3:/var/no-direct-write-here/gluster-bricks/swarm-vol
26 - gluster volume set gfs auth.allow 10.64.50.*
26 + gluster volume set swarm-vol auth.allow 10.64.50.*
27 27 gluster volume start swarm-vol
28 28 gluster volume status
29 29 gluster volume info swarm-vol

anduin's Avatar anduin revised this gist 1710600534. Go to revision

1 file changed, 1 insertion, 1 deletion

mount.sh

@@ -23,7 +23,7 @@ gluster volume create swarm-vol replica 3 \
23 23 node1:/var/no-direct-write-here/gluster-bricks/swarm-vol \
24 24 node2:/var/no-direct-write-here/gluster-bricks/swarm-vol \
25 25 node3:/var/no-direct-write-here/gluster-bricks/swarm-vol
26 - gluster volume set gfs auth.allow 10.0.0.*
26 + gluster volume set gfs auth.allow 10.64.50.*
27 27 gluster volume start swarm-vol
28 28 gluster volume status
29 29 gluster volume info swarm-vol
Newer Older