See references [1] and [2]
Do the following on all nodes unless stated.
(a) Prepare disks
(Assumes the disk is /dev/sdd)
	
	
	
		
Append the following line:
/dev/mapper/vg_proxmox-lv_proxmox /data/proxmox xfs defaults 0 0
	
	
	
		
(b) Install GlusterFS
	
	
	
		
check connection to other gluster server nodes:
	
	
	
		
(c) Create and start the Gluster volume on a single nodes replicating over 2 nodes (we'll add the 3rd separately below just to show that process of adding extra nodes)
	
	
	
		
volume create: gfs-volume-proxmox: success: please start the volume to access data
	
	
	
		
volume start: gfs-volume-proxmox: success
	
	
	
		
Volume Name: gfs-volume-proxmox
Type: Replicate
Volume ID: cfc9bff3-c80d-4ac6-8d6d-e4cd47fbfd8e
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 10.140.79.120:/data/proxmox
Brick2: 10.140.79.123:/data/proxmox
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off
(d) To add more Gluster bricks
On a single PVE nodes do the following (See references [3]):
	
	
	
		
(e) Add Gluster storage to Proxmox
In Proxmox web interface select "Datacenter" > "Storage" > "Add" > "GlusterFS"
Enter an ID and two of the three server IP addresses (i.e from above)
Enter the volume name from above (i.e. "gfs-volume-proxmox")
Select the Content.
(e) To configure Debian-based systems to automatically start the glusterd service every time the system boots, enter the following from the command line:
# systemctl enable glusterd
# echo "glusterd" >> /etc/rc.local
(Above doesn't seem to work)
Potential solution:
"I found this post with the solution:
This will allow glusterd to be started after the network has come up."
References:
[1] https://forum.proxmox.com/threads/h...d-setup-replica-storage-with-glusterfs.31695/
[2] https://icicimov.github.io/blog/vir...storage-to-Proxmox-to-support-Live-Migration/
[3] https://www.cyberciti.biz/faq/howto-add-new-brick-to-existing-glusterfs-replicated-volume/
				
			Do the following on all nodes unless stated.
(a) Prepare disks
(Assumes the disk is /dev/sdd)
		Code:
	
	fsidk -l /dev/sdd
pvcreate /dev/sdd
vgcreate vg_proxmox /dev/sdd
lvcreate --name lv_proxmox -l 100%vg vg_proxmox
mkfs -t xfs -f -i size=512 -n size=8192 -L PROXMOX /dev/vg_proxmox/lv_proxmox
mkdir -p /data/proxmox
nano /etc/fstab/dev/mapper/vg_proxmox-lv_proxmox /data/proxmox xfs defaults 0 0
		Code:
	
	mount -a
mount | grep proxmox(b) Install GlusterFS
		Code:
	
	apt-get install glusterfs-server glusterfs-client
reboot now
systemctl start glusterdcheck connection to other gluster server nodes:
		Code:
	
	gluster peer probe 10.X.X.X(c) Create and start the Gluster volume on a single nodes replicating over 2 nodes (we'll add the 3rd separately below just to show that process of adding extra nodes)
		Code:
	
	gluster volume create gfs-volume-proxmox transport tcp replica 2 10.X.X.X:/data/proxmox 10.X.X.X:/data/proxmox force
		Code:
	
	gluster volume start gfs-volume-proxmox
		Code:
	
	gluster volume infoType: Replicate
Volume ID: cfc9bff3-c80d-4ac6-8d6d-e4cd47fbfd8e
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 10.140.79.120:/data/proxmox
Brick2: 10.140.79.123:/data/proxmox
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off
(d) To add more Gluster bricks
On a single PVE nodes do the following (See references [3]):
		Code:
	
	gluster volume add-brick gfs-volume-proxmox replica 3 10.X.X.X:/data/proxmox force(e) Add Gluster storage to Proxmox
In Proxmox web interface select "Datacenter" > "Storage" > "Add" > "GlusterFS"
Enter an ID and two of the three server IP addresses (i.e from above)
Enter the volume name from above (i.e. "gfs-volume-proxmox")
Select the Content.
(e) To configure Debian-based systems to automatically start the glusterd service every time the system boots, enter the following from the command line:
# systemctl enable glusterd
(Above doesn't seem to work)
Potential solution:
"I found this post with the solution:
- Execute systemctl enable NetworkManager-wait-online
- Add the following to /lib/systemd/system/crond.service under [Unit]:
 Requires=network.target
 After=syslog.target auditd.service systemd-user-sessions.service time-sync.target network.target mysqld.service
This will allow glusterd to be started after the network has come up."
References:
[1] https://forum.proxmox.com/threads/h...d-setup-replica-storage-with-glusterfs.31695/
[2] https://icicimov.github.io/blog/vir...storage-to-Proxmox-to-support-Live-Migration/
[3] https://www.cyberciti.biz/faq/howto-add-new-brick-to-existing-glusterfs-replicated-volume/
			
				Last edited: 
				
		
	
										
										
											
	
										
									
								 
	 
	
 
 
		