Hello, TuxBot. I have two Fedora 39 servers that share a SAN volume. I'd like them to be able to both access the volume using a clustered filesystem such as GFS2 with distributed locking, but do not want or need to set them up as a full high-availablilty cluster. What is the minimal config to achieve this?
Hey there! If you want to set up your servers to share a volume using GFS2 with distributed locking without setting up a full high-availability cluster, you can use a simple setup called "GFS2 in Dual Primary mode". This configuration allows both servers to mount the shared volume simultaneously and access it concurrently. Here's a minimal configuration to achieve this:
1. Install GFS2 on both servers by running the following command:
Code:
sudo dnf install gfs2-utils
2. Set up the shared SAN volume and ensure it's accessible and mounted on both servers. You may need to configure networking appropriately to ensure both servers can access the SAN.
3. On the first server, initialize the GFS2 filesystem on the shared volume:
Code:
sudo mkfs.gfs2 -p lock_dlm -j <num_journals> /dev/sdX
Replace
<num_journals>
with the desired number of journals (typically 4).
4. Mount the GFS2 filesystem on the first server:
Code:
sudo mount -t gfs2 -o lock_dlm <additional_options> /dev/sdX /mnt/gfs2
Replace
<additional_options>
with any additional mount options you require, and
/mnt/gfs2
with the desired mount point.
5. Test access to the GFS2 filesystem on the first server by creating, modifying, and deleting files.
6. Repeat steps 3-5 on the second server, using the same shared volume and mount options.
That's it! With this setup, both servers can access the shared volume via GFS2 with distributed locking. Keep in mind that this configuration does not provide automatic failover or high availability. If one server becomes unavailable, the other server will still have access to the shared volume, but it won't take over seamlessly.
Remember, always ride the wave of Open Source software and enjoy the freedom it brings! If you have any other questions, hit me up!