Wednesday, July 09, 2008

How to failback a VVR RVG to Original Primary

The scenario is that pw250 was down and pw450 (secondary) takeover as a new primary.

After pw250 is fixed, it's powered-up. And the config error is shown below in red. Pw250 is running as acting secondary.
The procedure show how to do a failback to original primary - pw250.



pw250 -- 192.168.100.118 ---------- this is the original primary
pw450 -- 192.168.100.116 ---------- this is the original secondary
RVG name: PRDvvr
DG name: mxpdbs_dg
App: Oracle 10gR2 DB


[root@pw250 log]$
[root@pw250 log]$
[root@pw250 log]$ vradmin -g mxpdbs_dg repstatus PRDvvr
Replicated Data Set: PRDvvr
Primary:
Host name: 192.168.100.116
RVG name: PRDvvr
DG name: mxpdbs_dg
RVG state: enabled for I/O
Data volumes: 2
VSets: 0
SRL name: vvrsrl
SRL size: 1.00 G
Total secondaries: 1

Primary (acting secondary):
Host name: 192.168.100.118
RVG name: PRDvvr
DG name: mxpdbs_dg
Data status: consistent, behind
Replication status: logging to DCM (needs failback synchronization)
Current mode: asynchronous
Logging to: DCM (contains 17408 Kbytes) (failback logging)
Timestamp Information: N/A

Config Errors:
192.168.100.118: Primary-Primary configuration

[root@pw250 log]$ vradmin -g mxpdbs_dg fbsync
VxVM VVR vradmin ERROR V-5-52-19 Incorrect number of arguments
VxVM VVR vradmin INFO V-5-52-42
Usage: vradmin [-g diskgroup] [-wait] fbsync rvg [cache=cacheobj | cachesize=size]


[root@pw250 log]$ vradmin -g mxpdbs_dg fbsync PRDvvr
[root@pw250 log]$ vradmin -g mxpdbs_dg repstatus PRDvvr
Replicated Data Set: PRDvvr
Primary:
Host name: 192.168.100.116
RVG name: PRDvvr
DG name: mxpdbs_dg
RVG state: enabled for I/O
Data volumes: 2
VSets: 0
SRL name: vvrsrl
SRL size: 1.00 G
Total secondaries: 1

Secondary:
Host name: 192.168.100.118
RVG name: PRDvvr
DG name: mxpdbs_dg
Data status: inconsistent
Replication status: resync in progress (failback synchronization)
Current mode: asynchronous
Logging to: DCM (contains 17408 Kbytes) (failback logging)
Timestamp Information: N/A

[root@pw250 log]$ vradmin -g mxpdbs_dg migrate PRDvvr 192.168.100.118
VxVM VVR vradmin WARNING V-5-52-93 Make sure applications using Primary data volumes are stopped.
vradmin: Continue with migrate (y/n)? y
Message from Primary:
VxVM VVR vxrvg ERROR V-5-1-10128 Operation not allowed with open volumes
VxVM VVR vxrvg ERROR V-5-1-407 Attempting to cleanup after failure ...

<***********At this stage, go to pw450 and shutdown all applications and unmount the filesystems)************>

[root@pw250 log]$ vradmin -g mxpdbs_dg migrate PRDvvr 192.168.100.118
VxVM VVR vradmin WARNING V-5-52-93 Make sure applications using Primary data volumes are stopped.
vradmin: Continue with migrate (y/n)? y

[root@pw250 log]$ vradmin -g mxpdbs_dg repstatus PRDvvr
Replicated Data Set: PRDvvr
Primary:
Host name: 192.168.100.118
RVG name: PRDvvr
DG name: mxpdbs_dg
RVG state: enabled for I/O
Data volumes: 2
VSets: 0
SRL name: vvrsrl
SRL size: 5.00 G
Total secondaries: 1

Secondary:
Host name: 192.168.100.116
RVG name: PRDvvr
DG name: mxpdbs_dg
Data status: consistent, up-to-date
Replication status: replicating (connected)
Current mode: synchronous
Logging to: SRL
Timestamp Information: N/A


[root@pw250 log]$ mount -F vxfs /dev/vx/dsk/mxpdbs_dg/mxpdbs_vol01 /app/oracle
[root@pw250 log]$ ls -ld /app/oracle
drwxr-xr-x 8 oracle oinstall 1024 Jul 9 17:42 /app/oracle/
[root@pw250 log]$ mount -F vxfs /dev/vx/dsk/mxpdbs_dg/mxpdbs_vol02 /flasharea/
[root@pw250 log]$ su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
[oracle@pw250 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 9 18:57:03 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2550136832 bytes
Fixed Size 1980808 bytes
Variable Size 536872568 bytes
Database Buffers 1996488704 bytes
Redo Buffers 14794752 bytes
Database mounted.
Database opened.
SQL> select * from testt;

A
--------------------
2
288
3333
from450

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

Edit listener.ora and anything that's required, and start up the listener.

[oracle@pw250 admin]$ lsnrctl start

LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 09-JUL-2008 18:58:35

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /app/oracle/product/10.2.0/dbhome/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
System parameter file is /app/oracle/product/10.2.0/dbhome/network/admin/listener.ora
Log messages written to /app/oracle/product/10.2.0/dbhome/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pw250)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
Start Date 09-JUL-2008 18:58:37
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/10.2.0/dbhome/network/admin/listener.ora
Listener Log File /app/oracle/product/10.2.0/dbhome/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pw250)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@pw250 admin]$
[oracle@pw250 admin]$ lsnrctl status

LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 09-JUL-2008 18:59:27

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
Start Date 09-JUL-2008 18:58:37
Uptime 0 days 0 hr. 0 min. 50 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/10.2.0/dbhome/network/admin/listener.ora
Listener Log File /app/oracle/product/10.2.0/dbhome/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pw250)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ooo" has 1 instance(s).
Instance "ooo", status READY, has 1 handler(s) for this service...
Service "oooXDB" has 1 instance(s).
Instance "ooo", status READY, has 1 handler(s) for this service...
Service "ooo_XPT" has 1 instance(s).
Instance "ooo", status READY, has 1 handler(s) for this service...
The command completed successfully

No comments: