Hi,
I'm using drbd 8.2.4 and heartbeat v.2 too on two ubuntu 7.04 server nodes.
I followed this link http://linux-ha.org/DRBD/HowTov2 and configured a
VIP, apache2 and drbd resource on my cib.xml and everything is working
fine; no problem in drbd switching master/slave with a stop to heartbeat
in one node or toggling power to it.
My only problem at the moment is that when I start the HA cluster the
node one is set up as secondary drbd and it tries, of course without
success, to mount the filesystem receving the following errors:
Feb 19 11:45:56 ub704ha01 lrmd: [5965]: info: RA output:
(fs0:start:stderr) mount: block device /dev/drbd0 is write-protected,
mounting read-only
Feb 19 11:45:56 ub704ha01 lrmd: [5965]: info: RA output:
(fs0:start:stderr) mount: Wrong medium type
Feb 19 11:45:56 ub704ha01 Filesystem[6669]: [6711]: ERROR: Couldn't
mount filesystem /dev/drbd0 on /usr/local/DATA
How can I configure my systems to try to mount the filesystem only from
the node that has the drbd resource as master? Why the other node of the
cluster do not try and succeed mounting the filesystem if the first node
fails?
If I mount the directory manually in the master drbd node it works and
get synced fine.
Thank you in advance, cib.xml follows:
<cib admin_epoch="0" have_quorum="false" ignore_dtd="false"
num_peers="0" cib_feature_revision="2.0" generated="false" epoch="9"
num_updates="5" cib-last-written="Tue Feb 19 12:25:59 2008">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair id="cib-bootstrap-options-symmetric-cluster"
name="symmetric-cluster" value="true"/>
<nvpair id="cib-bootstrap-options-no-quorum-policy"
name="no-quorum-policy" value="stop"/>
<nvpair
id="cib-bootstrap-options-default-resource-stickiness"
name="default-resource-stickiness" value="0"/>
<nvpair
id="cib-bootstrap-options-default-resource-failure-stickiness"
name="default-resource-failure-stickiness" value="0"/>
<nvpair id="cib-bootstrap-options-stonith-enabled"
name="stonith-enabled" value="false"/>
<nvpair id="cib-bootstrap-options-stonith-action"
name="stonith-action" value="reboot"/>
<nvpair id="cib-bootstrap-options-startup-fencing"
name="startup-fencing" value="true"/>
<nvpair id="cib-bootstrap-options-stop-orphan-resources"
name="stop-orphan-resources" value="true"/>
<nvpair id="cib-bootstrap-options-stop-orphan-actions"
name="stop-orphan-actions" value="true"/>
<nvpair id="cib-bootstrap-options-remove-after-stop"
name="remove-after-stop" value="false"/>
<nvpair id="cib-bootstrap-options-short-resource-names"
name="short-resource-names" value="true"/>
<nvpair id="cib-bootstrap-options-transition-idle-timeout"
name="transition-idle-timeout" value="5min"/>
<nvpair id="cib-bootstrap-options-default-action-timeout"
name="default-action-timeout" value="20s"/>
<nvpair id="cib-bootstrap-options-is-managed-default"
name="is-managed-default" value="true"/>
<nvpair id="cib-bootstrap-options-cluster-delay"
name="cluster-delay" value="60s"/>
<nvpair id="cib-bootstrap-options-pe-error-series-max"
name="pe-error-series-max" value="-1"/>
<nvpair id="cib-bootstrap-options-pe-warn-series-max"
name="pe-warn-series-max" value="-1"/>
<nvpair id="cib-bootstrap-options-pe-input-series-max"
name="pe-input-series-max" value="-1"/>
<nvpair id="cib-bootstrap-options-dc-version"
name="dc-version" value="2.1.3-node:
552305612591183b1628baa5bc6e903e0f1e26a3"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node id="fcbaecd9-40c6-48b7-9e66-1b3a7b26c8d4"
uname="ub704ha02" type="normal"/>
<node id="e136bd79-20ab-45e7-b6e9-a4cbee8b42b2"
uname="ub704ha01" type="normal"/>
</nodes>
<resources>
<group id="group_1">
<primitive class="ocf" id="IPaddr_192_168_42_89"
provider="heartbeat" type="IPaddr">
<operations>
<op id="IPaddr_192_168_42_89_mon" interval="5s"
name="monitor" timeout="5s"/>
</operations>
<instance_attributes id="IPaddr_192_168_42_89_inst_attr">
<attributes>
<nvpair id="IPaddr_192_168_42_89_attr_0" name="ip"
value="192.168.42.89"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="ocf" id="apache_2" provider="heartbeat"
type="apache">
<operations>
<op id="apache_2_mon" interval="120s" name="monitor"
timeout="60s"/>
</operations>
<instance_attributes id="apache_2_inst_attr">
<attributes>
<nvpair id="apache_2_attr_0" name="configfile"
value="/etc/apache2/apache2.conf"/>
</attributes>
</instance_attributes>
</primitive>
</group>
<master_slave id="ms-drbd0">
<meta_attributes id="ma-ms-drbd0">
<attributes>
<nvpair id="ma-ms-drbd0-1" name="clone_max" value="2"/>
<nvpair id="ma-ms-drbd0-2" name="clone_node_max" value="1"/>
<nvpair id="ma-ms-drbd0-3" name="master_max" value="1"/>
<nvpair id="ma-ms-drbd0-4" name="master_node_max" value="1"/>
<nvpair id="ma-ms-drbd0-5" name="notify" value="yes"/>
<nvpair id="ma-ms-drbd0-6" name="globally_unique"
value="false"/>
<nvpair name="target_role" id="ma-ms-drbd0-7"
value="#default"/>
</attributes>
</meta_attributes>
<primitive id="drbd0" class="ocf" provider="heartbeat"
type="drbd">
<instance_attributes id="ia-drbd0">
<attributes>
<nvpair id="ia-drbd0-1" name="drbd_resource" value="drbd0"/>
</attributes>
</instance_attributes>
</primitive>
<meta_attributes id="ms-drbd0-meta-options">
<attributes>
<nvpair id="ms-drbd0-meta-options-drbd_resource"
name="drbd_resource" value="/dev/drbd0"/>
</attributes>
</meta_attributes>
</master_slave>
<primitive class="ocf" provider="heartbeat" type="Filesystem"
id="fs0">
<meta_attributes id="ma-fs0">
<attributes>
<nvpair name="target_role" id="ma-fs0-1" value="stopped"/>
</attributes>
</meta_attributes>
<instance_attributes id="ia-fs0">
<attributes>
<nvpair id="ia-fs0-1" name="fstype" value="ext3"/>
<nvpair id="ia-fs0-2" name="directory"
value="/usr/local/DATA"/>
<nvpair id="ia-fs0-3" name="device" value="/dev/drbd0"/>
</attributes>
</instance_attributes>
<meta_attributes id="fs0-meta-options">
<attributes>
<nvpair id="fs0-meta-options-fstype" name="fstype"
value="ext2"/>
</attributes>
</meta_attributes>
</primitive>
</resources>
<constraints>
<rsc_location id="rsc_location_group_1" rsc="group_1">
<rule id="prefered_location_group_1" score="100">
<expression attribute="#uname"
id="prefered_location_group_1_expr" operation="eq" value="ub704ha01"/>
</rule>
</rsc_location>
<rsc_order id="drbd0_before_fs0" from="fs0" action="start"
to="ms-drbd0" to_action="promote"/>
</constraints>
</configuration>
</cib>
Thanks.
--
Marco Leone
Engisud S.p.a. - Gruppo Engineering I.I. S.p.a.
Viale Regione Siciliana, 7275 - 90146 Palermo
Tel.091-7511730 Fax 091-7511720
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems