Re: [ClusterLabs] Pacemaker newbie needs advice for adding a new cluster node

2016-08-11 Thread thl
Thanks a lot, below info was helpful. My cluster has four valid nodes now.

Am Thursday 11 August 2016 14:59:07 schrieb Jan Pokorný:

> # pcs cluster node add --help


signature.asc
Description: This is a digitally signed message part.
___
Users mailing list: Users@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


[ClusterLabs] Pacemaker newbie needs advice for adding a new cluster node

2016-08-11 Thread thl
Hello all,

maybe someone can help me adding a node in my test cluster.

I have a working three-node test Cluster in my VirtualBox, using OEL7.2 and now 
I try to add another node but I have no plan and I did some kind of try & error 
which does not work.

This is my three-node cluster:

# pcs status
Cluster name: zweiter
Last updated: Thu Aug 11 12:53:55 2016  Last change: Thu Aug 11 
12:53:47 2016 by root via cibadmin on knoten01-hb
Stack: corosync
Current DC: knoten01-hb (version 1.1.13-10.el7-44eb2dd) - partition with quorum
3 nodes and 12 resources configured

Online: [ knoten01-hb knoten02-hb knoten03-hb ]

Full list of resources:

 Clone Set: ResO2CB-clone [ResO2CB]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]
 Clone Set: ResOCFS2_00-clone [ResOCFS2_00]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]
 Clone Set: ClusterIP-clone [ClusterIP] (unique)
 ClusterIP:0(ocf::heartbeat:IPaddr2):   Started knoten01-hb
 ClusterIP:1(ocf::heartbeat:IPaddr2):   Started knoten02-hb
 ClusterIP:2(ocf::heartbeat:IPaddr2):   Started knoten03-hb
 Clone Set: WebSite-clone [WebSite]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]

PCSD Status:
  knoten01-hb: Online
  knoten02-hb: Online
  knoten03-hb: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled




I setup another host with name knoten04-hb, pcsd is started by systemd. My 
first idea was modifying /etc/corosync/corosync.conf on all four hosts, adding 
the new host. When done, without any stop/start action, pcs shows me this:

# pcs status
Cluster name: zweiter
Last updated: Thu Aug 11 13:02:22 2016  Last change: Thu Aug 11 
12:53:47 2016 by root via cibadmin on knoten01-hb
Stack: corosync
Current DC: knoten01-hb (version 1.1.13-10.el7-44eb2dd) - partition with quorum
3 nodes and 12 resources configured

Online: [ knoten01-hb knoten02-hb knoten03-hb ]

Full list of resources:

 Clone Set: ResO2CB-clone [ResO2CB]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]
 Clone Set: ResOCFS2_00-clone [ResOCFS2_00]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]
 Clone Set: ClusterIP-clone [ClusterIP] (unique)
 ClusterIP:0(ocf::heartbeat:IPaddr2):   Started knoten01-hb
 ClusterIP:1(ocf::heartbeat:IPaddr2):   Started knoten02-hb
 ClusterIP:2(ocf::heartbeat:IPaddr2):   Started knoten03-hb
 Clone Set: WebSite-clone [WebSite]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]

PCSD Status:
  knoten01-hb: Online
  knoten02-hb: Online
  knoten03-hb: Online
  knoten04-hb: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled


PCSD Status shows the new node, everything else is unchanged. I guess the 
corosync part is OK.




Next step is getting pacemaker configured. I tried:

# cibadmin --query > add_knoten04-hb_cfg
# vi add_knoten04-hb_cfg
# cibadmin --replace --xml-file add_knoten04-hb_cfg

The only entry I changed was this:


  
  
  
  <==





Again, this looks good:

# pcs status
Cluster name: zweiter
Last updated: Thu Aug 11 13:08:19 2016  Last change: Thu Aug 11 
13:08:11 2016 by root via cibadmin on knoten01-hb
Stack: corosync
Current DC: knoten01-hb (version 1.1.13-10.el7-44eb2dd) - partition with quorum
4 nodes and 13 resources configured

Online: [ knoten01-hb knoten02-hb knoten03-hb ]
OFFLINE: [ knoten04-hb ]

Full list of resources:

 Clone Set: ResO2CB-clone [ResO2CB]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]
 Clone Set: ResOCFS2_00-clone [ResOCFS2_00]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]
 Clone Set: ClusterIP-clone [ClusterIP] (unique)
 ClusterIP:0(ocf::heartbeat:IPaddr2):   Started knoten01-hb
 ClusterIP:1(ocf::heartbeat:IPaddr2):   Started knoten02-hb
 ClusterIP:2(ocf::heartbeat:IPaddr2):   Started knoten03-hb
 Clone Set: WebSite-clone [WebSite]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]
 Stopped: [ knoten04-hb ]

PCSD Status:
  knoten01-hb: Online
  knoten02-hb: Online
  knoten03-hb: Online
  knoten04-hb: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled


knoten04-hb is known but offline, for sure. OK, let's start it:




# pcs cluster start knoten04-hb
knoten04-hb: Starting Cluster...

The funny thing: pcs status on the old nodes tell me:

[root@knoten01 ~]# pcs status
Cluster name: zweiter
Last updated: Thu Aug 11 13:10:45 2016  Last change: Thu Aug 11 
13:08:11 2016 by root via cibadmin on knoten01-hb
Stack: corosync
Current DC: knoten01-hb (version 1.1.13-10.el7-44eb2dd) - partition with quorum
4 nodes and 13 resources configured

Online: [ knoten01-hb knoten02-hb knoten03-hb ]
OFFLINE: [ knoten04-hb ]

Full list of resources:

 Clone Set: ResO2CB-clone [ResO2CB]
 Started: [ knoten01-hb knoten02-hb knoten03-hb ]

Re: [ClusterLabs] Bloody Newbie needs help for OCFS2 on pacemaker+corosync+pcs

2016-08-03 Thread thl
Hello all,

thanks to all who gave me hints, I finally succeeded.
That's what I did for getting OCFS2 running in my OEL7.2 based test cluster:

As resource ocf:pacemaker:o2cb was unavailable (though the manpage is available 
in the pacemaker RPM:-( ) I got it from GitHub. But when trying I found that 
the script depends on another script which is unavailable, too. Re-reading the 
docs, I found the resource "systemd" and this worked:

# pcs resource create ResO2CB systemd:o2cb \
  op monitor interval="10" timeout="30" \
  op start   interval="0"  timeout="120" \
  op stopinterval="0"  timeout="120"

# pcs resource clone ResO2CB meta \
  clone-max=3 \
  clone-node-max=1 \
  clone-min=1 \
  notify="false" \
  globally-unique="false" \
  ordered="false" \
  interleave="false"



Trying to mount a shared device was the next problem. The script 
/usr/lib/ocf/resource.d/heartbeat/Filesystem is buggy but I fixed that for me 
by adding some lines:

# diff Filesystem.distorig Filesystem
368a369,370
>   elif grep -q "Red Hat Enterprise Linux Server release 7.2" 
> /etc/redhat-release >/dev/null 2>&1 ; then
>   ocf_log info "$DEVICE: We are on a RHEL 7.2 System."


Function "ocfs2_init" has that content now:

...
OCFS2_SLES10=""
if [ "X$HA_cluster_type" = "Xcman" ]; then
return
elif [ "X$HA_cluster_type" != "Xopenais" ]; then
if grep -q "SUSE Linux Enterprise Server 10" /etc/SuSE-release 
>/dev/null 2>&1 ; then
OCFS2_SLES10="yes"
ocf_log info "$DEVICE: Enabling SLES10 compatibility 
mode for OCFS2."
elif grep -q "Red Hat Enterprise Linux Server release 7.2" 
/etc/redhat-release >/dev/null 2>&1 ; then
ocf_log info "$DEVICE: We are on a RHEL 7.2 System."
else
ocf_log err "$DEVICE: ocfs2 is not compatible with your 
environment."
exit $OCF_ERR_CONFIGURED
fi
else
return
fi
...

After the modification, this was working for me:

# pcs resource create ResOCFS2_00 ocf:heartbeat:Filesystem \
  device="/dev/disk/by-uuid/1f744914-f8c8-4846-9aa0-a16e700e2400" \
  directory="/ocfs00" \
  fstype="ocfs2" options="rw,defaults,noatime" \
  op monitor timeout="40" interval="20"

# pcs resource clone ResOCFS2_00 meta \
  clone-max=3 \
  clone-node-max=1 \
  clone-min=1 \
  notify="false" \
  globally-unique="false" \
  ordered="false" \
  interleave="false"

# pcs constraint order ResO2CB-clone then ResOCFS2_00-clone


Hope these info are useful.

Best Regards

Thomas


Am Tuesday 02 August 2016 16:48:58 schrieb Ken Gaillot:
> On 08/02/2016 08:16 AM, t...@it-hluchnik.de wrote:
> > Hello Kyle + all,
> > 
> > No luck at all. Cant get o2cb up at all. Please find details below.
> > Thanks in advance for any help.
> > 
> > First I tried to translate your crm syntax to pcs syntax:
> > 
> > primitive p_o2cb lsb:o2cb \ op monitor interval="10" timeout="30"
> > \ op start interval="0" timeout="120" \ op stop interval="0"
> > timeout="120"
> > 
> > ||| vvv
> > 
> > # pcs resource create ResO2CB lsb:o2cb \ op monitor interval="10"
> > timeout="30" \ op start interval="0" timeout="120" \ op stop
> > interval="0" timeout="120"
> > 
> > Error: Unable to create resource 'lsb:o2cb', it is not installed on
> > this system (use --force to override)
> > 
> > 
> > I checked my installation and found this:
> > 
> > # rpm -ql pacemaker | grep o2cb 
> > /usr/share/man/man7/ocf_pacemaker_o2cb.7.gz
> > 
> > According this, I would expect
> > /usr/lib/ocf/resource.d/pacemaker/o2cb but there is no such
> > script.
> 
> OEL is, shall we say, very similar to RHEL. RHEL doesn't support
> OCFS2, so it does not include that RA. It is ironic that OEL doesn't
> change that. In any case, you can get the RA from the upstream source:
> https://github.com/ClusterLabs/pacemaker/tree/master/extra/resources
> 
> > But I succeeded in:
> > 
> > # pcs resource create --force ResO2CB ocf:pacemaker:o2cb \ op
> > monitor interval="10" timeout="30" \ op start interval="0"
> > timeout="120" \ op stop interval="0" timeout="120"
> > 
> > # pcs resource show ... ResO2CB(ocf::pacemaker:o2cb):
> > Stopped ...
> > 
> > Trying to debug-start:
> > 
> > # pcs resource debug-start ResO2CB Error performing operation:
> > Input/output error
> > 
> > 
> > 
> > # rpm -qi pacemaker Name: pacemaker Version : 1.1.13 
> > Release : 10.el7 Architecture: x86_64 Install Date: Sa 23 Jul
> > 2016 15:23:51 CEST Group   : System Environment/Daemons Size
> > : 1400509 License : GPLv2+ and LGPLv2+ Signature   :
> > RSA/SHA256, Sa 21 Nov 2015 19:24:37 CET, Key ID 72f97b74ec551f03 
> > Source RPM  : pacemaker-1.1.13-10.el7.src.rpm Build Date  : Sa 21
> > Nov 2015 18:10:40 CET ...
> > 
> > It seems that o2cb script is missing in that RPM. Or did I miss to
> > install any package?
> > 
> > Best Re

Re: [ClusterLabs] Bloody Newbie needs help for OCFS2 on pacemaker+corosync+pcs

2016-08-02 Thread thl
What do you mean? What is the "resource agent for using o2cb"? Please explain 
this a bit closer, I am just becoming familiar with all that stuff.

Thanks for any help,

Thomas Hluchnik


Am Tuesday 02 August 2016 15:28:17 schrieb emmanuel segura:
> why you don't use the resource agent for using o2cb? This script for
> begin used with ocfs legacy mode.
> 
> 2016-08-02 12:39 GMT+02:00 Kyle O'Donnell :
> > er forgot
> >
> > primitive p_o2cb lsb:o2cb \
> > op monitor interval="10" timeout="30" \
> > op start interval="0" timeout="120" \
> > op stop interval="0" timeout="120"
> >
> > - Original Message -
> > From: "Kyle O'Donnell" 
> > To: "users" 
> > Sent: Tuesday, August 2, 2016 6:38:11 AM
> > Subject: Re: [ClusterLabs] Bloody Newbie needs help for OCFS2 on
> > pacemaker+corosync+pcs
> >
> > primitive mysan ocf:heartbeat:Filesystem \
> > params device="/dev/myocsdevice" directory="/mymount" 
> > fstype="ocfs2" options="rw,noatime" \
> > op monitor timeout="40" interval="20" depth="0"
> > clone cl_ocfs2mgmt p_o2cb \
> > meta interleave="true"
> > clone cl_mysan mysan \
> > meta target-role="Started"
> > order o_myresource_fs inf: cl_mysan myresource
> >
> >
> > - Original Message -
> > From: t...@it-hluchnik.de
> > To: "users" 
> > Sent: Tuesday, August 2, 2016 6:31:44 AM
> > Subject: [ClusterLabs] Bloody Newbie needs help for OCFS2 on
> > pacemaker+corosync+pcs
> >
> > Hello everybody,
> > I am new to pacemaker (and to this list), trying to understand pacemaker. 
> > For this I created three virtual hosts in my VirtualBox plus four shared 
> > disks, attached with each of the three nodes.
> >
> > I installed Oracle Enterprise Linux 7.1, did a "yum update" and got OEL7.2.
> > Then I created four OCFS2 devices, working fine on all of my three nodes. 
> > They are started by systemd, using o2cb.service and ocfs2.service and 
> > running fine.
> >
> > Now I have started with learning pacemaker by "Clusters from Scratch" and 
> > meanwhile I have a virtual IP and a Webserver, this works fine so far.
> >
> > Next I want to control my OCFS2 devices by pacemaker, not by systemd. I 
> > searched the net and found some howtos, but they rely on crmsh instead of 
> > pcs. Most headaches come from DRBD which I don't understand at all. Why the 
> > hell does it seem that I need DRBD for running OCFS2?
> >
> > Is there anybody who can explain me how to get that running (after 
> > disabling o2cb.service & ocfs2.service):
> >
> > - create a resource which manages and controls o2cb stack
> > - create another resource which manages OCFS2 mountpoints
> > - create constraints for the Web Server (all Apache config / content shall 
> > be copied to one of the OCFS2 filesystems)
> >
> > The Web Server shall be dependent from availability of a mounted OCFS2 
> > device. If it stops working, the Web Server must switch to a node where 
> > that mount point is OK.
> >
> > Thanks in advance for any help
> >
> > Thomas Hluchnik
> >
> > ___
> > Users mailing list: Users@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
> >
> > ___
> > Users mailing list: Users@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
> 
> 
> 




signature.asc
Description: This is a digitally signed message part.
___
Users mailing list: Users@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


Re: [ClusterLabs] Bloody Newbie needs help for OCFS2 on pacemaker+corosync+pcs

2016-08-02 Thread thl
Hello Kyle + all,

No luck at all. Cant get o2cb up at all. Please find details below. Thanks in 
advance for any help.

First I tried to translate your crm syntax to pcs syntax:

primitive p_o2cb lsb:o2cb \
op monitor interval="10" timeout="30" \
op start interval="0" timeout="120" \
op stop interval="0" timeout="120"

  |||
  vvv

# pcs resource create ResO2CB lsb:o2cb \
op monitor interval="10" timeout="30" \
op start interval="0" timeout="120" \
op stop interval="0" timeout="120"

Error: Unable to create resource 'lsb:o2cb', it is not installed on this system 
(use --force to override)


I checked my installation and found this:

# rpm -ql pacemaker | grep o2cb
/usr/share/man/man7/ocf_pacemaker_o2cb.7.gz

According this, I would expect /usr/lib/ocf/resource.d/pacemaker/o2cb but there 
is no such script.

But I succeeded in:

# pcs resource create --force ResO2CB ocf:pacemaker:o2cb \
op monitor interval="10" timeout="30" \
op start interval="0" timeout="120" \
op stop interval="0" timeout="120"

# pcs resource show
...
ResO2CB(ocf::pacemaker:o2cb):  Stopped
...

Trying to debug-start:

# pcs resource debug-start ResO2CB
Error performing operation: Input/output error



# rpm -qi pacemaker
Name: pacemaker
Version : 1.1.13
Release : 10.el7
Architecture: x86_64
Install Date: Sa 23 Jul 2016 15:23:51 CEST
Group   : System Environment/Daemons
Size: 1400509
License : GPLv2+ and LGPLv2+
Signature   : RSA/SHA256, Sa 21 Nov 2015 19:24:37 CET, Key ID 72f97b74ec551f03
Source RPM  : pacemaker-1.1.13-10.el7.src.rpm
Build Date  : Sa 21 Nov 2015 18:10:40 CET
...

It seems that o2cb script is missing in that RPM. Or did I miss to install any 
package?

Best Regards

Thomas Hluchnik





Am Tuesday 02 August 2016 12:39:27 schrieb Kyle O'Donnell:
> er forgot
> 
> primitive p_o2cb lsb:o2cb \
> op monitor interval="10" timeout="30" \
> op start interval="0" timeout="120" \
> op stop interval="0" timeout="120"
> 
> - Original Message -
> From: "Kyle O'Donnell" 
> To: "users" 
> Sent: Tuesday, August 2, 2016 6:38:11 AM
> Subject: Re: [ClusterLabs] Bloody Newbie needs help for OCFS2 on  
> pacemaker+corosync+pcs
> 
> primitive mysan ocf:heartbeat:Filesystem \
> params device="/dev/myocsdevice" directory="/mymount" fstype="ocfs2" 
> options="rw,noatime" \
> op monitor timeout="40" interval="20" depth="0"
> clone cl_ocfs2mgmt p_o2cb \
> meta interleave="true"
> clone cl_mysan mysan \
> meta target-role="Started"
> order o_myresource_fs inf: cl_mysan myresource
> 
> 
> - Original Message -
> From: t...@it-hluchnik.de
> To: "users" 
> Sent: Tuesday, August 2, 2016 6:31:44 AM
> Subject: [ClusterLabs] Bloody Newbie needs help for OCFS2 on  
> pacemaker+corosync+pcs
> 
> Hello everybody,
> I am new to pacemaker (and to this list), trying to understand pacemaker. For 
> this I created three virtual hosts in my VirtualBox plus four shared disks, 
> attached with each of the three nodes.
> 
> I installed Oracle Enterprise Linux 7.1, did a "yum update" and got OEL7.2.
> Then I created four OCFS2 devices, working fine on all of my three nodes. 
> They are started by systemd, using o2cb.service and ocfs2.service and running 
> fine.
> 
> Now I have started with learning pacemaker by "Clusters from Scratch" and 
> meanwhile I have a virtual IP and a Webserver, this works fine so far.
> 
> Next I want to control my OCFS2 devices by pacemaker, not by systemd. I 
> searched the net and found some howtos, but they rely on crmsh instead of 
> pcs. Most headaches come from DRBD which I don't understand at all. Why the 
> hell does it seem that I need DRBD for running OCFS2?
> 
> Is there anybody who can explain me how to get that running (after disabling 
> o2cb.service & ocfs2.service):
> 
> - create a resource which manages and controls o2cb stack
> - create another resource which manages OCFS2 mountpoints
> - create constraints for the Web Server (all Apache config / content shall be 
> copied to one of the OCFS2 filesystems)
> 
> The Web Server shall be dependent from availability of a mounted OCFS2 
> device. If it stops working, the Web Server must switch to a node where that 
> mount point is OK.
> 
> Thanks in advance for any help
> 
> Thomas Hluchnik
> 
> ___
> Users mailing list: Users@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
> 
> ___
> Users mailing list: Users@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
> 




signature.asc
D

[ClusterLabs] Bloody Newbie needs help for OCFS2 on pacemaker+corosync+pcs

2016-08-02 Thread thl
Hello everybody,
I am new to pacemaker (and to this list), trying to understand pacemaker. For 
this I created three virtual hosts in my VirtualBox plus four shared disks, 
attached with each of the three nodes.

I installed Oracle Enterprise Linux 7.1, did a "yum update" and got OEL7.2.
Then I created four OCFS2 devices, working fine on all of my three nodes. They 
are started by systemd, using o2cb.service and ocfs2.service and running fine.

Now I have started with learning pacemaker by "Clusters from Scratch" and 
meanwhile I have a virtual IP and a Webserver, this works fine so far.

Next I want to control my OCFS2 devices by pacemaker, not by systemd. I 
searched the net and found some howtos, but they rely on crmsh instead of pcs. 
Most headaches come from DRBD which I don't understand at all. Why the hell 
does it seem that I need DRBD for running OCFS2?

Is there anybody who can explain me how to get that running (after disabling 
o2cb.service & ocfs2.service):

- create a resource which manages and controls o2cb stack
- create another resource which manages OCFS2 mountpoints
- create constraints for the Web Server (all Apache config / content shall be 
copied to one of the OCFS2 filesystems)

The Web Server shall be dependent from availability of a mounted OCFS2 device. 
If it stops working, the Web Server must switch to a node where that mount 
point is OK.

Thanks in advance for any help

Thomas Hluchnik


signature.asc
Description: This is a digitally signed message part.
___
Users mailing list: Users@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