[Pacemaker] crm configuration to auto mount ext4 formatted drbd device to specific mount point using HA ip address.

Yannis Milios yannis.milios at gmail.com
Sun Apr 1 04:31:03 EDT 2012


Hello all,

I'm a newbie in pacemaker so i need your understanding.
I'm testing pacemaker+corosync+drbd+ocfs2+samba in 2 vm using ubuntu server
10.04LTS.
I use LVM and created 1 VG called vg0 and 2 LVs called /dev/vg0/lv0_iscsi
and lv0_samba.
Each lv is used by a DRBD device.

/dev/vg0/lv0_iscsi -> drbd0
/dev/vg0/lv0_samba -> drbd1

drbd0 is formatted with ocfs2 fs and auto mounted on /cluster folder by
pacemaker.
Both drbd0 on 2 nodes are working in primary mode so they auto mount drbd0
in /cluster.

I've used this guide to achieve auto mount of drbd0 device on /cluster
using crm:

http://docs.bloonix.net/drbd-pacemaker-corosync-ocfs2.html

My question is how will achieve the same thing (auto mounting drbd1 this
time) using samba on /samba mount point?
drbd1 is formatted using ext4 fs.
I mean which specific configuration I should make in "crm configure edit"
to achieve this.
Each samba daemon must be started automatically by pacemaker and alsto
stopped by it when primary node is up to avoid corruption
(primary/secondary mode).
Also there must be a HA ip address which pacemaker will "attach" to each
working node when the other node is down.
This ip would be the ip that clients will use to access samba shares.
My current Pacemaker configuration is:

node master-server
node slave-server
primitive res-DLM ocf:pacemaker:controld \
        op monitor interval="15"
primitive res-Data ocf:linbit:drbd \
        params drbd_resource="cluster-ocfs" \
        op monitor interval="14s" role="Master" timeout="15s" \
        op monitor interval="15s" role="Slave" timeout="15s"
primitive res-FS-data ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/cluster-ocfs" directory="/cluster"
fstype="ocfs2" options="rw,noatime" \
        op monitor interval="15"
primitive res-FS-samba ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/samba" directory="/samba"
fstype="ext4" \
        op monitor interval="15"
primitive res-O2CB ocf:pacemaker:o2cb \
        op monitor interval="15"
primitive res-Samba ocf:linbit:drbd \
        params drbd_resource="samba" \
        op monitor interval="14s" role="Master" timeout="15s" \
        op monitor interval="15s" role="Slave" timeout="15s"
ms ms-Data res-Data \
        meta resource-stickines="100" notify="true" master-max="2"
clone-max="2"
ms ms-Samba res-Samba \
        meta resource-stickines="100" notify="true" master-max="2"
clone-max="2"
clone clone-DLM res-DLM \
        meta globally-unique="false" interleave="true"
clone clone-FS-data res-FS-data
clone clone-FS-samba res-FS-samba
clone clone-O2CB res-O2CB \
        meta globally-unique="false" interleave="true"
colocation col-DLM-Data inf: clone-DLM ms-Data:Master
colocation col-O2CB-DLM inf: clone-O2CB clone-DLM
order ord-DLM-O2CB inf: clone-DLM clone-O2CB
order ord-Data-DLM inf: ms-Data:promote clone-DLM:start
order ord-FS-data inf: clone-O2CB clone-FS-data
order ord-FS-samba inf: clone-O2CB clone-FS-samba
property $id="cib-bootstrap-options" \
        dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore" \
        default-resource-stickiness="1000"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20120401/ee2ca24f/attachment-0002.html>


More information about the Pacemaker mailing list