This command help me.
I return pg cluster in normal state. Thanks a lot.
Now I was reboot a node for test and got this state:
Resource Group: master
pgsql-master-ip (ocf::heartbeat:IPaddr2): Started b.mydomain.com
Master/Slave Set: msPostgresql [pgsql]
Masters: [ b.mydomain.com ]
Slaves: [ c.mydomain.com ]
Stopped: [ pgsql:2 ]
apache-master-ip (ocf::heartbeat:IPaddr2): Started c.mydomain.com
apache (ocf::heartbeat:apache): Started c.mydomain.com
Node Attributes:
* Node a.mydomain.com:
+ master-pgsql:2 : -INFINITY
+ pgsql-data-status : DISCONNECT
+ pgsql-status : STOP
* Node c.mydomain.com:
+ master-pgsql:0 : -INFINITY
+ master-pgsql:2 : -INFINITY
+ pgsql-data-status : SYNC
+ pgsql-status : HS:async
* Node b.mydomain.com:
+ master-pgsql:0 : 1000
+ master-pgsql:1 : 1000
+ pgsql-data-status : SYNC
+ pgsql-master-baseline : 0000000032000000
+ pgsql-status : PRI
I was maunal sync pgsql from a node to b node and
remove /var/lib/pgsql/tmp/PGSQL.lock &
/var/lib/postgresql/9.3/main/recovery.conf on a node.
Now, how to better way ask cluster about migrate master pgsql on a node?
2013/12/25 Jeff Frost <[email protected]>
> So, does this not work:
>
> crm_attribute -l reboot -N c.mydomain.com --name "master-pgsql:2"
> --delete
>
> ?
>
> On Dec 25, 2013, at 8:27 AM, Andrey Rogovsky <[email protected]> wrote:
>
> > I run similar commands. But I have unwanted attributes and want to delete
> > they.
> >
> >
> >
> > 2013/12/25 Jeff Frost <[email protected]>
> >
> >> I usually do something like this on the master I want to bring up:
> >>
> >> #!/bin/bash
> >>
> >> rm -f /var/lib/pgsql/9.2/data/recovery.conf
> >> rm -f ~postgres/tmp/PGSQL.lock
> >> crm_attribute -l reboot -N $(uname -n) -n "pgsql-data-status" -v
> "LATEST"
> >> crm_attribute -l reboot -N $(uname -n) -n "master-pgsql" -v "1000"
> >> crm resource cleanup msPostgresql
> >> crm resource cleanup master-group
> >>
> >>
> >> On Dec 24, 2013, at 11:45 PM, Andrey Rogovsky <[email protected]>
> >> wrote:
> >>
> >>> Thanks a lot! It really help me!
> >>> Now I have this status:
> >>> Node Attributes:
> >>> * Node a.mydomain.com:
> >>> + master-pgsql:0 : 1000
> >>> + master-pgsql:1 : -INFINITY
> >>> + pgsql-data-status : LATEST
> >>> + pgsql-master-baseline : 000000002F000090
> >>> + pgsql-status : PRI
> >>> * Node c.mydomain.com:
> >>> + master-pgsql:0 : 1000
> >>> + master-pgsql:2 : -INFINITY
> >>> + pgsql-data-status : SYNC
> >>> + pgsql-status : STOP
> >>> * Node b.mydomain.com:
> >>> + master-pgsql:0 : 1000
> >>> + master-pgsql:1 : -INFINITY
> >>> + pgsql-data-status : SYNC
> >>> + pgsql-status : STOP
> >>>
> >>> I can begin start pgsql replication, but don't like this:
> >>> + master-pgsql:1 : -INFINITY
> >>> + master-pgsql:2 : -INFINITY
> >>> I want removie this attributes. I try run:
> >>> root@b:~# crm_attribute -N c.mydomain.com --name "master-pgsql:2"
> >> --delete
> >>> And got answer: Error performing operation: cib object missing
> >>>
> >>> May be I miss something... How I can delete unwanted attribuies?
> >>>
> >>>
> >>>
> >>>
> >>> 2013/12/24 Jeff Frost <[email protected]>
> >>>
> >>>>
> >>>> On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <[email protected]>
> >> wrote:
> >>>>
> >>>>> crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
> >>>>> "LATEST"
> >>>>> crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v
> >>>> "SYNC"
> >>>>> crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v
> >>>> "SYNC"
> >>>>
> >>>>
> >>>> Try:
> >>>>
> >>>> crm_attribute -l reboot
> >>>>
> >>>> instead of -l forever
> >>>>
> >>>> ---
> >>>> Jeff Frost <[email protected]>
> >>>> CTO, PostgreSQL Experts, Inc.
> >>>> Phone: 1-888-PG-EXPRT x506
> >>>> FAX: 415-762-5122
> >>>> http://www.pgexperts.com/
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Linux-HA mailing list
> >>>> [email protected]
> >>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >>>> See also: http://linux-ha.org/ReportingProblems
> >>>>
> >>> _______________________________________________
> >>> Linux-HA mailing list
> >>> [email protected]
> >>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >>> See also: http://linux-ha.org/ReportingProblems
> >>
> >> ---
> >> Jeff Frost <[email protected]>
> >> CTO, PostgreSQL Experts, Inc.
> >> Phone: 1-888-PG-EXPRT x506
> >> FAX: 415-762-5122
> >> http://www.pgexperts.com/
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Linux-HA mailing list
> >> [email protected]
> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >> See also: http://linux-ha.org/ReportingProblems
> >>
> > _______________________________________________
> > Linux-HA mailing list
> > [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
>
> ---
> Jeff Frost <[email protected]>
> CTO, PostgreSQL Experts, Inc.
> Phone: 1-888-PG-EXPRT x506
> FAX: 415-762-5122
> http://www.pgexperts.com/
>
>
>
>
>
>
>
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems