10 pmgcm - Proxmox Mail Gateway Cluster Management Toolkit
16 include::pmgcm.1-synopsis.adoc[]
28 We are living in a world where email becomes more and more important -
29 failures in email systems are just not acceptable. To meet these
30 requirements we developed the Proxmox HA (High Availability) Cluster.
32 The {pmg} HA Cluster consists of a master and several slave nodes
33 (minimum one node). Configuration is done on the master. Configuration
34 and data is synchronized to all cluster nodes over a VPN tunnel. This
35 provides the following advantages:
37 * centralized configuration management
39 * fully redundant data storage
45 We use a unique application level clustering scheme, which provides
46 extremely good performance. Special considerations where taken to make
47 management as easy as possible. Complete Cluster setup is done within
48 minutes, and nodes automatically reintegrate after temporary failures
49 without any operator interaction.
51 image::images/pmg-ha-cluster.png[]
57 There are no special hardware requirements, although it is highly
58 recommended to use fast and reliable server with redundant disks on
59 all cluster nodes (Hardware RAID with BBU and write cache enabled).
61 The HA Cluster can also run in virtualized environments.
67 Each host in a cluster has its own subscription. If you want support
68 for a cluster, each cluster node needs to have a valid
69 subscription. All nodes must have the same subscription level.
75 You can use one of the mechanism described in chapter 9 if you want to
76 distribute mail traffic among the cluster nodes. Please note that this
77 is not always required, because it is also reasonable to use only one
78 node to handle SMTP traffic. The second node is used as quarantine
79 host (provide the web interface to user quarantine).
82 Cluster administration
83 ----------------------
85 Cluster administration is done with a single command line utility
86 called `pmgcm'. So you need to login via ssh to manage the cluster
89 NOTE: Always setup the IP configuration before adding a node to the
90 cluster. IP address, network mask, gateway address and hostname can’t
97 You can create a cluster from any existing Proxmox host. All data is
100 * make sure you have the right IP configuration
101 (IP/MASK/GATEWAY/HOSTNAME), because you cannot changed that later
103 * run the cluster creation command:
115 --NAME(CID)--------------IPADDRESS----ROLE-STATE---------UPTIME---LOAD----MEM---DISK
116 pmg5(1) 192.168.2.127 master A 1 day 21:18 0.30 80% 41%
123 When you add a new node to a cluster (join) all data on that node is
124 destroyed. The whole database is initialized with cluster data from
127 * make sure you have the right IP configuration
129 * run the cluster join command (on the new node):
132 pmgcm join <master_ip>
135 You need to enter the root password of the master host when asked for
138 CAUTION: Node initialization deletes all existing databases, stops and
139 then restarts all services accessing the database. So do not add nodes
140 which are already active and receive mails.
142 Also, joining a cluster can take several minutes, because the new node
143 needs to synchronize all data from the master (although this is done
146 NOTE: If you join a new node, existing quarantined items from the other nodes are not synchronized to the new node.
152 Please detach nodes from the cluster network before removing them
153 from the cluster configuration. Then run the following command on
160 Parameter `<cid>` is the unique cluster node ID, as listed with `pmgcm status`.
166 It is highly recommended to use redundant disks on all cluster nodes
167 (RAID). So in almost any circumstances you just need to replace the
168 damaged hardware or disk. {pmg} uses an asynchronous
169 clustering algorithm, so you just need to reboot the repaired node,
170 and everything will work again transparently.
172 The following scenarios only apply when you really loose the contents
179 * delete failed node on master
185 * add (re-join) a new node
188 pmgcm join <master_ip>
195 * force another node to be master
201 * tell other nodes that master has changed
204 pmgcm sync --master_ip <master_ip>
208 Total Cluster Failure
209 ^^^^^^^^^^^^^^^^^^^^^
211 * restore backup (Cluster and node information is not restored, you
212 have to recreate master and nodes)
214 * tell it to become master
222 * add those new nodes to the cluster
225 pmgcm join <master_ip>
230 include::pmg-copyright.adoc[]