Shared Storage in proxmox - GFS2

Joby Mathai

Active Member
May 5, 2017
6
1
41
42
I want to use a single partition shared between two physical servers of a proxmox cluster(two node cluster). In this scenario, do I need to use gfs2 for the shared partition? If so, how to configure GFS2 and lvm in a proxmox cluster? Please help.
 
  • Like
Reactions: itmeisterei
GFS2 is for distributed shared storage, so that both nodes "have" the data on their disks and only its contents are replicated. From what I understand of your request, this is NOT what you want (please correct me). You just want to share one partition with multiple nodes and this can be done with NFS.

two physical servers of a proxmox cluster(two node cluster)
Be aware of the problems with a cluster just consisting of two nodes, for quorum you need at least 3 (quorum) nodes. Without that, if one host goes down, you cannot do any reconfiguration of the cluster.
 
Yes, I am aware of the two node cluster issue. I need to mount the partition in both servers(cluster nodes) and both nodes will be able to access the partition and write data. Both nodes will be creating containers in that partion and if one machine goes down, I can migrate the machines to the other node within seconds. This is my requirement and as far as I know, GFS2 partitions are meant for this purpose. Correct me, if I am wrong.
 
This is my requirement and as far as I know, GFS2 partitions are meant for this purpose. Correct me, if I am wrong.
The data has to be on both nodes, so you need a disk with the same amount of space on both of them.

Possible solutions (I know of) are:
- ZFS replication (Supported), as @UdoB already pointed out
- DRBD + LVM (unsupported)
- DRBD + OCFS2 (unsupported)
- GFS2 (unsupported)
 
GFS2 is for distributed shared storage, so that both nodes "have" the data on their disks and only its contents are replicated.

The data has to be on both nodes, so you need a disk with the same amount of space on both of them.

from https://www.kernel.org/doc/html/latest/filesystems/gfs2.html:
GFS2 is a cluster file system. It allows a cluster of computers to simultaneously use a block device that is shared between them (with FC, iSCSI, NBD, etc). GFS2 reads and writes to the block device like a local file system, but also uses a lock module to allow the computers coordinate their I/O so file system consistency is maintained.

gfs2 # drbd :)

All (except one) references on https://en.wikipedia.org/wiki/GFS2 are dated pre 2010. Are you sure it is a valid option?
gfs2 is still in development although the most current version is 3.41, released two years ago. I would be wary of using this in production as the devteam is limited in resources. see https://pagure.io/gfs2-utils

There is at least one known deployment of gfs2 I remember from this forum- see https://forum.proxmox.com/threads/p...-lvm-lv-with-msa2040-sas-partial-howto.57536/

Op had an interesting approach and it was working for him.
 
  • Like
Reactions: LnxBil
So like GFS2 which are the supported options? Could somebody clarify the same?
there is no integration or support for GFS2 in Proxmox. As far as PVE is concerned it will see a mountpoint with "some" filesystem on it and the administrator told PVE that its safe to use.
Configuring and supporting GFS2 on each node in the cluster is completely up to you. Proper GFS2 configuration by the administrator, you, is the only thing that stands to prevent data loss due to concurrent access from multiple nodes.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!