Ticket #25 (closed task 任务: fixed)
一些杂项 heartbeat
| Reported by: | lisiliang | Owned by: | lisliang |
|---|---|---|---|
| Priority: | major | Milestone: | PG 测试计划进程 |
| Component: | component1 | Version: | |
| Keywords: | heartbeat | Cc: | |
| Due Date: | 31/05/2012 |
Description
添加vip
crm configure primitive ClusterIp? ocf:heartbeat:IPaddr2 \
params ip="192.168.11.100" cidr_netmask="32" \
op monitor interval="30s"
忽略节点数量是否满足合法人数 集群存在的依据为集群里要有超过50%的成员存活。
crm configure property no-quorum-policy=ignore
设定资源的粘性值。
crm configure rsc_defaults resource-stickiness=100
添加资源
crm configure primitive postgres_res ocf:heartbeat:pgsql \
params pgctl="/usr/local/pgsql/bin/pg_ctl" psql="/usr/local/pgsql/bin/psql" start_opt="" pgdata="/usr/local/pgsql/data" config="/usr/local/pgsql/data/postgresql.conf" pgdba="postgres" \
op start interval="0" timeout="120s" \
op stop interval="0" timeout="120s" \
op monitor interval="30s" timeout="30s" depth="0"
指定资源在同一个地方运行
crm configure colocation Pg-with-ClusterIp? infinity: postgres_res ClusterIp?
指定资源的启动顺序
crm configure order Pg-after-ClusterIp? mandatory: ClusterIp? postgres_res
指定资源优先在那个节点启动
location Pg-prefer-to-master postgres_res 50: dba-test-11-97.pconline.gz
location ClusterIp?-prefer-to-master ClusterIp? 50: dba-test-11-97.pconline.gz
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)