[Pacemaker] DLM and Control instances for OCFS2

2011-08-18 Thread Prakash Velayutham
Hi,

I am using

pacemaker - 1.1.5-5.5.5
corosync - 1.3.0-5.6.1
ocfs2 - 1.4.3-0.16.7

I will be using 2 OCFS2 volumes for different purposes. Is it enough to have 
just one instance of 

ocf:pacemaker:controld
and
ocf:ocfs2:o2cb

or do I need a separate instance of the above for each OCFS2 volume being 
managed by Corosync/Pacemaker cluster?

Thanks,
Prakash
___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


Re: [Pacemaker] Syntax highlighting in vim for crm configure edit

2011-08-18 Thread Digimer
On 08/18/2011 10:39 AM, Trevor Hemsley wrote:
> Hi all
> 
> I have attached a first stab at a vim syntax highlighting file for 'crm
> configure edit'
> 
> To activate this, I have added 'filetype plugin on' to my /root/.vimrc
> then created /root/.vim/{ftdetect,ftplugin}/pcmk.vim
> 
> In /root/.vim/ftdetect/pcmk.vim I have the following content
> 
> au BufNewFile,BufRead /tmp/tmp* set filetype=pcmk
> 
> but there may be a better way to make this happen. /root/.vim/pcmk.vim
> is the attached file.
> 
> Comments (not too nasty please!) welcome.

I would love to see proper support added for CRM syntax highlighting
added to vim. I will give this is a test and write back in a bit.

-- 
Digimer
E-Mail:  digi...@alteeve.com
Freenode handle: digimer
Papers and Projects: http://alteeve.com
Node Assassin:   http://nodeassassin.org
"At what point did we forget that the Space Shuttle was, essentially,
a program that strapped human beings to an explosion and tried to stab
through the sky with fire and math?"

___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


[Pacemaker] Syntax highlighting in vim for crm configure edit

2011-08-18 Thread Trevor Hemsley

Hi all

I have attached a first stab at a vim syntax highlighting file for 'crm 
configure edit'


To activate this, I have added 'filetype plugin on' to my /root/.vimrc 
then created /root/.vim/{ftdetect,ftplugin}/pcmk.vim


In /root/.vim/ftdetect/pcmk.vim I have the following content

au BufNewFile,BufRead /tmp/tmp* set filetype=pcmk

but there may be a better way to make this happen. /root/.vim/pcmk.vim 
is the attached file.


Comments (not too nasty please!) welcome.

--
Voiceflex
Tel 0203 301 6000 | Fax 0203 310 6700
http://getsatisfaction.com/voiceflex
www.voiceflex.com

Information contained in this e-mail is intended for the use of the 
addressee(s) only and is confidential. If you are not an addressee, note that 
any disclosure, copying, distribution, or use of the contents of this message 
is strictly prohibited. If you have received this e-mail in error, please 
contact the firm at +44 (0) 20 3301 6000 or supp...@voiceflex.com.  Any views 
or opinions expressed in this message are those of the individual sender, 
except where the sender specifically states them to be the views of Frontier 
Systems Ltd. Frontier Systems Ltd does not accept legal responsibility for this 
e-mail message due to the insecure nature of internet communications. Frontier 
Systems, 9 Warwick Street, London W1B 5LY Registered in England and Wales, No. 
03544845



" Vim syntax file
" Language: pcmk
" Filenames:*.pcmk

" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
  syntax clear
elseif exists("b:current_syntax")
  finish
endif

" setlocal iskeyword+=-

" Errors
syn matchpcmkParErr ")"
syn matchpcmkBrackErr   "]"
syn matchpcmkBraceErr   "}"

" Enclosing delimiters
syn region   pcmkEncl transparent matchgroup=pcmkParEncl start="(" 
matchgroup=pcmkParEncl end=")" contains=ALLBUT,pcmkParErr
syn region   pcmkEncl transparent matchgroup=pcmkBrackEncl start="\[" 
matchgroup=pcmkBrackEncl end="\]" contains=ALLBUT,pcmkBrackErr
syn region   pcmkEncl transparent matchgroup=pcmkBraceEncl start="{" 
matchgroup=pcmkBraceEncl end="}" contains=ALLBUT,pcmkBraceErr

" Comments
syn region   pcmkComment start="//" end="$" contains=pcmkComment,pcmkTodo
syn region   pcmkComment start="/\*" end="\*/" contains=pcmkComment,pcmkTodo
syn keyword  pcmkTodo contained TODO FIXME XXX

" Strings
syn region   pcmkStringstart=+"+ skip=+\|\\"+ end=+"+

" General keywords
syn keyword  pcmkKeyword  node primitive property nextgroup=pcmkName skipwhite
syn keyword  pcmkKey2  location nextgroup=pcmkResource skipwhite
syn keyword  pcmkKey3  colocation order nextgroup=pcmkName3 skipwhite
syn match pcmkResource /\<\f\+\>/ nextgroup=pcmkName2 skipwhite
syn match pcmkName /\<\f\+\>/
syn match pcmkName2 /\<\f\+\>/ nextgroup=pcmkPrio skipwhite
syn match pcmkName3 /\<\f\+\>/ nextgroup=pcmkPrio skipwhite
syn match pcmkPrio /\<\w\+\>/

" Graph attributes
syn keyword  pcmkType attributes params op meta
syn keyword  pcmkTag monitor start stop 

" Special chars
syn matchpcmkKeyChar  "="
syn matchpcmkKeyChar  ";"
syn matchpcmkKeyChar  "->"

" Identifier
syn matchpcmkIdentifier /\<\w\+\>/
syn matchpcmkKeyword  "^ms\s*" nextgroup=pcmkName skipwhite

" Synchronization
syn sync minlines=50
syn sync maxlines=500

" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_pcmk_syntax_inits")
  if version < 508
let did_pcmk_syntax_inits = 1
command -nargs=+ HiLink hi link 
  else
command -nargs=+ HiLink hi def link 
  endif

  HiLink pcmkParErr  Error
  HiLink pcmkBraceErrError
  HiLink pcmkBrackErrError

  HiLink pcmkComment Comment
  HiLink pcmkTodoTodo

  HiLink pcmkParEncl Keyword
  HiLink pcmkBrackEncl   Keyword
  HiLink pcmkBraceEncl   Keyword

  HiLink pcmkKeyword Keyword
  HiLink pcmkKey2Keyword
  HiLink pcmkKey3Keyword
  HiLink pcmkTypeKeyword
  HiLink pcmkKeyChar Keyword

  HiLink pcmkString  String
  HiLink pcmkIdentifier  Identifier
  HiLink pcmkTag Tag
  HiLink pcmkName   Type
  HiLink pcmkName2  Tag
  HiLink pcmkName3  Type
  HiLink pcmkResource   Type
  HiLink pcmkPrio   Number

  delcommand HiLink
endif

let b:current_syntax = "pcmk"

" vim: ts=8
___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


Re: [Pacemaker] Question about Pacemaker master/slave and mysql replication

2011-08-18 Thread Viacheslav Biriukov
I don't use this resource in the production. But I think you may to do
experiments with *location *resource.
You also can see my cluster resource Mysql Ping (I use it in the production
for Mysql Master-Master HA)  https://github.com/Sov1et/ocf-mysqlping. And
some explain (in кussian). http://habrahabr.ru/blogs/sysadm/118925/

2011/8/18 Michael Szilagyi 

> Thanks very much for the link.  The percona mysql script does pretty much
> exactly what I need in regards to master/slave promotion/demotion.  I did
> run into a couple of issues revolving around virtual IPs and how they should
> follow the master/slave(s) around.
>
> The problem that I'm now running into has to do with the grouping of my vip
> for writer/reader.  I'm trying to get it so that the vip_writer will stay
> with the Master sql server and the reader will stay with the Slaves.  I'll
> have N slaves and I only care about having 1 virtual IP for the slaves.  I
> don't care which slave pacemaker picks to have the vip, it just needs to
> pick one.  I've tried to setup some colocation types to map them together
> but I get into states where the Master sql server will be sitting with the
> reader_vip.  I've included my cib output and what the crm_mon is reporting
> my current status to be.  As you can see, the sql master and writer_vip are
> not lined up.
>
> Basically, I now have a cib that looks like this (crm configure show):
>
> node $id="0d6be727-1552-4028-ad8a-cf54b2766da0" three \
> attributes IP="172.17.0.130" standby="off"
> node $id="7deca2cd-9a64-476c-8ea2-372bca859a4f" four \
> attributes IP="172.17.0.131" standby="off"
> node $id="bb15cdbc-8bec-4f64-83bb-8bbd6d4ca1a7" seven \
>  attributes IP="172.17.0.134" standby="off"
> primitive p_sql ocf:percona:MySQL_replication \
> params reader_vip_prefix="reader_vip_"
> ms_replication_resource_name="ms_novaSQL" master_log_file="mysql-bin.38"
> master_log_pos="106" promoted_coordinates="::" master_host="172.17.0.131" \
>  params super_db_user="root" super_db_password="nova" \
> params repl_db_user="novaSlave" repl_db_password="nova" allowed_sbm="10" \
>  params state_file="/var/run/heartbeat/novaSQL.state"
> recover_file="/var/run/heartbeat/novaSQL.recovery" \
> params p_replication_resource_name="p_sql" \
>  params heartbeat_table="ocf.heartbeat" \
> op monitor interval="10s" role="Master" \
>  op monitor interval="10s" role="Slave"
> primitive reader_vip_1 ocf:heartbeat:IPaddr2 \
> params ip="172.17.0.97" nic="eth0" \
>  meta target-role="Started"
> primitive writer_vip ocf:heartbeat:IPaddr2 \
>  params ip="172.17.0.96" nic="eth0" \
>  meta target-role="Started"
> ms ms_novaSQL p_sql \
> meta master-max="1" master-node-max="1" clone-max="3" clone-node-max="1"
> target-role="Master" notify="false" globally-unique="false"
> colocation reader_vip_coloc_slave inf: ms_novaSQL:Slave reader_vip_1
> colocation writer_vip_coloc_master inf: ms_novaSQL:Master writer_vip
> order order_writer_vip_after_master inf: ms_novaSQL:promote
> writer_vip:start
> property $id="cib-bootstrap-options" \
> dc-version="1.0.9-unknown" \
> cluster-infrastructure="Heartbeat" \
>  stonith-enabled="false" \
> no-quorum-policy="ignore" \
>  last-lrm-refresh="1313615481"
>
> Along with the output from crm_mon.  You can see that the Master sql server
> has the reader_vip and the slave has the writer_vip (which should be
> reversed).
>
> Node four (7deca2cd-9a64-476c-8ea2-372bca859a4f): online
> p_sql:1 (ocf::percona:MySQL_replication) Master
> reader_vip_1(ocf::heartbeat:IPaddr2) Started
>  Node three (0d6be727-1552-4028-ad8a-cf54b2766da0): online
> p_sql:0 (ocf::percona:MySQL_replication) Slave
> writer_vip  (ocf::heartbeat:IPaddr2) Started
> Node seven (bb15cdbc-8bec-4f64-83bb-8bbd6d4ca1a7): online
> p_sql:2 (ocf::percona:MySQL_replication) Slave
>
>
> As always, any ideas/suggestions are appreciated.
>
> -Mike.
>
>
> On Mon, Aug 15, 2011 at 1:04 PM, Viacheslav Biriukov <
> v.v.biriu...@gmail.com> wrote:
>
>> Hello.
>> Check it out https://code.launchpad.net/percona-prm.
>> And presentation:
>> http://www.percona.com/files/presentations/percona-live/nyc-2011/PerconaLiveNYC2011-MySQL-High-Availability-with-Pacemaker.pdf
>>
>> 2011/8/15 Michael Szilagyi 
>>
>>> I'm already using the mysql RA file from
>>> https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/mysql(which
>>>  also seems to have replication support in it).
>>>
>>> Basically what seems to be happening is that pacemaker detects that the
>>> master has dropped and promotes a slave up to master.  However, it is not
>>> properly reconfiguring the slaves with a CHANGE MASTER TO.  I can see some
>>> lines in the ocf file that relate to changing master but it isn't setting it
>>> up properly.  If I login to the slave and issue a CHANGE MASTER TO ... /
>>> START SLAVE then replication will start up normally again.
>>>
>>> Since I can see that the script does allow the master host to get set
>>> when going

Re: [Pacemaker] ocf:heartbeat:Filesystem doesn't work via corosync

2011-08-18 Thread Dan Frincu
Hi,

On Thu, Aug 18, 2011 at 12:59 AM, Cotton Tenney
 wrote:
>  Hello all,
>
> I've been trying to get a 2-node mysql cluster up on Pacemaker/DRBD and I'm 
> having issues getting corosync to mount the partition after starting DRBD. It 
> seems like when running the ocf:Filesystem script via pacemaker, it fails to 
> make the drbd device primary on the master node. I can manually run the ocf 
> Filesystem, and DRBD starts and the partition is mounted as expected:
>
> root@gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_ROOT=/usr/lib/ocf
> root@gila:/usr/lib/ocf/resource.d/heartbeat# export 
> OCF_RESKEY_device="/dev/drbd0"
> root@gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_RESKEY_options=rw
> root@gila:/usr/lib/ocf/resource.d/heartbeat# export OCF_RESKEY_fstype=ext4
> root@gila:/usr/lib/ocf/resource.d/heartbeat# export 
> OCF_RESKEY_directory="/var/lib/mysql"
> root@gila:/usr/lib/ocf/resource.d/heartbeat# /etc/init.d/drbd start
>  --== Thank you for participating in the global usage survey ==--
> The server's response is:
> node already registered
> * Starting DRBD resources
> [
> disk0
> Found valid meta data in the expected location, 32978944 bytes into 
> /dev/fioa.
> d(disk0) s(disk0) n(disk0) ] ...done.
> root@gila:/usr/lib/ocf/resource.d/heartbeat# drbdadm primary all
> root@gila:/usr/lib/ocf/resource.d/heartbeat# ./Filesystem start
> Filesystem[28277]: INFO: Running start for /dev/drbd0 on /var/lib/mysql
> FATAL: Module scsi_hostadapter not found.
> Filesystem[28277]: INFO: Starting filesystem check on /dev/drbd0
> fsck from util-linux-ng 2.17.2
> /dev/drbd0: clean, 79439/19537920 files, 7781765/78122846 blocks
> root@gila:/usr/lib/ocf/resource.d/heartbeat#
>
>
> My config:
>
> root@gila:~# crm configure show
> node gila
> node kanab
> primitive drbd_mysql ocf:linbit:drbd \
> params drbd_resource="disk0" \
> op monitor interval="15s" \
> op start interval="15s"
> primitive fs_mysql ocf:heartbeat:Filesystem \
> params device="/dev/drbd0" directory="/var/lib/mysql" fstype="ext4"
> op monitor interval="15s" \
> op start interval="15s"
> primitive ip_mysql ocf:heartbeat:IPaddr2 \
> params ip="192.168.10.101" nic="eth0"
> primitive mysqld lsb:mysql
> group mysqlgroup fs_mysql ip_mysql mysqld
> ms ms_drbd_mysql drbd_mysql \
> meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" 
> notify="true"
> colocation mysql_on_drbd inf: mysqlgroup ms_drbd_mysql:Master

You need an ordering constraint specifying start mysqlgroup after DRBD
gets promoted to Master.
order mysql_after_drbd inf: ms_drbd_mysql:promote mysqlgroup:start

Regards,
Dan

> property $id="cib-bootstrap-options" \
> dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
> cluster-infrastructure="openais" \
> expected-quorum-votes="1" \
> stonith-enabled="false"
> root@gila:~# cat /etc/drbd.d/disk0.res
> resource disk0 {
> protocol C;
> net {
> cram-hmac-alg sha1;
> shared-secret "xxx";
> }
> on kanab {
> device /dev/drbd0;
> disk /dev/fioa;
> address 10.10.1.2:7788;
> meta-disk internal;
> }
> on gila {
> device /dev/drbd0;
> disk /dev/fioa;
> address 10.10.1.1:7788;
> meta-disk internal;
> }
> }
> root@gila:~#
>
> Log messages:
>
> Aug 17 12:35:20 gila crmd: [24757]: info: te_rsc_command: Initiating action 
> 32: start fs_mysql_start_0 on gila (local)
> Aug 17 12:35:20 gila crmd: [24757]: info: do_lrm_rsc_op: Performing 
> key=32:1:0:9b90831c-824b-462f-a2db-7e582c706638 op=fs_mysql_start_0 )
> Aug 17 12:35:20 gila lrmd: [24754]: debug: on_msg_perform_op:2359: copying 
> parameters for rsc fs_mysql
> Aug 17 12:35:20 gila lrmd: [24754]: debug: on_msg_perform_op: add an 
> operation operation start[8] on ocf::Filesystem::fs_mysql for client 24757, 
> its parameters: fstype=[ext4] crm_feature_set=[3.0.1] device=[/dev/drbd0] 
> CRM_meta_timeout=[2] options=[rw] directory=[/var/lib/mysql] to the 
> operation list.
> Aug 17 12:35:20 gila lrmd: [24754]: info: rsc:fs_mysql:8: start
> Aug 17 12:35:20 gila Filesystem[25276]: INFO: Running start for /dev/drbd0 on 
> /var/lib/mysql
> Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stderr) 
> FATAL: Module scsi_hostadapter not found.
> Aug 17 12:35:20 gila Filesystem[25276]: INFO: Starting filesystem check on 
> /dev/drbd0
> Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stdout) 
> fsck from util-linux-ng 2.17.2
> Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stdout) 
> Disk write-protected; use the -n option to do a read-only#012check of the 
> device.
> Aug 17 12:35:20 gila lrmd: [24754]: info: RA output: (fs_mysql:start:stderr) 
> fsck.ext4: Read-only file system while trying to open /dev/drbd0#015
>
>
> Any help would be greatly appreciated.
>
> Thanks,
> Cotton Tenney
> Systems Administrator
> Rogers Software Development
>
>
> ___
> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project