Hello all,
first: I'm completely new to pacemaker.
I want to setup a scenario like this:
Machine A)
- has IP address 10.0.0.251
- DRBD resources
drbd1 (for apache2)
drbd2 (for mysql)
drbd3 (for cacti)
- LVM ontop of every drbd resource (vg11, vg12, vg13)
vg11 (for apache)
vg12 (for mysql)
vg13 (for cacti)
- apache2
- virtual IP 10.0.0.250
- /cluster/www
- iptables FWMARK to route SNMP requests via the node where Cacti is
as ONLY the IP of Cacti is allowed to do SNMP (the monitored devices
only have 10.0.0.253 as allowed IP)
- NFS client mount from Machine B for the Cacti RRD files
Machine B)
- has IP address 10.0.0.252
- DRBD resources
drbd1 (for apache2)
drbd2 (for mysql)
drbd3 (for cacti)
- LVM ontop of every drbd resource
vg11 (for apache)
vg12 (for mysql)
vg13 (for cacti)
- NFS Server
- mysql
- virtual IP 10.0.0.254
- /cluster/mysql
- cacti
- virtual IP 10.0.0.253
- /cluster/cacti
- iptables SNAT so 10.0.0.253 is the outgoing IP to talk SNMP
my current configuration is:
----------------------------
node machineA
node machineB
primitive drbd1 ocf:linbit:drbd params drbd_resource="drbd1" op monitor
interval="15s"
primitive drbd2 ocf:linbit:drbd params drbd_resource="drbd2" op monitor
interval="15s"
primitive drbd3 ocf:linbit:drbd params drbd_resource="drbd3" op monitor
interval="15s"
primitive fs_apache2 ocf:heartbeat:Filesystem params device="/dev/vg11/apache2"
directory="/cluster/www" fstype="ext4" options="noatime,nodiratime,barrier=0"
primitive fs_cacti ocf:heartbeat:Filesystem params device="/dev/vg13/cacti"
directory="/cluster/cacti" fstype="ext4" options="noatime,nodiratime,barrier=0"
primitive fs_mysql ocf:heartbeat:Filesystem params device="/dev/vg12/mysql"
directory="/cluster/mysql" fstype="ext4" options="noatime,nodiratime,barrier=0"
primitive ip_apache2 ocf:heartbeat:IPaddr2 params ip="10.0.0.250"
primitive ip_cacti ocf:heartbeat:IPaddr2 params ip="10.0.0.253"
primitive ip_mysql ocf:heartbeat:IPaddr2 params ip="10.0.0.254"
primitive lvm_vg11 ocf:heartbeat:LVM params volgrpname="vg11" exclusive="yes"
op monitor interval="10" timeout="30" depth="0"
primitive lvm_vg12 ocf:heartbeat:LVM params volgrpname="vg12" exclusive="yes"
op monitor interval="10" timeout="30" depth="0"
primitive lvm_vg13 ocf:heartbeat:LVM params volgrpname="vg13" exclusive="yes"
op monitor interval="10" timeout="30" depth="0"
primitive svc_apache2 lsb:apache2
primitive svc_cacti lsb:cacti
primitive svc_mysql lsb:mysql
group apache2 lvm_vg11 ip_apache2 fs_apache2 svc_apache2 meta
target-role="Started"
group cacti lvm_vg13 ip_cacti fs_cacti svc_cacti meta
target-role="Started"
group mysql lvm_vg12 ip_mysql fs_mysql svc_mysql meta
target-role="Started"
ms ms_drbd1 drbd1 meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Started"
ms ms_drbd2 drbd2 meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Started"
ms ms_drbd3 drbd3 meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Started"
location prefer-fs_apache fs_apache2 100: machineA
location prefer-fs_cacti fs_cacti 100: machineB
location prefer-fs_mysql fs_mysql 100: machineB
colocation apache_on_drbd1 inf: apache2 ms_drbd1:Master
colocation cacti_on_drbd3 inf: cacti ms_drbd3:Master
colocation mysql_on_drbd2 inf: mysql ms_drbd2:Master
order apache2_after_drbd1 inf: ms_drbd1:promote apache2:start
order cacti_after_drbd3 inf: ms_drbd3:promote cacti:start
order mysql_after_drbd2 inf: ms_drbd2:promote mysql:start
property $id="cib-bootstrap-options" \
dc-version="1.0.7-6e1815972fc236825bf3658d7f8451d33227d420" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
stonith-enabled="false" \
no-quorum-policy="ignore" \
last-lrm-refresh="1267978201"
everything seems to work correctly, but as you may see, the missing part is
the NFS stuff (the iptables stuff also but that's easy ;)
How do I configure pacemaker to:
- start the NFS server on the node where Cacti is
- mount the NFS share from the NFS server after the NFS server is up, but only:
- if the current node does not have /cluster/cacti active
i.e. when machineB goes dead, umount /cluster/cacti on machineA and move
every resoure from machineB to A and when B comes back, switch all resources
who belong to B back to B and mount the NFS share /cluster/cacti on A again.
Thanks in advance.
--
Kind regards
Marc-Christian Petersen
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems