Skip to main content

Conifguration of GFS2 File system on Oracle Linux 9

In this blogpost we will see how we can use the GFS2 (Global File System 2) on Oracle Linux 9 allows multiple cluster nodes to concurrently access a shared block storage device—ideal for highly available applications in a clustered environment (e.g., with KVM, OLVM, or Pacemaker clusters). Prerequisites: System Requirements Oracle Linux 9 with UEK kernel Shared block storage (iSCSI, FC, or shared disk) 1. Cluster infrastructure (Pacemaker/Corosync) Fencing configured (GFS2 requires it) Install Required Packages (on all nodes):
bash#dnf install -y gfs2-utils lvm2-cluster pcs fence-agents-all
2. Enable and Start Cluster Services:
bash#systemctl enable --now pcsd
bash#echo "yourpassword" | passwd --stdin hacluster
bash#pcs host auth node1 node2 node3 -u hacluster -p yourpassword
bash#pcs cluster setup --name gfscluster node1 node2 node3
bash#pcs cluster start --all
bash#pcs cluster enable --all
3. Configure Shared Storage: If using LVM, make sure to enable clustering:
# On all nodes:
bash#lvmconf --enable-cluster
bash#systemctl restart lvm2-lvmetad.service
4. Create and Mount the GFS2 Filesystem:
bash#mkfs.gfs2 -p lock_dlm -t gfscluster:gfsdata -j 3 /dev/gfs_vg/gfs_lv
-t gfscluster:gfsdata → Cluster name and lock name -j 3 → One journal per node 

5. Mount GFS2 on All Nodes: Create mount point, add to fastab and mount:
bash#mkdir /mnt/gfs
bash#vi /etc/fastab
bash#/dev/gfs_vg/gfs_lv /mnt/gfs gfs2 defaults 0 0
bash#mount -a
6. Fencing Is Mandatory: GFS2 will not mount if fencing is not configured. Example fencing (IPMI):
bash#pcs stonith create fence-node1 fence_ipmilan ipaddr=IPMI1 login=admin passwd=pass lanplus=1 pcmk_host_list="node1"
Repeat for all nodes that are going to be part of the cluster. 7. Check Status Verify GFS2 is mounted and functioning on all nodes:
bash#df -h /mnt/gfs
Conclusion: A GFS2 (Global File System 2) cluster offers significant benefits for high-availability and shared-storage environments. It allows multiple nodes in a cluster to access the same file system simultaneously on shared block storage, ensuring data consistency and eliminating the need for data replication across servers. This concurrent access is crucial for clustered applications, virtual machine images, and databases that require real-time coordination. GFS2 integrates tightly with cluster management tools like Pacemaker and Corosync, enabling robust failover, fencing, and resource control. By centralizing data storage and supporting coordinated access, a GFS2 cluster enhances scalability, simplifies storage management, and minimizes downtime, making it an ideal solution for enterprise-grade workloads. BR, ZAHEER

Comments

Popular posts from this blog

Disable Firewall on Oracle Linux 8

In this blogpost we will see how we can stop/disable the firewall on Oracle Linux 8, the firewall command is same in both linux 7 an linux 8. The below listed is the procedure for stopping and disabling the  firewall on Oracle Linux 8. - Here we can see the firewall deamon in active state - Here when we stop the firewall in previous command, now the firewall daemon is dead - For permanent disabling the firewall on server, we can use "disable" option The following commands will be helpful: #systemctl status firewalld #systemctl stop firewalld #systemctl disable firewalld #systemctl enable firewalld #systemctl start firewalld Hope it helps !! Thanks for reading :) regards, X A H E E R

Enable Desktop on Oracle Solaris 11.4

Oracle Solaris 11 installation has multiple options to choose for installation of an Operating Environment, but mostly Oracle Solaris text install media is used and this installation media doesn't offer the GUI Desktop Environment by default after the installation. This blog post will explain how we can enable the desktop for Oracle Solaris 11.4 operating system, after the completion of installation. We have to install "solaris-desktop" package and reboot the machine and GUI desktop will be enabled for the Operating System. In this blog post my virtual machine is connected to the internet and hence I am able to use available pupblic repository for package installation, if in case internet is not available for the server/machine then we have configure the local/Server  repository for the installation. Follow the below steps for desktop package installation: After installation of dekstop package we are now able to login with GUI desktop environment...

Oracle AVDF Installation and Setup Document

This blogpost will provide you detailed information about Oracle Audit Vault and Database Firewall (Oracle AVDF) setup. Oracle AVDF is a comprehensive Database Activity Monitoring (DAM) solution that integrates with native audit data. Environment Setup: [oracrp@ebs-dev2-db01 ~]$ mkdir -pv /oradb/oracle/avcli mkdir: created directory ‘/oradb/oracle/avcli’ [oracrp@ebs-dev2-db01 ~]$ mkdir -pv /oradb/oracle/avagent mkdir: created directory ‘/oradb/oracle/avagent’ [oracrp@ebs-dev2-db01 ~]$ - Add these variables to the environment file vi DEV2CDB.env # AVS export AVCLI_HOME="/oradb/oracle/avcli" export AV_HOME="/oradb/oracle/avagent" export PATH="$PATH:$AV_HOME/bin" Download the JAR files:   AVDF installation requires one network interface card on respective hosts. IP assigned to AV server NIC will communicate with target databases and IP assigned to DF server will connect to AV Download - Agent jar file:   Login to AV console as avadmin user   - Go t...