Thursday, December 30, 2021

EFM Switchover Command


1. Check the Current Status using EFM command

root@ip-192.162.1.1:~#

root@ip-192.162.1.1:~# /usr/edb/efm-4.2/bin/efm cluster-status efm

Cluster Status: efm


        Agent Type  Address              DB       VIP

        ----------------------------------------------------------------

        Standby     192.162.1.2            UP

        Primary     192.162.1.1        UP

        Witness     192.162.1.3         N/A


Allowed node host list:

        192.162.1.1 192.162.1.3 192.162.1.2


Membership coordinator: 192.162.1.1


Standby priority host list:

        192.162.1.2


Promote Status:


        DB Type     Address              WAL Received LSN   WAL Replayed LSN   Info

        ---------------------------------------------------------------------------

        Primary     192.162.1.1                           8F/2901E170

        Standby     192.162.1.2            8F/2901E170        8F/2901E170


        Standby database(s) in sync with primary. It is safe to promote.


2. Run Switchover Command

root@ip-192.162.1.1:~# /usr/edb/efm-4.2/bin/efm promote efm -switchover

Promote/switchover command accepted by local agent. Proceeding with promotion and will reconfigure original primary. Run the 'cluster-status' command for information about the new cluster state.


3. Switchover Completed Successfully , Check Status

root@ip-192.162.1.1:~# /usr/edb/efm-4.2/bin/efm cluster-status efm

Cluster Status: efm


        Agent Type  Address              DB       VIP

        ----------------------------------------------------------------

        Primary     192.162.1.2            UP

        Idle        192.162.1.1        UNKNOWN

        Witness     192.162.1.3         N/A


Allowed node host list:

        192.162.1.1 192.162.1.3 192.162.1.2


Membership coordinator: 192.162.1.1


Standby priority host list:

        (List is empty.)


Promote Status:


        DB Type     Address              WAL Received LSN   WAL Replayed LSN   Info

        ---------------------------------------------------------------------------

        Primary     192.162.1.2                               8F/2901E300


        No standby databases were found.


Idle Node Status (idle nodes ignored in WAL LSN comparisons):


        Address              WAL Received LSN   WAL Replayed LSN   Info

        ---------------------------------------------------------------

        192.162.1.1        8F/2901E300        8F/2901E300        DB is in recovery.

root@ip-192.162.1.1:~#

root@ip-192.162.1.1:~#

root@ip-192.162.1.1:~# /usr/edb/efm-4.2/bin/efm cluster-status efm

Cluster Status: efm


        Agent Type  Address              DB       VIP

        ----------------------------------------------------------------

        Primary     192.162.1.2            UP

        Standby     192.162.1.1        UP

        Witness     192.162.1.3         N/A


Allowed node host list:

        192.162.1.1 192.162.1.3 192.162.1.2


Membership coordinator: 192.162.1.1


Standby priority host list:

        192.162.1.1


Promote Status:


        DB Type     Address              WAL Received LSN   WAL Replayed LSN   Info

        ---------------------------------------------------------------------------

        Primary     192.162.1.2                               8F/2901E300

        Standby     192.162.1.1        8F/2901E300        8F/2901E300


        Standby database(s) in sync with primary. It is safe to promote.

root@ip-192.162.1.1:~#

root@ip-192.162.1.1:~#

root@ip-192.162.1.1:~#


No comments:

Post a Comment

EFM Switchover Command

1. Check the Current Status using EFM command root@ip-192.162.1.1:~# root@ip-192.162.1.1:~# /usr/edb/efm-4.2/bin/efm cluster-status efm Clus...