vim /usr/lib/ocf/resource.d/heartbeat/Filesystem<br>===========================================<br><longdesc lang="en"><br>Resource script for Filesystem. It manages a Filesystem on a<br>shared storage medium. <br>
<br>The standard monitor operation of depth 0 (also known as probe)<br>checks if the filesystem is mounted. If you want deeper tests,<br>set OCF_CHECK_LEVEL to one of the following values:<br><br>10: read first 16 blocks of the device (raw read)<br>
<br>This doesn't exercise the filesystem at all, but the device on<br>which the filesystem lives. This is noop for non-block devices<br>such as NFS, SMBFS, or bind mounts.<br><br>20: test if a status file can be written and read<br>
<br>The status file must be writable by root. This is not always the<br>case with an NFS mount, as NFS exports usually have the<br>"root_squash" option set. In such a setup, you must either use<br>read-only monitoring (depth=10), export with "no_root_squash" on<br>
your NFS server, or grant world write permissions on the<br>directory where the status file is to be placed.<br></longdesc><br><shortdesc lang="en">Manages filesystem mounts</shortdesc><br>=======================================================<br>
<br><div class="gmail_quote">Il giorno 11 aprile 2012 15:22, Terry Johnson <span dir="ltr"><<a href="mailto:terry.johnson@scribendi.com">terry.johnson@scribendi.com</a>></span> ha scritto:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-CA"><div><p class="MsoNormal">Hi –<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’m working on a two node cluster on CentOS 6.2, using iscsi shared storage, and I’m having difficulty detecting a lost connection to the storage.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Maybe this is a n00b issue, but I understand that monitor depth="20" in ocf:heartbeat:Filesystem is supposed to create a test file and check whether it can write to that file, and declare the resource failed if the filesystem goes read-only. The test file does not get created, and I can’t see where any errors might be being logged to. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’ve tested this configuration by disabling a switch port. The second node picks up the services correctly, but the first node keeps on running them too, and does not notice that it no longer has a writeable filesystem.  If the port is reconnected, they both have the same ext3 filesystem mounted at once, which makes a fine mess.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Here’s my current configuration. Have I missed some vital detail?  Should I be brining the iscsi connection into pacemaker too?<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">node dba<u></u><u></u></p><p class="MsoNormal">node dbb<u></u><u></u></p><p class="MsoNormal">primitive ClusterIP ocf:heartbeat:IPaddr2 \<u></u><u></u></p><p class="MsoNormal">        params ip="10.232.169.130" cidr_netmask="24" \<u></u><u></u></p>
<p class="MsoNormal">        op monitor interval="30s" nic="eth0" \<u></u><u></u></p><p class="MsoNormal">        meta target-role="Started"<u></u><u></u></p><p class="MsoNormal">primitive p_fs_mysql ocf:heartbeat:Filesystem \<u></u><u></u></p>
<p class="MsoNormal">        params device="/dev/sdb1" directory="/mnt/mysql" fstype="ext3" options="noatime,nodiratime,noexec" \<u></u><u></u></p><p class="MsoNormal">        op start interval="0" timeout="60" \<u></u><u></u></p>
<p class="MsoNormal">        op stop interval="0" timeout="240" \<u></u><u></u></p><p class="MsoNormal">        op monitor interval="30s" depth="20" \<u></u><u></u></p><p class="MsoNormal">
        meta target-role="Started"<u></u><u></u></p><p class="MsoNormal">primitive p_mysql lsb:mysql \<u></u><u></u></p><p class="MsoNormal">        op start interval="0" timeout="60s" \<u></u><u></u></p>
<p class="MsoNormal">        op stop interval="0" timeout="60s" \<u></u><u></u></p><p class="MsoNormal">        op monitor interval="15s" \<u></u><u></u></p><p class="MsoNormal">        meta target-role="Started"<u></u><u></u></p>
<p class="MsoNormal">group g_mysql p_fs_mysql ClusterIP p_mysql \<u></u><u></u></p><p class="MsoNormal">        meta target-role="Started"<u></u><u></u></p><p class="MsoNormal">property $id="cib-bootstrap-options" \<u></u><u></u></p>
<p class="MsoNormal">        dc-version="1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558" \<u></u><u></u></p><p class="MsoNormal">        cluster-infrastructure="openais" \<u></u><u></u></p><p class="MsoNormal">
        expected-quorum-votes="2" \<u></u><u></u></p><p class="MsoNormal">        stonith-enabled="false" \<u></u><u></u></p><p class="MsoNormal">        no-quorum-policy="ignore"<u></u><u></u></p>
<p class="MsoNormal">rsc_defaults $id="rsc-options" \<u></u><u></u></p><p class="MsoNormal">        resource-stickiness="200"<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
corosync (1.4.1-4.el6_2.1) <u></u><u></u></p><p class="MsoNormal">pacemaker (1.1.6-3.el6) <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Any suggestions are appreciated.<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">Terry.<u></u><u></u></p></div><br clear="all">
Follow us on Twitter:<br>
<a href="http://www.twitter.com/Scribendi_Inc" target="_blank">http://www.twitter.com/Scribendi_Inc</a><br>
</div><br>_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>esta es mi vida e me la vivo hasta que dios quiera<br>