One of the first steps after setting up an Oracle cluster is patching the Grid Infrastructure to the most current patchlevel. Usually this has to be done on all cluster nodes separately and requires some time and effort. But what about patching the software before setting up the cluster?
Updated and revised version of the post (31-AUG-2017, 15-JAN-2018)
I’ll show how this works with Oracle Grid Infrastructure 12.2:
Step 1: Prepare the GRID_HOME directory
mkdir -p /u00/app/grid/product/18.104.22.168
Step 2: Unzip the image with the base release of the Grid Infrastructure Software
(this is the new installation method with Oracle 12c Release 2)
cd /u00/app/grid/product/22.214.171.124 unzip <SW-LOCATION>/software/oracle-software/RDBMS/12.2/126.96.36.199.0-linux-x86-64/linuxx64_12201_grid_home.zip
Step 3: Unzip the patch (as the owner of the GI software)
(in this case, I’ll install the Release Update 20170718)
cd /u00/app/oracle/stage unzip <SW-LOCATION>/software/oracle-software/patches/psu/latest/188.8.131.52/p26133434_122010_Linux-x86-64-GI.zip
Step 4: Apply the patches
Note: Internally, the gridsetup.sh script uses OPatch. In my case, it worked fine with the version of OPatch which was delivered with the software. However, I got feedback from some readers that newer patches require a newer version of OPatch.
cd /u00/app/grid/product/184.108.40.206 ./gridSetup.sh -silent -applyOneOffs /u00/app/oracle/stage/26133434/25586399/ ./gridSetup.sh -silent -applyOneOffs /u00/app/oracle/stage/26133434/26002778/ ./gridSetup.sh -silent -applyOneOffs /u00/app/oracle/stage/26133434/26123830/
Unfortunately, the installer wants to start the setup after installing a patch
grid@node1:/u00/app/grid/product/220.127.116.11/ [grid12201] ./gridSetup.sh -silent -applyOneOffs /u00/app/oracle/stage/26133434/25586399/ -noconfig Preparing the home to patch... Applying the patch /u00/app/oracle/stage/26133434/25586399/... Successfully applied the patch. The log can be found at: /tmp/GridSetupActions2017-08-09_05-45-33PM/installerPatchActions_2017-08-09_05-45-33PM.log Launching Oracle Grid Infrastructure Setup Wizard... [FATAL] [INS-40426] Grid installation option has not been specified. ACTION: Specify the valid installation option.
And the “-noconfig” option does not solve this issue. However, you can ignore this message and you can continue with the other patches.
It’s a good idea to create a new “Golden Image” with all patches included for future installations before you continue with the usual setup.
According to gridSetup.sh you need approximately 22 GB of free disk space in the destination directory.
grid@node1:/u00/app/grid/product/18.104.22.168/ [grid12201] ./gridSetup.sh -createGoldImage -destinationlocation /u00/app/oracle/stage/grid_home_12201_with_RU_20170718 -silent Launching Oracle Grid Infrastructure Setup Wizard... [FATAL] [INS-32707] The specified destination location (/u00/app/oracle/stage/grid_home_12201_with_RU_20170718) does not have enough free space. ACTION: Provide a destination location path with at least (21,092) MB of free space.
OK, let’s choose another filesystem:
mkdir -p <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718 ./gridSetup.sh -createGoldImage -destinationlocation <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718 -silent grid@node1:/u00/app/grid/product/22.214.171.124/ [grid12201] ./gridSetup.sh -createGoldImage -destinationlocation <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718 -silent Launching Oracle Grid Infrastructure Setup Wizard... Successfully Setup Software. Gold Image location: <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718/grid_home_2017-08-09_06-05-53PM.zip grid@node1:/u00/app/grid/product/126.96.36.199/ [grid12201] ls -l <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718/grid_home_2017-08-09_06-05-53PM.zip -rw-r--r--. 1 500 1000 4010949776 Aug 9 18:22 <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718/grid_home_2017-08-09_06-05-53PM.zip
(OK, that’s less than 22 GB)
Step 5: run gridSetup.sh
After that you can continue with the ususal setup procedure:
./gridSetup.sh -silent -responseFile ..
Step 6: Verification
grid@node1:~/ [rdbms12201] +ASM1 grid@node1:~/ [+ASM1] $ORACLE_HOME/OPatch/opatch lspatches 26123830;DATABASE RELEASE UPDATE: 188.8.131.52.170718 (26123830) 26002778;OCW Patch Set Update : 184.108.40.206.170718 (26002778) 25586399;ACFS Patch Set Update : 220.127.116.11.170718 (25586399) OPatch succeeded.
It works …
I received a mail from my colleague Ludovico Caldara:
I wanted to “add” that the creation of the golden image skips the empty directories, so when I used the golden image for an upgrade I got an error of missing directories.
mkdir -p crs/log crs/init evm/init log/crs racg/dump srvm/log cdata/localhost
I then created them and re-run gridSetup.sh -> everything OK.
I could not verify this issue so far.
- How to Apply a Grid Infrastructure Patch Before root script (root.sh or rootupgrade.sh) is Executed? (Doc ID 1410202.1) (the note contains instructions for Oracle Database 12c Release 1, too)
Ad (Amazon Link):