Wednesday, April 1, 2015

Upgrading Grid Infrastructure Used for Single Instance from 11.2.0.4 to 12.1.0.2

The system used for upgrade is the same system featured on an earlier post (upgrading single instance with ASM from 11.2.0.3 to 11.2.0.4). This post list the main points to look out for when upgrading the grid infrastructure to 12.1.0.2. Only the grid infrastructure is upgraded as the database software is on standard edition (SE) and at the time of this post there's no SE for 12.1.0.2.
1. If the new GI installer is unable to detect the existing GI then it could be same issue mentioned in the previous post. Fix it by updating the inventory information with crs=true. Also check if $ORACLE_BASE/cfgtoollogs has write permission for grid user.
Also prior to upgrade make sure ASM SPfile is residing in ASM not on local file system (@/dbs/spfile+ASM.ora). ASM upgrade would fail with
Using configuration parameter file: /opt/app/oracle/product/12.1.0/grid2/crs/install/crsconfig_params

Upgrading ASM failed with the following message:
ORA-32002: cannot create SPFILE already being used by the instance
or
Upgrading ASM failed with the following message:
ORA-01565: error in identifying file '/opt/app/oracle/product/11.2.0/grid/dbs/spfile+ASM.ora'
ORA-27037: unable to obtain file status
if ASM SPfile is on the local file system.

2. Run the 12c GI installer and select upgrade GI and ASM option. New GI install is done as an out of place upgrade.

3. When prompted the rootupgrade.sh script.
 /opt/app/oracle/product/12.1.0/grid_1/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /opt/app/oracle/product/12.1.0/grid_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /opt/app/oracle/product/12.1.0/grid_1/crs/install/crsconfig_params

ASM Configuration upgraded successfully.

Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node rhel6m1 successfully pinned.
2015/03/12 15:30:10 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.conf'

2015/03/12 15:31:14 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.conf'

2015/03/12 15:33:01 CLSRSC-482: Running command: 'upgrade model  -s 11.2.0.4.0 -d 12.1.0.2.0 -p first'

2015/03/12 15:33:11 CLSRSC-482: Running command: 'upgrade model  -s 11.2.0.4.0 -d 12.1.0.2.0 -p last'


rhel6m1     2015/03/12 15:33:12     /opt/app/oracle/product/12.1.0/grid_1/cdata/rhel6m1/backup_20150312_153312.olr     0

rhel6m1     2015/03/12 12:41:21     /opt/app/oracle/product/11.2.0/grid_4/cdata/rhel6m1/backup_20150312_124121.olr     -

rhel6m1     2015/03/11 17:57:18     /opt/app/oracle/product/11.2.0/grid_1/cdata/rhel6m1/backup_20150311_175718.olr     -
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rhel6m1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rhel6m1'
CRS-2673: Attempting to stop 'ora.std11g2.db' on 'rhel6m1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rhel6m1' succeeded
CRS-2677: Stop of 'ora.std11g2.db' on 'rhel6m1' succeeded
CRS-2673: Attempting to stop 'ora.FLASH.dg' on 'rhel6m1'
CRS-2677: Stop of 'ora.FLASH.dg' on 'rhel6m1' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rhel6m1'
CRS-2677: Stop of 'ora.DATA.dg' on 'rhel6m1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rhel6m1'
CRS-2677: Stop of 'ora.asm' on 'rhel6m1' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'rhel6m1'
CRS-2677: Stop of 'ora.evmd' on 'rhel6m1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rhel6m1'
CRS-2677: Stop of 'ora.cssd' on 'rhel6m1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rhel6m1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2015/03/12 15:38:33 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
4. Since the database remains in 11.2.0.4 version only the compatible.asm attribute is updated to 12c version.
alter diskgroup data set attribute 'compatible.asm'='12.1.0.2.0';
alter diskgroup flash set attribute 'compatible.asm'='12.1.0.2.0';
5. This concludes the upgrade of GI in a single instance environment with ASM. The software version will have the 12c version while release version remaining on 11.2.0.4
$  crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.4.0]
$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [12.1.0.2.0]


One thing that was noticed after the upgrade is that trying to access ASM config did not return any results but an error.
$ srvctl config asm
ASM home: 
PRCA-1057 : Failed to retrieve the password file location used by ASM asm
PRCR-1097 : Resource attribute not found: PWFILE
Trying to modify the pw file location didn't work either
$ srvctl modify asm -pwfile /opt/app/oracle/product/12.1.0/grid_1/dbs/orapw+ASM
PRCR-1097 : Resource attribute not found: CARDINALITY
Only way to fix this is to stop all the resources and recreate the ASM config.
crsctl stop resource -all
srvctl remove asm -force
srvctl add asm -listener listener -spfile "+DATA/ASM/ASMPARAMETERFILE/REGISTRY.253.874087179" -pwfile /opt/app/oracle/product/12.1.0/grid_1/dbs/orapw+ASM -diskstring "/dev/sd*"

crsctl start resource -all

srvctl config asm
ASM home: 
Password file: /opt/app/oracle/product/12.1.0/grid_1/dbs/orapw+ASM
ASM listener: LISTENER
Spfile: +DATA/ASM/ASMPARAMETERFILE/REGISTRY.253.874087179
ASM diskgroup discovery string: /dev/sd*
This is a known issue on 12c. For more follow MOS notes.

Useful metalink notes
Oracle Restart: WARNING: unknown state for ASM password file location resource, Return Value: 3 [ID 1935891.1]
Alternative Way To Upgrade An ASM Standalone Configuration From Release 11.2.0.<#> to release 12.1.0.<#>. [ID 1964405.1]
Reconfiguring & Recreating The 11gR2/12cR1 Restart/OHAS/SIHA Stack Configuration (Standalone). [ID 1422517.1]
Things to Consider Before Upgrading to 12.1.0.2 to Avoid Poor Performance or Wrong Results [ID 2034610.1]

Related Posts
Upgrading Oracle Single Instance with ASM (Oracle Restart) from 12.1.0.2 to 12.2.0.1
Upgrading RAC from 12.1.0.1 to 12.1.0.2 - Grid Infrastructure
Upgrading Single Instance on ASM from 11.2.0.3 to 11.2.0.4
Upgrading RAC from 11.2.0.3 to 11.2.0.4 - Grid Infrastructure
Upgrading RAC from 11.2.0.3 to 11.2.0.4 - Database

Tuesday, March 17, 2015

Upgrading Single Instance on ASM from 11.2.0.3 to 11.2.0.4

This post list points to look out for when upgrading a 11.2.0.3 single instance DB on ASM (with role separation) to 11.2.0.4. It's not a comprehensive upgrade guide, refer oracle documentation for more information.
1. Before installing the new 11.2.0.4 GI check in the inventory.xml has crs=true against the existing GI home. In some cases crs=true is missing, usually if GI was installed with software only and later converted to HAS.
<HOME NAME="Ora11g_gridinfrahome1" LOC="/opt/app/oracle/product/11.2.0/grid_1" TYPE="O" IDX="1"/>
If there's no crs=true against the GI home the new version fails to detect the existing clusterware.
If crs=true is missing then update the inventory information by running the following command specifying the existing GI home and crs=true
./runInstaller -updateNodeList ORACLE_HOME=/opt/app/oracle/product/11.2.0/grid_1 CRS=true

<HOME NAME="Ora11g_gridinfrahome1" LOC="/opt/app/oracle/product/11.2.0/grid_1" TYPE="O" IDX="1" CRS="true"/>
Afterwards run the installer of the 11.2.0.4 and the existing GI will be detected. For more information on this issue refer 1953932.1 and 1117063.1

2. Before the upgrade the HAS shows version 11.2.0.3 for release and software version.
$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.3.0]
$  crsctl query has softwareversion
Oracle High Availability Services version on the local node is [11.2.0.3.0]
GI upgrades are out of place. i.e install in a different location to existing GI home (grid_4 in this case).
3. Run the rootupgrade.sh when prompted. This will upgrade the ASM instance.
# /opt/app/oracle/product/11.2.0/grid_4/rootupgrade.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /opt/app/oracle/product/11.2.0/grid_4

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /opt/app/oracle/product/11.2.0/grid_4/crs/install/crsconfig_params
Creating trace directory

ASM Configuration upgraded successfully.

Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node rhel6m1 successfully pinned.
Replacing Clusterware entries in upstart
Replacing Clusterware entries in upstart

rhel6m1     2015/03/12 12:41:21     /opt/app/oracle/product/11.2.0/grid_4/cdata/rhel6m1/backup_20150312_124121.olr

rhel6m1     2015/03/11 17:57:18     /opt/app/oracle/product/11.2.0/grid_1/cdata/rhel6m1/backup_20150311_175718.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
4. Afterwards the software version will reflect the new GI version but release version will remain the same.
$  crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.3.0]
$  crsctl query has softwareversion
Oracle High Availability Services version on the local node is [11.2.0.4.0]
5. ASM instance and listener will run out of the new GI home.
$ srvctl config asm
ASM home: /opt/app/oracle/product/11.2.0/grid_4
ASM listener: LISTENER
Spfile: +DATA/asm/asmparameterfile/registry.253.874087179
ASM diskgroup discovery string: /dev/sd*

$ srvctl config listener
Name: LISTENER
Home: /opt/app/oracle/product/11.2.0/grid_4
End points: TCP:1521


6. Before installing the database software check if $ORACEL_BASE/cfgtoollogs has write permission for oracle user. As this is a setup with role separation this location must have write permission for oinstall group for oracle user to create directories/files inside cfgtoollogs.
chmod 770 $ORACEL_BASE/cfgtoollogs
7. Install the database software as an out of place upgrade. After database software is installed and before running the dbua make sure the oracle binaries have the correct permission on the new oracle home suited to a role separated setup. The group ownership should be asmadmin (or corresponding asm admin group used) but after the software install it remains as oinstall.
[oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle oinstall 226889744 Mar 12 13:29 oracle
-rwxr-x---. 1 oracle oinstall         0 Aug 24  2013 oracleO
Change this with setasmgidwrap to the correct ownership
[oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle asmadmin 226889744 Mar 12 13:29 oracle
-rwxr-x---. 1 oracle oinstall         0 Aug 24  2013 oracleO
9. Once oracle binary permissions are set run the DBUA to upgrade the database. Verify post upgrade status with cluvfy and orachk
cluvfy stage -post hacfg

orachk -u -o post
10. Finally if upgrade satisfactory increase the compatible parameter on the database and ASM disk attributes to the new 11.2.0.4 version. These changes cannot be rolled backed. On database
alter system set compatible='11.2.0.4.0' scope=spfile sid='*';
On ASM instance
alter diskgroup data set attribute 'compatible.asm'='11.2.0.4';
alter diskgroup flash set attribute 'compatible.asm'='11.2.0.4';
alter diskgroup data set attribute 'compatible.rdbms'='11.2.0.4';
alter diskgroup flash set attribute 'compatible.rdbms'='11.2.0.4';
The HAS shows 11.2.0.4 as the release version.
$  crsctl query has softwareversion
Oracle High Availability Services version on the local node is [11.2.0.4.0]
$  crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.4.0]
This concludes the upgrade of single instance on ASM (with role separation) from 11.2.0.3 to 11.2.0.4.

There was incident where after the GI was upgraded the ASM instance didn't start and following error was shown
srvctl start asm
PRCR-1079 : Failed to start resource ora.asm
CRS-5017: The resource action "ora.asm start" encountered the following error:
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_+ASM'
. For details refer to "(:CLSN00107:)" in "/opt/app/oracle/product/11.2.0/grid_4/log/rhel6m1/agent/ohasd/oraagent_grid/oraagent_grid.log".
This standalone system was created from a GI home first installed as software only and also had the spfile in the local file system (GI_HOME/dbs). Not sure if these were in any way contributed to this error being thrown. Looking at an ASM spfile it could be seen a local_listener entry has been added during the upgrade.
  large_pool_size          = 12M
  instance_type            = "asm"
  remote_login_passwordfile= "EXCLUSIVE"
  local_listener           = "LISTENER_+ASM"
  asm_diskstring           = "/dev/sd*"
  asm_diskgroups           = "FLASH"
  asm_diskgroups           = "DATA"
  asm_power_limit          = 1
  diagnostic_dest          = "/opt/app/oracle"
Since the listener.ora doesn't have such an entry and more over on 11.2. the local listener entries are auto updated. Once a ASM pfile was created without the local_listener entry the ASM instance started. A new SPfile had to be created and registered with the ASM configuration information.

Useful metalink notes
Oracle Restart: GI Upgrade From 12.1.0.1 to 12.1.0.2 Fails With INS-40406 [ID 1953932.1]
Oracle Restart ASM 11gR2: INS-40406 Upgrading ASM Instance To Release 11.2.0.1.0 [ID 1117063.1]

Related Posts
Upgrading RAC from 11.2.0.3 to 11.2.0.4 - Grid Infrastructure
Upgrading RAC from 11.2.0.3 to 11.2.0.4 - Database

Sunday, March 8, 2015

Downgrade Grid Infrastructure from 11.2.0.4 to 11.1.0.7

This post shows the steps for downgrading clusterware from 11.2.0.4 to 11.1.0.7. This clusterware upgrade was a successful upgrade from 11.1.0.7 to 11.2.0.4 and only the clusterware is upgraded and the database is on 11.1.0.7. If there were nodes that failed the upgrade then follow the MOS notes for additional steps needed for such situation. There is a similar post for downgrading from 11.2.0.4 to 11.2.0.3. However this upgrade is from 11.2 to a pre-11.2 has some additional steps and pitfalls to look out for. The cluster is a two node cluster and had a separate home for ASM instance.
The upgraded system had following resource attributes changed
crsctl modify resource "ora.FLASH.dg" -attr "AUTO_START=always"
crsctl modify resource "ora.DATA.dg" -attr "AUTO_START=always"
crsctl modify resource ora.racse11g1.db -attr "ACTION_SCRIPT=/opt/app/11.2.0/grid/bin/racgwrap"
crsctl modify resource ora.racse11g1.db -attr "AUTO_START=always"

1. Verify clusterware upgrade is clean and active version is 11.2.0.4
[oracle@rac2 ~]$ crsctl query crs softwareversion
Oracle Clusterware version on node [rac2] is [11.2.0.4.0]

[oracle@rac2 ~]$ crsctl query crs releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.4.0]

[oracle@rac2 ~]$ crsctl query crs activeversion -f
Oracle Clusterware active version on the cluster is [11.2.0.4.0]. The cluster upgrade state is [NORMAL].
2. Identify the "OCR-node". As mentioned in the earlier post the OCR-node is the node where the backup of the lower version OCR was taken during the upgrade. In this setup this was done on node "rac1".
[oracle@rac1 cdata]$ cd /opt/app/11.2.0/grid/cdata/
[oracle@rac1 cdata]$ ls -l
total 3132
drwxrwxr-x 2 oracle oinstall      4096 Mar  5 09:29 cg_11g_cluster
drwxr-xr-x 2 oracle oinstall      4096 Mar  4 16:47 localhost
-rw------- 1 root   root         88875 Mar  4 17:11 ocr11.1.0.7.0
drwxr-xr-x 2 oracle oinstall      4096 Mar  4 17:11 rac1
-rw------- 1 root   oinstall 272756736 Mar  5 09:31 rac1.olr
3. MOS note 1364946.1 says to run the rootcrs.pl with downgrade option on all but the OCR-node (i.e don't run this on the OCR-node). But this results in an error
[root@rac2 oracle]# /opt/app/11.2.0/grid/crs/install/rootcrs.pl -downgrade -force
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
One or more options required but missing: -oldcrshome -version
It could be that MOS not updated to reflect the changes of 11.2.0.4. In order to run the command specify the old crs home and the old crs version in 5 number format. Since rac1 is OCR-node this command is run on the other remaining node rac2
[root@rac2 oracle]# /opt/app/11.2.0/grid/crs/install/rootcrs.pl -downgrade -force -oldcrshome /opt/crs/oracle/product/11.1.0/crs -version 11.1.0.7.0
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac2'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac2' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac2'
CRS-2673: Attempting to stop 'ora.FLASH.dg' on 'rac2'
CRS-2673: Attempting to stop 'ora.racse11g1.racse11g2.inst' on 'rac2'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac2'
CRS-2673: Attempting to stop 'ora.oc4j' on 'rac2'
CRS-2677: Stop of 'ora.cvu' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.rac2.vip' on 'rac2'
CRS-2676: Start of 'ora.cvu' on 'rac1' succeeded
CRS-2677: Stop of 'ora.rac2.vip' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.rac2.vip' on 'rac1'
CRS-2676: Start of 'ora.rac2.vip' on 'rac1' succeeded
CRS-2677: Stop of 'ora.racse11g1.racse11g2.inst' on 'rac2' succeeded
CRS-2677: Stop of 'ora.FLASH.dg' on 'rac2' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'rac1'
CRS-2676: Start of 'ora.oc4j' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac2'
CRS-2677: Stop of 'ora.ons' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac2'
CRS-2677: Stop of 'ora.net1.network' on 'rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac2' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac2'
CRS-2677: Stop of 'ora.evmd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac2'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac2'
CRS-2677: Stop of 'ora.cssd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'rac2'
CRS-2677: Stop of 'ora.crf' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac2'
CRS-2677: Stop of 'ora.gipcd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac2'
CRS-2677: Stop of 'ora.gpnpd' on 'rac2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully downgraded Oracle clusterware stack on this node
4. On the OCR-node run the same command with the addition of the lastnode option.
[root@rac1 oracle]# /opt/app/11.2.0/grid/crs/install/rootcrs.pl -downgrade -force -lastnode -oldcrshome /opt/crs/oracle/product/11.1.0/crs -version 11.1.0.7.0
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac1'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac1' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.rac2.vip' on 'rac1'
CRS-2673: Attempting to stop 'ora.oc4j' on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac1'
CRS-2673: Attempting to stop 'ora.racse11g1.db' on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.FLASH.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.racse11g1.racse11g1.inst' on 'rac1'
CRS-2677: Stop of 'ora.cvu' on 'rac1' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac1' succeeded
CRS-2677: Stop of 'ora.rac2.vip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.rac1.vip' on 'rac1'
CRS-2677: Stop of 'ora.racse11g1.db' on 'rac1' succeeded
CRS-2677: Stop of 'ora.rac1.vip' on 'rac1' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'rac1' succeeded
CRS-2677: Stop of 'ora.racse11g1.racse11g1.inst' on 'rac1' succeeded
CRS-2677: Stop of 'ora.FLASH.dg' on 'rac1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.oc4j' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac1'
CRS-2677: Stop of 'ora.ons' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac1'
CRS-2677: Stop of 'ora.net1.network' on 'rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'rac1'
CRS-2677: Stop of 'ora.crf' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully downgraded OCR to 11.1.0.7.0
Run root.sh from the old crshome on all the cluster nodes one at a time to start the Clusterware
Successful deletion of voting disk /dev/sdh1.
Now formatting voting disk: /dev/sdh1.
Successful addition of voting disk /dev/sdh1.
Successful deletion of voting disk /dev/sdf1.
Now formatting voting disk: /dev/sdf1.
Successful addition of voting disk /dev/sdf1.
Successful deletion of voting disk /dev/sdg1.
Now formatting voting disk: /dev/sdg1.
Successful addition of voting disk /dev/sdg1.
5. Do not run the root.sh just yet. Edit the oratab to reflect the Oracle home the ASM instance would run out of. Since before the upgrade ASM ran out of separate home (not the same oracle home DB ran out of) this is added to the oratab on both nodes.
On rac1
+ASM1:/opt/app/oracle/product/11.1.0/asm_1:N
On rac2
+ASM2:/opt/app/oracle/product/11.1.0/asm_1:N
6. Clear the gpnp profile directories
rm -rf /opt/app/11.2.0/grid/gpnp/*
7. Make sure any changes subsequently made to the cluster are reflected on the root* script. In this cluster an ocr mirror was added after it was created (following the execution of root.sh). As such this ocr mirror location is missing on the root script but present in the ocr.loc file.
cat /etc/oracle/ocr.loc
ocrconfig_loc=/dev/sdb1
ocrmirrorconfig_loc=/dev/sde1 <-- added later
Runing the root.sh without correcting this resulted in the following error
[root@rac1 crs]# /opt/crs/oracle/product/11.1.0/crs/root.sh
Checking to see if Oracle CRS stack is already configured

Current Oracle Cluster Registry mirror location '/dev/sde1' in '/etc/oracle/ocr.loc' and '' does not match
Update either '/etc/oracle/ocr.loc' to use '' or variable CRS_OCR_LOCATIONS in rootconfig.sh with '/dev/sde1' then rerun rootconfig.sh
To fix this edit the (11.1) $CRS_HOME/install/rootconfig and add the ocr mirror location
CRS_OCR_LOCATIONS=/dev/sdb1,/dev/sde1
After the change the root.sh runs without any issue.
[root@rac1 crs]# /opt/crs/oracle/product/11.1.0/crs/root.sh
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up Network socket directories
Oracle Cluster Registry configuration upgraded successfully
clscfg: EXISTING configuration version 4 detected.
clscfg: version 4 is 11 Release 1.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :   
node 1: rac1 rac1-pvt rac1
node 2: rac2 rac2-pvt rac2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
        rac1
Cluster Synchronization Services is inactive on these nodes.
        rac2
Local node checking complete. Run root.sh on remaining nodes to start CRS daemons.
At the end of this execution the ASM and database instance will be up and running on this node. Run the root.sh on the second node
[root@rac2 crs]# /opt/crs/oracle/product/11.1.0/crs/root.sh
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up Network socket directories
Oracle Cluster Registry configuration upgraded successfully
clscfg: EXISTING configuration version 4 detected.
clscfg: version 4 is 11 Release 1.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :   
node 1: rac1 rac1-pvt rac1
node 2: rac2 rac2-pvt rac2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
        rac1
        rac2
Cluster Synchronization Services is active on all the nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
At the end of this script execution it was found that ASM instance was not up and running. Trying to manually start resulted in following error
[oracle@rac2 bin]$ srvctl start asm -n rac2
PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL*Plus: Release 11.1.0.7.0 - Production on Thu Mar 5 12:16:33 2015
...
rac2:ora.rac2.ASM2.asm:SQL> ORA-00304: requested INSTANCE_NUMBER is busy
...
CRS-0215: Could not start resource 'ora.rac2.ASM2.asm'.]]
[PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL*Plus: Release 11.1.0.7.0 - Production on Thu Mar 5 12:16:33 2015
...
rac2:ora.rac2.ASM2.asm:SQL> ORA-00304: requested INSTANCE_NUMBER is busy
rac2:ora.rac2.ASM2.asm:SQL> Disconnected
rac2:ora.rac2.ASM2.asm:
CRS-0215: Could not start resource 'ora.rac2.ASM2.asm'.]]
This is because during the upgrade the ASM spfile changed and remained the same even after the downgrade as well. Following is a pfile created from the spfile before the upgrade (11.1.0.7)
+ASM1.__oracle_base='/opt/app/oracle'#ORACLE_BASE set from environment
+ASM2.__oracle_base='/opt/app/oracle'#ORACLE_BASE set from environment
+ASM1.asm_diskgroups='DATA','FLASH'
+ASM2.asm_diskgroups='DATA','FLASH'
*.cluster_database=true
*.diagnostic_dest='/opt/app/oracle'
+ASM2.instance_number=2
+ASM1.instance_number=1
*.instance_type='asm'
*.large_pool_size=12M
*.asm_diskstring='ORCL:*'
Below is the pfile created after the upgrade (and same content was there on the pfile created after the downgrade as well)
+ASM1.__oracle_base='/opt/app/oracle'#ORACLE_BASE set from environment
+ASM2.__oracle_base='/opt/app/oracle'#ORACLE_BASE set from environment
*.asm_diskgroups='DATA','FLASH'
*.asm_diskstring='ORCL:*'
*.asm_power_limit=1
*.diagnostic_dest='/opt/app/oracle'
*.instance_type='asm'
*.large_pool_size=16777216
*.memory_target=1627389952
*.remote_login_passwordfile='EXCLUSIVE'
Comparing the pfile entries it could be seen that after the upgrade of ASM the instance number entries and cluster database entries are lost. As a result after the downgrade only one instance could be started. To fix this shutdown the database and instances on the node ASM is running. Start the ASM instance in nomount mode with the pfile created before the upgrade to 11.1.0.7 and recreate the spfile.
SQL> create spfile='/dev/sdb3' from pfile='/home/oracle/asmpfile.ora';


8. After this the ASM instances and DB instances could be started on all nodes. However the listener will fail to start on all the nodes (rac1 and rac2) and trying to manually start it would result in following error
[oracle@rac1 admin]$ srvctl start listener -n rac1
rac1:ora.rac1.LISTENER_RAC1.lsnr:TNSLSNR for Linux: Version 11.1.0.7.0 - Production
rac1:ora.rac1.LISTENER_RAC1.lsnr:System parameter file is /opt/app/oracle/product/11.1.0/asm_1/network/admin/listener.ora
rac1:ora.rac1.LISTENER_RAC1.lsnr:Log messages written to /opt/app/oracle/diag/tnslsnr/rac1/listener_rac1/alert/log.xml
rac1:ora.rac1.LISTENER_RAC1.lsnr:TNS-01151: Missing listener name, LISTENER_RAC1, in LISTENER.ORA
rac1:ora.rac1.LISTENER_RAC1.lsnr:Listener failed to start. See the error message(s) above...
rac1:ora.rac1.LISTENER_RAC1.lsnr:Connecting to (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.85)(PORT=1521)))
rac1:ora.rac1.LISTENER_RAC1.lsnr:TNS-12535: TNS:operation timed out
rac1:ora.rac1.LISTENER_RAC1.lsnr: TNS-12560: TNS:protocol adapter error
rac1:ora.rac1.LISTENER_RAC1.lsnr:  TNS-00505: Operation timed out
rac1:ora.rac1.LISTENER_RAC1.lsnr:   Linux Error: 110: Connection timed out
CRS-1006: No more members to consider
CRS-0215: Could not start resource 'ora.rac1.LISTENER_RAC1.lsnr'
Reason for this is that changes made to listener.ora during the upgrade are not rolled back or missing during downgrade. When upgraded to 11.2.0.4 the listener resource is named "ora.LISTENER.lsnr". However on 11.1 the listeners have node specific naming "ora.rac2.LISTENER_RAC1.lsnr" and "ora.rac2.LISTENER_RAC2.lsnr". During the downgrade the listener.ora file created is missing this node specific listener. Add this node specific listener entry to the listener.ora file in the ASM_HOME (only rac1 entry is shown below. Similar entry with correct vip and ip names must be added to rac2 as well).
LISTENER_RAC1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
      (ADDRESS = (PROTOCOL = TCPS)(HOST = rac1-vip)(PORT = 1523)(IP = FIRST))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.85)(PORT = 1521)(IP = FIRST))
    )
  )
After this it is possible to start the listener and all resources will be online
[oracle@rac1 admin]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2
ora....11g1.db application    ONLINE    ONLINE    rac2
ora....g1.inst application    ONLINE    ONLINE    rac1
ora....g2.inst application    ONLINE    ONLINE    rac2
9. No need to change the action script entry as this would have already been changed to refering 11.1 crs home
crs_stat -p
NAME=ora.racse11g1.db
TYPE=application
ACTION_SCRIPT=/opt/crs/oracle/product/11.1.0/crs/bin/racgwrap
10. Update the inventory information and crs=true for 11.1 crs home.
$CRS_HOME/out/bin/runInstaller -updateNodeList ORACLE_HOME=/opt/crs/oracle/product/11.1.0/crs CRS=true
$CRS_HOME/out/bin/runInstaller -updateNodeList ORACLE_HOME=/opt/app/11.2.0/grid CRS=false
After these commands are run check the inventory.xml to see 11.1 has crs=true
<HOME NAME="clusterware_11g" LOC="/opt/crs/oracle/product/11.1.0/crs" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="rac1"/>
      <NODE NAME="rac2"/>
   </NODE_LIST>
</HOME>

<HOME NAME="Ora11g_gridinfrahome1" LOC="/opt/app/11.2.0/grid" TYPE="O" IDX="4"> <-- 11.2 home
   <NODE_LIST>
      <NODE NAME="rac1"/>
      <NODE NAME="rac2"/>
   </NODE_LIST>
</HOME>
11. Check the crs version information
[oracle@rac1 crs]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.1.0.7.0]

[oracle@rac1 crs]$ crsctl query crs softwareversion
Oracle Clusterware version on node [rac1] is [11.1.0.7.0]

[oracle@rac1 admin]$ crsctl query crs releaseversion
11.1.0.7.0
12. Check ocr integrity and manually backup the ocr
[root@rac1 admin]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     296940
         Used space (kbytes)      :       3916
         Available space (kbytes) :     293024
         ID                       : 1749862721
         Device/File Name         :  /dev/sdb1
                                    Device/File integrity check succeeded
         Device/File Name         :  /dev/sde1
                                    Device/File integrity check succeeded

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@rac1 admin]# ocrconfig -manualbackup
13. Backup the vote disks using dd
crsctl query css votedisk
 0.     0    /dev/sdh1
 1.     0    /dev/sdf1
 2.     0    /dev/sdg1
Located 3 voting disk(s).

dd if=/dev/sdh1 of=/home/oracle/votediskbackup bs=8192
34134+1 records in
34134+1 records out
279627264 bytes (280 MB) copied, 0.69875 seconds, 400 MB/s
14. As the last step detach the 11.2.0.4 GI Home from the inventory and remove it manually
./runInstaller -detachHome ORACLE_HOME=/opt/app/11.2.0/grid -silent
rm -rf /opt/app/11.2.0/grid # run on all nodes
Related post
Downgrade Grid Infrastructure from 12.1.0.2 to 11.2.0.4
Downgrade Grid Infrastructure from 11.2.0.4 to 11.2.0.3

Useful metalink notes
How to Downgrade 11.2.0.2 Grid Infrastructure Cluster to 11.2.0.1 [ 1364230.1]
How to Downgrade 11.2.0.3 Grid Infrastructure Cluster to Lower 11.2 GI or Pre-11.2 CRS [ 1364946.1]
How to Update Inventory to Set/Unset "CRS=true" Flag for Oracle Clusterware Home [ 1053393.1]
Oracle Clusterware (GI or CRS) Related Abbreviations, Acronyms and Procedures [ 1374275.1]