[ClusterLabs] 3 nodes cluster on Centos 7

Nicolas S. lists at tropicdreams.net
Tue Jul 7 14:27:50 UTC 2015


7 juillet 2015 16:10 "Ken Gaillot" <kgaillot at redhat.com> a écrit:
> On 07/07/2015 04:19 AM, Nicolas S. wrote:
> 
>> Hello everybody,
>> 
>> I'm posting first time on this mailing list for an advice.
>> 
>> I try actually trying to build a cluster on Centos 7.
>> 
>> The cluster has 3 nodes :
>> 
>> - 1 virtual machine (machine1). This machine is supposed to be high-available
>> - 2 physical machines identical (machine2 and 3)
>> 
>> The physical machines are supposed to use DRBD to replicate storage.
>> A shared volume is going to be mounted on both machine 2 and 3 in read/write (gfs2).
>> 
>> The virtual machine is only here for the vote in the qorum, it has no data .
>> 
>> I m' following this guide :
>> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_from_Scratch/index.html
>> 
>> My questions are :
>> 
>> - Is this configuration OK or shoud I better go to a 2 node only cluster ?
> 
> Hi Nicolas,

Hi Ken , and all the others, 

> 
> As others mentioned, the VM is useful as a quorum node only if it's not
> running on one of the other cluster nodes. If the VM is itself a highly
> available resource started by the cluster, then it should not be a
> cluster node. (It can potentially be a pacemaker_remote node, but that's
> an advanced topic that you don't need at this stage.)
> 

It's my case the VM isn't a resource of the cluster it's a distant machine only here for quorum. 
For the moment this cluster is only a proof of concept.


> CentOS 7 has corosync 2, which has good support for 2-node clusters. If
> you're following Clusters From Scratch, pcs will configure corosync
> appropriately for you.
> 

For the moment the documentation is very useful, I just maybe missed the contraint chapter. 

>> - Is there a way to "group" the storage machines 2 and 3 and put some ressources (like DRBD and
>> GFS2) only on them ? So that the machine 1 is here , but does nothing, just vote.
>> I looked around in the pcs command line option but maybe i missed it.
>> Thanks in advance
> 
> Yes, "location constraints" do that. See the pcs man page under
> "constraint" or the Pacemaker Explained manual for details, but
> basically you can tie particular resources to particular nodes either
> positively (prefer this node) or negatively (avoid this node).
> 
> There are also colocation constraints to say that certain resources
> should be kept together, and order constraints to say that certain
> resources should be started/stopped sequentially.
> 

Thank to all for the advice. I ll try to make the constraints for this : 

- I made my cluster in 'in-opt' (followed redhat doc)  , so symmetric-cluster is false and resource cannot go everywhere
- drbd / clvm / gfs start only on the storage node (pcs constraint location res_XXX prefers node1=200 , same for node 2 )
- constraint to launch gfs after clvm, wich starts after drbd 

I'm not yet familiar with dlm and clvm but it will come ... 

Thanks to all. 



> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org




More information about the Users mailing list