Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I try to set up my first pacemaker cluster as a FTP Server. There are two Server installed with a fresh centos 6.5 and proftpd

enter image description here

First step was to install pacemaker and some configuration Tools with:

yum install pacemaker cman pcs ccs resource-agents

After run this command on each server I start to configure my first Pacemaker Cluster with following Commands:

# ccs -f /etc/cluster/cluster.conf --createcluster ftpcluster 
# ccs -f /etc/cluster/cluster.conf --addnode ftp01 
# ccs -f /etc/cluster/cluster.conf --addnode ftp02
# ccs -f /etc/cluster/cluster.conf --addfencedev pcmk agent=fence_pcmk  
# ccs -f /etc/cluster/cluster.conf --addmethod pcmk-redirect ftp01 
# ccs -f /etc/cluster/cluster.conf --addmethod pcmk-redirect ftp02  
# ccs -f /etc/cluster/cluster.conf --addfenceinst pcmk node1 pcmk-redirect port=ftp01 
# ccs -f /etc/cluster/cluster.conf --addfenceinst pcmk node2 pcmk-redirect port=ftp02

Now I start the Cluster on both nodes:

# service cman start 
# service pacemaker start

Next step is to set a ClusterIP and a FTPService Ressource with the following

# pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=10.2.1.50 cidr_netmask=32 op monitor interval=30s
# pcs resource create FTPService lsb:proftpd op monitor interval=30s

If I request the status I get following result:

# pcs status
Cluster name: ftpcluster
Last updated: Thu Jul 25 01:04:48 2013
Last change: Thu Dec  5 08:56:39 2013 via crmd on ftp01
Stack: cman
Current DC: ftp02 - partition with quorum
Version: 1.1.10-14.el6-368c726
2 Nodes configured
2 Resources configured


Online: [ ftp01 ftp02 ]

Full list of resources:

 ClusterIP  (ocf::heartbeat:IPaddr2):   Started ftp01 
 FTPService (lsb:proftpd):  Started ftp02 

My question is about the access to the FTP Service. Cluster IP runs on ftp01 but FTPService on ftp02, if I try to access "ftp 10.2.1.50" I get answer back from ftp01.

Question 1: What is the difference between ClusterIP and FTPService, why I should use a FTP Serice if the ClusterIP do the same?

Question 2: What should I do from this point to build a activ/active scenario and how it works? Is it load balanced or simple round robin?

share|improve this question

3 Answers 3

The situation you have is not as simple as one might think. I am working on such solutions for couple of months now. I also tried linux cluster. Here's what I know:

First you need to understand that your two apps in your current configuration can't possibly by active/active. When you start to think about it, you'll notice that what you achieved right now is application that won't stop running when one of the nodes fails. But all the data on failed node (if its active one which fails) won't be magically transported to the second node. f.e user folders won't be on second node (the point is that failover cluster does not provide storage).

So first of all you need storage that is accessible from both nodes (a third storage server) and a file system that will be aware of the cluster. Then you can start thinking about ative/active solution. But this again has another limitation - when storage server fails, all your cluster is dead as dead.

You can also do something like this. Have glusterfs (or any cluster aware file system) running on both your cluster nodes, and then you have a replicated file system (both nodes have the same data all the time), but from my experiene glusterfs is very slow with small files.

share|improve this answer
    
Thx for your answer, I know that the data must be the same for active/active scenario but at this time I only want to build this scenario to understand how it works. –  kockiren Dec 9 '13 at 6:44

First of all, virtual ip is used for access to the cluster service. You need to bind the ftp server on vip (cluster ip). I saw from your config you are missing some fundamental details of pacemaker.

If you bind the ftp server on the cluster ip, you need to use the co-location constrain or group.

For more information about pacemaker cluster, read the documentation from the Clusterlabs site.

share|improve this answer
    
You're right, there is no group configured. Now I get the same status for both. Can you also explain how the active/active scenario works? –  kockiren Dec 9 '13 at 6:43
    
for active/active you should use cloned resource –  c4f4t0r Nov 17 at 17:42

You have a cluster resource, the ip address, but an ip can only be on one node at a time. You can run ftp on both servers, but will still only be able to access one at a time with that ip. What you probably want is a load balancer in front that will handle connections to the back end ftp servers, which is a different issue. Or, you can have a different ip address on both (which you have normally), and use round-robin dns to be able to get to one or the other with the same hostname. But really you wouldn't use pacemaker for either of those.

Basically I don't think pacemaker is the solution here.

Normal active/active cluster resources (say, web servers), would be done with cloned resources: http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_reconfigure_pacemaker_for_active_active.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.