top of page

Oracle FPP : Creating Gold Image Step by Step Guide

Creating Gold Images

ORACLE_HOME patching and gold image creation


Database home patching

As an example, we started with two db homes.

This is what the /etc/oratab looks like :


db19home1:/u01/app/oracle/product/19.0.0.0/dbhome_1:N

db19home2:/u01/app/oracle/product/19.0.0.0/dbhome_2:N


Both homes have the base release of 19c installed 19.3, with the latest OPatch installed.

On the first home(db19home1), we applied following patches:


32218454 aka 19.10

32545013 aka 19.11

32904851 aka 19.12

33192793 aka 19.13

and at last patch 33515361 aka 19.14


On the second home (db19home2) since RU’s are cumulative, we only applied 19.14

Checkout the blog post of Mike Dietrich if you want to do this in one go.

You can find the post-patch output of both homes here :


. oraenv

ORACLE_SID = [oracle] ? db19home1

The Oracle base has been set to /u01/app/oracle

[oracle@fppt01 19.0.0.0]$ export PATH=$ORACLE_HOME/OPatch:$PATH

[oracle@fppt01 19.0.0.0]$ opatch lspatches

33515361;Database Release Update : 19.14.0.0.220118 (33515361)

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

OPatch succeeded.


. oraenv

ORACLE_SID = [db19home1] ? db19home2

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@fppt01 19.0.0.0]$ export PATH=$ORACLE_HOME/OPatch:$PATH

[oracle@fppt01 19.0.0.0]$ opatch lspatches

33515361;Database Release Update : 19.14.0.0.220118 (33515361)

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)


As you can see, patchwise, the contents of both ORACLE_HOMEs are identical. Is this also the case with the size taken?


du -sh *

17G dbhome_1

9.0G dbhome_2


Quite significant, isn’t it?


We see that the homes are almost double in size. Note that this is just for the last 4 RU’s; imagine the

size of the home after applying every patch since 19.3!


The difference comes mainly from the size of the hidden directory (.patch_storage) in the

ORACLE_HOME, which contains the backup of overwritten files by patches in the ORACLE_HOME.


How to make a gold image from existing an ORACLE_HOME


The database homes we prepared earlier are ready; we can now use them to create zipped gold images.

The process shown here is external to Fleet Patching & Provisioning; we will cover the different options for creating gold images in FPP in a future installment of this series.


For db homes we use the runInstaller for GI Homes gridSetup


. oraenv

ORACLE_SID = [oracle] ? db19home1

The Oracle base has been set to /u01/app/oracle

cd $ORACLE_HOME

$ $ORACLE_HOME/runInstaller -createGoldImage -destinationLocation /u01/gold -silent

Launching Oracle Database Setup Wizard...

Successfully Setup Software.


Gold Image location: /u01/gold/db_home_2022-04-14_12-39-02PM.zip and for the second home


. oraenv

ORACLE_SID = [oracle] ? db19home2

The Oracle base has been set to /u01/app/oracle

$ORACLE_HOME/runInstaller -createGoldImage -destinationLocation /u01/gold -silent

Launching Oracle Database Setup Wizard...

Successfully Setup Software.


Gold Image location: /u01/gold/db_home_2022-04-14_12-31-25PM.zip , Unsurprisingly also zipped, the gold images are almost double in size.


cd /u01/gold/

du -sh *

3.8G db_home_2022-04-14_12-31-25PM.zip

6.7G db_home_2022-04-14_12-39-02PM.zip


Grid Infrastructure home gold image creation


To create a gold image of the Grid Infrastructure (GI) we need to proceed as follows :


  1. Download the base release for 19c GI, which is version 19.3

  2. Download the Release Update (RU) and other patches

  3. Download the opatch version that is required for the RU, the version needed can be found in the RU

  4. readme.

  5. Unzip the base release to the future ORACLE_HOME location of your Grid Infrastructure

  6. Unzip the opatch version also in this ORACLE_HOME

  7. Unzip the RU, and one-offs in my case that were unzipped in following locations :

/orastage/GI_1915/1915/33803476

/orastage/GI_1915/oneoff/33988339


Using both patches above we will now create a patched Grid Infrastructure home. Note that we need to specify the groups, inventory and the ORACLE_BASE location and more importantly, specify that this is a software-only installation (CRS_SWONLY) :


./gridSetup.sh -applyRU /orastage/GI_1915/1915/33803476 -applyOneOffs

/orastage/GI_1915/oneoff/33988339 -

silent oracle.install.option=CRS_SWONLY oracle.install.asm.OSDBA=asmdba

oracle.install.asm.OSOPER=asmadmin oracle.install.asm.OSASM=asmadmin

INVENTORY_LOCATION=/u01/app/oraInventory/ ORACLE_BASE=/u01/app/grid

Preparing the home to patch...

Applying the patch /orastage/GI_1915/1915/33803476...

Successfully applied the patch.

Applying the patch /orastage/GI_1915/oneoff/33988339...

Successfully applied the patch.

The log can be found at: /u01/app/oraInventory/logs/GridSetupActions2022-07-08_08-

56-22AM/installerPatchActions_2022-07-08_08-56-22AM.log

Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-41812] OSOPER and OSASM are the same OS group.

 CAUSE: The chosen values for OSOPER group and the chosen value for OSASM group

are the same.

 ACTION: Select an OS group that is unique for ASM administrators. The OSASM group

should not be the same as the OS groups that grant privileges for Oracle ASM access,

or for database administration.

The response file for this session can be found at:

/u01/app/19.15.0.0_one/grid/install/response/grid_2022-07-08_08-56-22AM.rsp

You can find the log of this install session at:

/u01/app/oraInventory/logs/GridSetupActions2022-07-08_08-56-

22AM/gridSetupActions2022-07-08_08-56-22AM.log

As a root user, execute the following script(s):

1. /u01/app/19.15.0.0_one/grid/root.sh

Execute /u01/app/19.15.0.0_one/grid/root.sh on the following nodes:

[fppc041]

Successfully Setup Software.


Execute the root.sh script as indicated above.

We can now check if the patches are applied to the Grid Infrastructure binaries.


opatch lspatches

33988339;PERFORMANCE ISSUE AFTER SINGLE FLASH DISK WENT INTO CONFINEMENT

33911149;TOMCAT RELEASE UPDATE 19.0.0.0.0 ( )

33815607;ACFS RELEASE UPDATE 19.15.0.0.0 (33815607)

33815596;OCW RELEASE UPDATE 19.15.0.0.0 (33815596)

33806152;Database Release Update : 19.15.0.0.220419 (33806152)

33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)


If all required patches are installed we can proceed with the creation of the gold image


$ORACLE_HOME/gridSetup.sh -createGoldImage -destinationlocation /orastage -silent

Launching Oracle Grid Infrastructure Setup Wizard...

Successfully Setup Software.

Gold Image location: /orastage/grid_home_2022-07-08_09-36-41AM.zip

Congratulations you just created a Database and Grid gold image!


Conclusion :

Always start from the base release and then apply the RU (and other patches) of your choice; it will save time deploying and lots of space in your fleet.

3 views

Recent Posts

See All

Comments


AiTech

©2023 by AiTech

bottom of page