Jump to content

Jalindia cluster installation and configuration

From TetraWiki
Revision as of 16:27, 26 July 2026 by Admin (talk | contribs) (Auto-created from uploaded PDF text extraction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Auto-generated from the uploaded PDF Jalindia_cluster_installation_and_configuration.pdf. This is an extracted-text rendering for searchability; see the original PDF for exact formatting, diagrams, tables, and images.


PCS cluster installation and configuration
—-----------------------------------------------------

OS - rhel 9


1. subscription-manager repos
--enable=rhel-9-for-x86_64-highavailability-rpms (both node)
2. dnf install pcs pacemaker fence-agents-all (both node)
3. passwd hacluster (set on same passwd on same both)
4. systemctl start pcsd.service (both node)
5. systemctl enable pcsd.service (both node)
6. pcs host auth mailbox1.jalindia.com mailbox2.jalindia.co.in -u
hacluster
7. pcs cluster setup my_cluster --start mailbox1.jalindia.com
mailbox2.jalindia.co.in
8. pcs cluster enable --all
9. pcs cluster status
10. subscription-manager repos
--enable=rhel-9-for-x86_64-resilientstorage-rpms
11. dnf install lvm2-lockd gfs2-utils dlm
12. vi /etc/lvm/lvm.conf
change #use_lvmlockd = 0
use_lvmlockd = 1
then save and exit
13. pcs property set no-quorum-policy=freeze
14. pcs resource create dlm --group locking ocf:pacemaker:controld op
monitor interval=30s on-fail=fence
15. pcs resource clone locking interleave=true
16. pcs resource create lvmlockd --group locking ocf:heartbeat:lvmlockd
op monitor interval=30s on-fail=fence
17. pcs status --full
18. vgcreate --shared shared_vg1 /dev/mapper/3600asmkfdr2324
19. lvmdevices --adddev /dev/ (vgname) --run on second node
20. vgchange --lockstart shared_vg1 --run on second node
21. lvcreate --activate sy +100%FREE -n shared_lv1 shared_vg1

22. mkfs.gfs2 -j2 -p lock_dlm -t my_cluster:gfs2-demo1
/dev/shared_vg1/shared_lv1
23. pcs resource create sharedlv1 --group shared_vg1
ocf:heartbeat:LVM-activate lvname=shared_lv1 vgname=shared_vg1
activation_mode=shared vg_access_mode=lvmlockd
24. pcs resource clone shared_vg1 interleave=true
25. pcs constraint order start locking-clone then shared_vg1-clone
26. pcs constraint colocation add shared_vg1-clone with locking-clone
27. lvs check lv on both node lv is visible on both node
28. pcs resource create sharedfs1 --group shared_vg1
ocf:heartbeat:Filesystem device="/dev/shared_vg1/shared_lv1"
directory="/opt" fstype="gfs2" options=noatime op monitor interval=10s
on-fail=fence
29. pcs status --full
30. Before configuring Zimbra, it is necessary to correct the path where
the certifying unit (CA) is located:
mkdir -p /opt/zimbra/java/jre/lib/security/
ln -s /opt/zimbra/common/etc/java/cacerts
/opt/zimbra/java/jre/lib/security/cacerts
chown -R zimbra.zimbra /opt/zimbra/java
31. cd zcs file then run install.sh
32. after installation on mailbox1 then stop cluster on mailbox2
33. pcs cluster stop mailbox2.jalindia.co.in
mkdir -p /opt/zimbra/java/jre/lib/security/
ln -s /opt/zimbra/common/etc/java/cacerts
/opt/zimbra/java/jre/lib/security/cacerts
chown -R zimbra.zimbra /opt/zimbra/java
34. run Zimbra install.sh with -s (./install.sh -s)
35. after installation move /opt/Zimbra directory to another location
# killall -9 -u zimbra
# mv /opt/zimbra /root/old-zimbra
36. pcs cluster start mailbox2.jalindia.co.in
37. vi zimbractl and copy the content and paste it
https://gist.github.com/skbly7/49d034c3db7aff635187e595c7a0eb5a
(open this url and copy content)
38. cp -v zimbractl /usr/lib/ocf/resource.d/heartbeat/
39. chmod 775 /usr/lib/ocf/resource.d/heartbeat/zimbractl

40. copy same file on another mailbox server on same location
41. pcs resource create zimbra ocf:heartbeat:zimbractl op monitor
interval=30s
42. pcs resource op remove zimbra monitor
43. pcs constraint colocation add zimbra virtual_ip INFINITY
44. pcs constraint order virtual_ip then Zimbra
45. pcs status
—------------------------------------------------
[root@mailbox1 admin]# pcs status
Cluster name: my_cluster
Cluster Summary:
  * Stack: corosync (Pacemaker is running)
  * Current DC: mailbox2.jalindia.co.in (version 2.1.8-3.el9-3980678f0) -
MIXED-VERSION partition with quorum
  * Last updated: Thu Jul 31 12:12:47 2025 on mailbox1.jalindia.co.in
  * Last change: Thu Jul 17 12:45:26 2025 by hacluster via hacluster on
mailbox1.jalindia.co.in
  * 2 nodes configured
  * 10 resource instances configured

Node List:
 * Node mailbox2.jalindia.co.in: standby
 * Online: [ mailbox1.jalindia.co.in ]

Full List of Resources:
 * Clone Set: locking-clone [locking]:
   * Started: [ mailbox1.jalindia.co.in ]
   * Stopped: [ mailbox2.jalindia.co.in ]
 * Clone Set: shared_vg1-clone [shared_vg1]:
   * Started: [ mailbox1.jalindia.co.in ]
   * Stopped: [ mailbox2.jalindia.co.in ]
 * zimbra      (ocf:heartbeat:zimbractl): Started mailbox1.jalindia.co.in
 * virtual_ip (ocf:heartbeat:IPaddr2):    Started mailbox1.jalindia.co.in

Daemon Status:
 corosync: active/enabled
 pacemaker: active/enabled

pcsd: active/enabled