Implement ACFS replication on Oracle 12C
Environment: qc550705 & qc550707, AIX6.1 + 12c RAC
Primary FS: qc550705:/acfs3
Standby FS: qc550707:/acfsstd1
Prerequisites: the available space of primary FS must be equal to the space in use.
Follow these steps:
1. Create replication admin (on a node)
Grid @ qc550705:/home/grid> sqlplus "/as sysasm"
SQL * Plus: Release 12.1.0.1.0 Production on Fri Feb 14 16:24:33 2014
Copyright (c) 1982,201 3, Oracle. All rights reserved.
Connected:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> CREATE USER acfsrep1 IDENTIFIED BY "773946 ";
User created.
SQL> GRANT sysasm, sysdba TO acfsrep1;
Grant succeeded ..
2. establish standby FS
-- Add ACFS volume
SQL> select. group_number, B. name,. name, value from v $ asm_attribute a, v $ asm_diskgroup B where lower (. name) like '% compatible %' and B. group_number =. group_number;
GROUP_NUMBER NAME VALUE
--------------------------------------------------------------------------------------------------------------------------
1 ACFSDG compatible. asm 12.1.0.0.0
1 ACFSDG compatible. rdbms 12.1.0.0.0
1 ACFSDG compatible. advm 12.1.0.0.0
2 SYSDG compatible. asm 12.1.0.0.0
2 SYSDG compatible. rdbms 10.1.0.0.0
SQL> alter diskgroup acfsdg add volume acfsvol_std1 size 16G unprotected stripe_columns 1;
Diskgroup altered.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit Production
With the Real Application Clusters and Automatic Storage Management options
Grid @ qc550707:/home/grid> ls-l/dev/asm/acfsvol *
Brw-rw-r -- 1 root asmadmin 50, 24577 Jan 29/dev/asm/acfsvol1-48
Brw-rw-r -- 1 root asmadmin 50, 24578 Jan 29/dev/asm/acfsvol3-48
Brw-rw-r -- 1 root asmadmin 50, 24579 Feb 14/dev/asm/acfsvol_std1-48
Grid @ qc550707:/home/grid> mkfs-V acfs-s 16G/dev/asm/acfsvol_std1-48
Mkfs: version = 12.1.0.1.0
Mkfs: on-disk versions = 39.0
Mkfs: volume =/dev/asm/acfsvol_std1-48
Mkfs: volume size = 17179869184
Mkfs: Format complete.
-- Mount/acfsstd1
Root @ qc550707:/> srvctl add filesystem-device/dev/asm/acfsvol_std1-48-path/acfsstd1-node qc550707
Root @ qc550707:/& gt; srvctl start filesystem-device/dev/asm/acfsvol_std1-48-node qc550707
Root @ qc550707:/> crsctl status res ora. acfsdg. acfsvol_std1.acfs-t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
Ora. acfsdg. acfsvol_std1.acfs
1 ONLINE qc550707 mounted on/acfsstd1
, STABLE
--------------------------------------------------------------------------------
3. Add a dedicated ACFS replication Service for ASM instances (both nodes must be executed)
-- Add service name for + ASM1
Grid @ qc550705:/home/grid> sqlplus "/as sysasm"
SQL * Plus: Release 12.1.0.1.0 Production on Fri Feb 14 16:36:29 2014
Copyright (c) 1982,201 3, Oracle. All rights reserved.
Connected:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> alter system set service_names = '+ ASM1, primary_acfsrep 'sid =' + ASM1 ';
System altered.
SQL> show parameter service_name
NAME TYPE VALUE
-----------------------------------------------------------------------------
Service_names string + ASM1, primary_acfsrep
-- Add service name for + ASM1 & + ASM2
Grid @ qc550707:/home/grid> sqlplus '/as sysasm'
SQL * Plus: Release 12.1.0.1.0 Production on Fri Feb 14 16:37:06 2014
Copyright (c) 1982,201 3, Oracle. All rights reserved.
Connected:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> alter system set service_names = '+ ASM2, standby_acfsrep' sid = '+ asm2 ';
System altered.
SQL> show parameter service_name
NAME TYPE VALUE
-----------------------------------------------------------------------------
Service_names string + ASM2, standby_acfsrep
4. Add a connection string to the ASM instance in the tnsnames. ora file of the Primary and Standby nodes.
-- Add standby FS net service name to tnsnames. ora in Primary node qc550705
Standby_acfsrep = (DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp) (HOST = qc550707) (PORT = 1521 ))
(CONNECT_DATA = (SERVICE_NAME = standby_acfsrep )))
-- Add Primary FS net service name to tnsnames. ora in standby node qc550707
Primary_acfsrep = (DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp) (HOST = qc550705) (PORT = 1521 ))
(CONNECT_DATA = (SERVICE_NAME = primary_acfsrep )))
-- Test connection to standby ASM instance using sqlplus on primary node
Sqlplus acfsrep1/773946 @ standby_acfsrep as sysasm
-- Test connection to primary ASM instance using sqlplus on standby node
Sqlplus acfsrep1/773946 @ primary_acfsrep as sysasm
5. Initiate replication initialize on Standby node and Primary node
-- Initialize standby FS
Root @ qc550707:/> acfsutil repl init standby-p acfsrep1/773946 @ primary_acfsrep-c standby_acfsrep/acfsstd1
Registering with user specified service name-standby_acfsrep
-- Check that the replication on standby node has been started.
Root @ qc550707:/> acfsutil repl info-c-v/acfsstd1
Site: Standby
Standby status: Initializing
Initializing directories
Background Resources: 4 of 4 Online
Standby mount point:/acfsstd1
Standby Oracle Net service name: standby_acfsrep
Primary mount point:
Primary Oracle Net service name: primary_acfsrep
Primary Oracle Net alias: repladm/***** @ primary_acfsrep
Replicated tags:
Log compression: Off
Debug log level: 2
-- Then initiate the ACFS replication operation on the Primary node
/Sbin/acfsutil repl init primary-s acfsrep1/773946 @ standby_acfsrep-m/acfsstd1-c primary_acfsrep/acfs3
Root @ qc550705:/>/sbin/acfsutil repl init primary-s acfsrep1/773946 @ standby_acfsrep-m/acfsstd1-c primary_acfsrep/acfs3
Validating the remote connection
Remote connection has been established
Registering with user specified service name-primary_acfsrep
The standby replication site is initialized. ACFS replication will be begin.
6. Verify that replication is complete.
-- Primary node
Root @ qc550705:/acfs3/. ACFS/repl/logs> acfsutil repl info-c-v/acfs3
Site: Primary
Lag Time: 00:00:00
Primary status: Online
Background Resources: 3 of 3 Online
Primary mount point:/acfs3
Primary Oracle Net service name: primary_acfsrep
Standby mount point:/acfsstd1
Standby Oracle Net service name: standby_acfsrep
Standby Oracle Net alias: acfsrep1/***** @ standby_acfsrep
Replicated tags:
Log compression: Off
Debug log level: 2
-- Standby node
Root @ qc550707:/> acfsutil repl info-c-v/acfsstd1
Site: Standby
Standby status: Online
Last sync time with primary: Tue Mar 25 11:46:09 2014
Background Resources: 4 of 4 Online
Standby mount point:/acfsstd1
Standby Oracle Net service name: standby_acfsrep
Primary mount point:/acfs3
Primary Oracle Net service name: primary_acfsrep
Primary Oracle Net alias: acfsrep1/***** @ primary_acfsrep
Replicated tags:
Log compression: Off
Debug log level: 2
Precautions during implementation:
(1) After initiating the initial replication operation on the standby node, the initial replication operation should be initiated immediately on the primary node. Otherwise, the FS on the standby node will remain in the initializing state, the following figure shows that the truck config information is generated by the primary node:
Transportstdbyacfsvol_std1-48.log: 10:40:35. 433: [transprt] [/acfsstd1] Waiting for truck config info... sleeping
(2) Half of the free space in Primary FS must be used to store the Primary log aT/acfs3 /. in the ACFS/repl directory, if the available space of Primary FS is less than 2 GB, the replication will stop, the following error is reported in the/oracle/app/grid/product/12.1.0/grid_1/log/qc550705/acfs/replication/monitorprimacfsvol3-48.log log: [monitor] [/acfs3] usrmCheckFreeSpace: primary replication file system has 2 GB or less space available per active node. automatically terminating replication. flags: 0xE3
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian