Hi all!<div><br></div><div>I've configured HA NFS storage (almost) according to the LinBIT HOWTO and, in general it works OK for my client nodes, which mount NFS share /web as /var/www and use it as document root for NGINX.</div>
<div><br></div><div>To get maximum performance out of the configuration two NFS exports(/web and /img) are configured asymmetrically, in an Active/Passive+Passive/Active manner, so each of the two nodes is an active server for one of the shares.</div>
<div><br></div><div>At this point I got stuck, as I want to use both of the NFS servers as additional NGINX server nodes, so on each of them has to mount exported /web and, when it is mounted - start NGINX.</div><div><br>
</div><div>So, taking for simplicity one Active/Passive pair - on both nodes I need to mount /web, but on active node I first need to start DRBD and nfsserver and on a passive node just need to wait until NFS share got available. After that point both nodes can start NGINX.</div>
<div><br></div><div>And, honestly, I'm confused how to configure such a mount resource. It seems it has to be master/slave resource, but I'm not so good with Pacemaker to be able to express that in configuration terms :) So any help would be appreciated!</div>
<div><br></div><div>Here is my config:</div><div><br></div><div><div>node ad24</div><div>node ad35</div><div>primitive export_share0 ocf:heartbeat:exportfs \</div><div> params directory="/web" clientspec="<a href="http://10.0.0.0/24">10.0.0.0/24</a>" options="rw,async,no_subtree_check,no_root_squash" fsid="10" rmtab_backup=".nfs/rmtab" unlock_on_stop="true" \</div>
<div> op monitor interval="10s" timeout="30s" \</div><div> op start interval="0" timeout="40s" \</div><div> op stop interval="0" timeout="40s"</div>
<div>primitive fs_web ocf:heartbeat:Filesystem \</div><div> params device="/dev/share0/web" directory="/web" fstype="xfs" \</div><div> op monitor interval="20s" timeout="40s" \</div>
<div> op start interval="0" timeout="60s" \</div><div> op stop interval="0" timeout="60s" \</div><div> meta is-managed="true"</div><div>primitive ip_share0 ocf:heartbeat:IPaddr2 \</div>
<div> params ip="10.0.0.210" cidr_netmask="24" nic="bond0" \</div><div> op monitor interval="5s" timeout="20s"</div><div>primitive lvm_share0 ocf:heartbeat:LVM \</div>
<div> params volgrpname="share0" \</div><div> op start interval="0" timeout="30s" \</div><div> op stop interval="0" timeout="30s"</div><div>primitive share0 ocf:linbit:drbd \</div>
<div> params drbd_resource="share0" \</div><div> op monitor interval="29s" role="Master" timeout="40s" \</div><div> op monitor interval="31s" role="Slave" timeout="40s" \</div>
<div> op start interval="0" timeout="240s" \</div><div> op stop interval="0" timeout="100s"</div><div>group res_share0 lvm_share0 fs_web export_share0 ip_share0</div>
<div>
ms ms_share0 share0 \</div><div> meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"</div><div>location share0_on_ad24 ms_share0 \</div>
<div> rule $id="share0_on_ad24-rule" inf: #uname eq ad24</div><div>colocation use_share0 inf: res_share0 ms_share0:Master</div><div>order activate_share0 inf: ms_share0:promote res_share0:start</div><div>
property $id="cib-bootstrap-options" \</div><div> dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \</div><div> cluster-infrastructure="openais" \</div><div> expected-quorum-votes="2" \</div>
<div> no-quorum-policy="ignore" \</div><div> stonith-enabled="false" \</div><div> last-lrm-refresh="1343967106"</div><div>rsc_defaults $id="rsc-options" \</div>
<div> resource-stickiness="200"</div></div><div><br></div><div>With best regards,</div><div>Timur Bakeyev.</div>