Patching and Switching Oracle Grid Infrastructure Homes

Use the switchGridHome command to switch from the current Oracle Grid Infrastructure home to the patched Oracle Grid Infrastructure home.

Note:

Oracle recommends that you use Oracle Fleet Patching and Provisioning (Oracle FPP) Local Mode to patch Oracle Grid Infrastructure. For more information, see Patching Oracle Grid Infrastructure Using Oracle FPP Local Mode.
You can use the switchGridHome command to switch between different Release Updates (RUs) of the same release, for example, from Oracle Grid Infrastructure 23.6 to 23.7. You can also use the switchGridHome command to apply one-off patches.
  1. As the grid user, download and extract the Oracle Grid Infrastructure image files into a new Grid home directory.
    $ mkdir -p /u01/app/23.7.0/grid
    $ chown grid:oinstall /u01/app/23.7.0/grid 
    $ cd /u01/app/23.7.0/grid 
    $ unzip -q download_location/grid.zip

    Note:

    The new Oracle Grid Infrastructure home path must differ from the current Oracle Grid Infrastructure home path.
  2. Register the new Oracle Grid Infrastructure home in the central inventory.
    ./gridSetup.sh -setupHomeAs source_Grid_home -clusterNodes comma_separated_list_of_nodes
  3. Download the Release Update (RU) version that you want to apply from My Oracle Support.
    For more information, see Downloading Release Update Patches
  4. Download and install the latest OPatch version.
    For more information, see My Oracle Support Article KB88313.
  5. Switch to the patched Oracle Grid Infrastructure home using one of the following methods:
    • Start the Oracle Grid Infrastructure installer in silent mode, with the -switchGridHome flag, from the patched home.
      $ /u01/app/23.7.0/grid/gridSetup.sh -silent -switchGridHome [-zeroDowntimeGIPatching [-skipDriverUpdate]]
    • Start the Oracle Grid Infrastructure installer in interactive mode from the patched home.
      $ /u01/app/23.7.0/grid/gridSetup.sh

      Then perform the following steps:

      1. Select the Patch Oracle Grid Infrastructure option in the Select Configuration Option window.
      2. Select the Use Zero Downtime GI patching option to switch to the patched Oracle Grid Infrastructure home.
      3. Select the Do not update ACFS drivers option if the patch that you are installing contains operating system driver updates and you want to skip them.
      4. Enter the required values for your environment when prompted by the installation screens.
    After switching, all Grid Infrastructure services run from the new Grid home.
  6. If the patching fails, then rollback the patch:
    $ /u01/app/23.7.0/grid/gridSetup.sh –switchGridHome -rollback –silent –oldHome Old_GI_Home
  7. If you have successfully switched to the new Grid home on all nodes and want to switch back to the old Grid home, then perform the following steps:
    1. As the root user, unlock the old Grid home on all the cluster nodes.
      # Old_GI_Home/crs/install/rootcrs.sh -unlock -crshome Old_GI_Home
    2. As the grid user, run switchGridHome from the old Grid home.
      $ Old_GI_Home/gridSetup.sh -silent -switchGridHome [-zeroDowntimeGIPatching [-skipDriverUpdate]]