Part 1: https://itoug.it/blog/2024/09/exadata-add-oracle-home-using-oedacli-part-1
Environment:
- Exadata X9M-2
- Virtual environment with KVM
- Oracle Home in use: 19.18.0.0
- Oracle Home to install: 19.22.0.0
- Cluster version: 19.22.0.0
- OS Oracle Linux 7.9
- VM Name: ex2-itouglab01
Check command list:
Before to setup the new oracle it can be useful to test all commands that will be execute in a batch way.
STEP 1: Load XML file
# ./oedacli
oedacli> LOAD FILE NAME=/EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab.xml
SUCCESS - file loaded OK
Customer : Itoug - On Line Games Stage and Prod
STEP 2: Reset actions
This can be useful in case of previous pending activities.
oedacli> RESET ACTIONS
STEP 3: Add databasehome command
Before to add the new home you need to know:
- Database owner = oracle
- Exact new home database version = 19.22.0.0.240116 (you can find it in the readme of image files)
- Oracle base dir = /u01/app/oracle
- Volume size = 50g
- Database Home Location = /u01/app/oracle/product/19.22.0.0/dbhome_1
- Database Home Name = e.g. itouglab_home_1922
- Cluster Name = e.g. ex2itouglab (to extract on RAC execute # olsnodes -c)
oedacli> ADD DATABASEHOME OWNER=oracle DBVERSION='19.22.0.0.240116' BASEDIR='/u01/app/oracle' VOLUMESIZE=50g DBHOMELOC='/u01/app/oracle/product/19.22.0.0/dbhome_1' DBHOMENAME='itouglab_home_1922' where CLUSTERNAME='ex2itouglab'
STEP 4: Save the current action to in-memory copy of the Engineered System XML configuration
oedacli> SAVE ACTION
STEP 5: Merge the current actions into the Engineered System model
oedacli> MERGE ACTIONS
processMerge
processMergeActions
Merging Action : ADD DATABASEHOME OWNER=oracle DBVERSION='19.22.0.0.240116' BASEDIR='/u01/app/oracle' VOLUMESIZE=50g DBHOMELOC='/u01/app/oracle/product/19.22.0.0/dbhome_1' DBHOMENAME='itouglab_home_1922' where CLUSTERNAME='ex2itouglab'
Merging ADD DATABASEHOME
Action Validated and Merged OK
STEP 6: List XML actions
oedacli> LIST XMLACTIONS
Action ID=1 merged=true deployed=false
ID=2,CMDID=1,CMD="ADD DATABASEHOME OWNER=oracle DBVERSION='19.22.0.0.240116' BASEDIR='/u01/app/oracle' VOLUMESIZE=50g DBHOMELOC='/u01/app/oracle/product/19.22.0.0/dbhome_1' DBHOMENAME='itouglab_home_1922' where CLUSTERNAME='ex2itouglab'"
Deploy new oracle home:
It always advisable to execute the oracle home add in a batch way because it often requires about 1 hour to be completed.
Create a command file with all the commands previously defined:
# cat AddDBHome.cmd
LOAD FILE NAME=/EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab.xml
RESET ACTIONS
LIST DATABASEHOMES
ADD DATABASEHOME OWNER=oracle DBVERSION='19.22.0.0.240116' BASEDIR='/u01/app/oracle' VOLUMESIZE=50G DBHOMELOC='/u01/app/oracle/product/19.22.0.0/dbhome_1' DBHOMENAME='itouglab_home_1922' where CLUSTERNAME='ex2itouglab'
SAVE ACTION
MERGE ACTIONS
LIST XMLACTIONS
DEPLOY ACTIONS
Executing oedacli –help you can see all the available options
# ./oedacli --help
Usage:
oedacli [ -h ] [ -l ] [ -j ] [ -q ] [ -f commandfile ] [ -c configfile [ -e immediatecommand ]]
-h, --help
Display help.
-l, --enhanced-logging
Enable verbose logging
-j, --json-output
LIST command output will be in json format.
-q, --quiet-mode
For LIST commands, return only data, no on-screen status.
-f, --command-file commandfile
A file containing commands to be executed.
-c, --config-file configfile
The name of the OEDA xml file to process
If not specified, load the file using the LOAD FILE command in the cli.
-e, --immediate-command immediatecommand
An immediate command to run, typically a LIST command.
If specified, must be the last parameter in the list
--sshkeys
Enable SSH Key login to remote nodes
--enablesu
Run command with SU using root user for grid/oracle user
--enablersa
Use RSA keys for SSH. If not specified, ECDSA keys are used by default.
--exitonerror
Exit OEDACLI session on error
-v, --version
reports the version of OEDACLI
Now execute in nohup mode the oedacli using input parameters to use the ssh connection and the command file previously defined:
# nohup oedacli -f /EXAVMIMAGES/onecommand/linux-x64.Conf/AddDBHome.ex2itouglab.cmd --exitonerror --sshkeys --enablersa > /EXAVMIMAGES/onecommand/linux-x64.Conf/AddDBHome.ex2itouglab.log &
...
SUCCESS - file loaded OK
Customer : Itoug - On Line Games Stage and Prod
version : "CloneInstall"
cluster :
id : "Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_id"
databaseHomeName : "itouglab_home_1918"
databaseSwOwner : "0594e31d-1e80-2c36-b847-89a63c721963"
databaseVersion : "19.18.0.0.230117"
databaseHomeLoc : "/u01/app/oracle/product/19.18.0.0/dbhome_1"
inventoryLocation : "/u01/app/oraInventory"
installType : "rac_database"
language : "all_langs"
machines :
machine :
domainGroup :
machine :
id : "ex2_713bcc3f-b4fa-4011-8108-98b70836a6aa_compute_Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_vm01_id"
domainGroup :
machine :
id : "ex2_3dec114a-9eeb-42f8-a038-b2224d00ef8d_compute_Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_vm01_id"
basedir : "/u01/app/oracle"
id : "DbHome_1149ee6b-0b1a-41d8-eb04-eddfa957a44f_id"
version : "CloneInstall"
clusterName : "ex2itouglab"
clusterOwner : "710c8ec9-4b4d-2e51-4845-ee47a2bec251"
clusterVersion : "19.22.0.0.240116"
clusterHome : "/u01/app/19.0.0.0/grid"
inventoryLocation : "/u01/app/oraInventory"
asmScopedSecurity : "true"
clusterVips :
clusterVip :
vipName : "ex2-itouglab01-vip"
domainName : "farm.Itoug-italia.local"
vipIpAddress : "10.20.163.133"
machines :
machine :
domainGroup :
machine :
id : "ex2_713bcc3f-b4fa-4011-8108-98b70836a6aa_compute_Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_vm01_id"
id : "ex2_713bcc3f-b4fa-4011-8108-98b70836a6aa_compute_Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_vm01_id_vip"
vipName : "ex2-itouglab02-vip"
domainName : "farm.Itoug-italia.local"
vipIpAddress : "10.20.163.134"
machines :
machine :
domainGroup :
machine :
id : "ex2_3dec114a-9eeb-42f8-a038-b2224d00ef8d_compute_Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_vm01_id"
id : "ex2_3dec114a-9eeb-42f8-a038-b2224d00ef8d_compute_Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_vm01_id_vip"
customerName : "Itoug"
application : "Bwin Stage"
scanIps :
scanIp :
clusterScans :
clusterScan :
id : "Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_id_scan_client"
diskGroups :
diskGroup :
id : "508747b9-ebeb-6234-c6bb-5cf72dd67662"
id : "ab2fc056-1a2f-49cc-e316-ecb4616707cc"
id : "53e74c20-925b-01de-cb5f-ec619323341c"
basedir : "/u01/app/grid"
language : "all_langs"
patches :
patch :
id : "Cluster-c880a8d92-2001-e9fc-6cb7-acfbc2ad79bd_id"
processMerge
processMergeActions
Merging Action : ADD DATABASEHOME OWNER=oracle DBVERSION='19.22.0.0.240116' BASEDIR='/u01/app/oracle' VOLUMESIZE=50G DBHOMELOC='/u01/app/oracle/product/19.2
2.0.0/dbhome_1' DBHOMENAME='itouglab_home_1922' where CLUSTERNAME='ex2itouglab'
Merging ADD DATABASEHOME
Action Validated and Merged OK
Action ID=1 merged=true deployed=false
ID=1,CMDID=1,CMD="ADD DATABASEHOME OWNER=oracle DBVERSION='19.22.0.0.240116' BASEDIR='/u01/app/oracle' VOLUMESIZE=50G DBHOMELOC='/u01/app/oracle/product/1
9.22.0.0/dbhome_1' DBHOMENAME='itouglab_home_1922' where CLUSTERNAME='ex2itouglab'"
File : /EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab_ADD_DBHOME_DEPLOY_20240620.xml saved OK
Deploying Action ID : 1 ADD DATABASEHOME OWNER=oracle DBVERSION='19.22.0.0.240116' BASEDIR='/u01/app/oracle' VOLUMESIZE=50G DBHOMELOC='/u01/app/oracle/produ
ct/19.22.0.0/dbhome_1' DBHOMENAME='itouglab_home_1922' where CLUSTERNAME='ex2itouglab'
Deploying ADD DATABASEHOME
Adding additional Database Home /u01/app/oracle/product/19.22.0.0/dbhome_1 on nodes [ex2-itouglab01-dbadm.farm.Itoug-italia.local, ex2-itouglab02-dbadm.farm.eur
obet-italia.local]
Validating Oracle Home..
Checking to see if /u01/app/oracle/product/19.22.0.0/dbhome_1 is already mounted on [ex2-itouglab01-dbadm.farm.Itoug-italia.local, ex2-itouglab02-dbadm.farm.eur
obet-italia.local]
Validating kvmutils rpm..
Validating required files...
SUCCESS: Target Database Home /u01/app/oracle/product/19.22.0.0/dbhome_1 is not already mounted.
Validations completed successfully.
Creating new disk image file on KVM Hosts [ex2dbadm01.farm.Itoug-italia.local, ex2dbadm02.farm.Itoug-italia.local]
Required Base Image File /EXAVMIMAGES/db-klone-Linux-x86-64-19000240116.50.img already exists on all KVM hosts..
Attaching disk image to Virtual Machine ex2-itouglab01-dbadm.farm.Itoug-italia.local
\\\\\
/////
Attaching disk image to Virtual Machine ex2-itouglab02-dbadm.farm.Itoug-italia.local
\\\\\
Complet
d setting up additional Oracle Home on Cluster ex2itouglab
Configuring database home software, database home itouglab_home_1922
Relinking database software..
Completed configuration of database home software [/u01/app/oracle/product/19.22.0.0/dbhome_1] on Cluster ex2itouglab
Done...
Done [Elapsed = 3442365 mS [57.0 minutes] Fri Jun 21 13:47:25 CEST 2024]]
If you want to check progress in details oedacli logs are locate in:
/EXAVMIMAGES/onecommand/linux-x64/log
You can find a global log oedacli.out and a log related to the specific activity:
Step1_Cli_AddDbHome_240621_125002.out
This one contains all details about the main activity:
2024-06-21 12:50:02,678 [FINE][ main][ EsCommonUtils:724] Version : 240605
2024-06-21 12:50:02,679 [FINE][ main][ EsCommonUtils:729] Free space in current directory /EXAVMIMAGES/onecommand/linux-x64.240605/. is 2015123MB
2024-06-21 12:50:02,679 [FINE][ main][ EsCommonUtils:732] This host ex2dbadm01.farm.Itoug-italia.local
2024-06-21 12:50:02,679 [FINE][ main][ EsCommonUtils:733] # Configuration file : /EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab.xml
2024-06-21 12:50:02,679 [FINE][ main][DatabaseHomeXmlUtils:838] Got Db Machines [ex2-itouglab01-dbadm.farm.Itoug-italia.local, ex2-itouglab02-dbadm.farm.Itoug-italia.local] for Database Home /u01/app/oracle/product/19.22.0.0/dbhome_1
2024-06-21 12:50:02,680 [INFO][ main][ CliDeployUtils:5856] Adding additional Database Home /u01/app/oracle/product/19.22.0.0/dbhome_1 on nodes [ex2-itouglab01-dbadm.farm.Itoug-italia.local, ex2-itouglab02-dbadm.farm.Itoug-italia.local]
2024-06-21 12:50:02,680 [FINE][ main][DatabaseHomeXmlUtils:838] Got Db Machines [ex2-itouglab01-dbadm.farm.Itoug-italia.local, ex2-itouglab02-dbadm.farm.Itoug-italia.local] for Database Home /u01/app/oracle/product/19.22.0.0/dbhome_1
2024-06-21 12:50:02,680 [INFO][ main][ CliDeployUtils:5895] Validating Oracle Home..
…
- Linking Oracle
rm -f /u01/app/oracle/product/19.22.0.0/dbhome_1/rdbms/lib/oracle
/u01/app/oracle/product/19.22.0.0/dbhome_1/bin/orald -o /u01/app/oracle/product/19.22.0.0/dbhome_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/19.22.0.0/dbhome_1/rdbms/lib/ -L/u01/app/oracle/product/19.22.0.0/dbhome_1/lib/ -L/u01/app/oracle/product/19.22.0.0/dbhome_1/lib/stubs/ -Wl,-E /u01/app/oracle/product/19.22.0.0/dbhome_1/rdbms/lib/opimai.o /u01/app/oracle/product/19.22.0.0/dbhome_1/rdbms/lib/ssoraed.o
…
rm -f /u01/app/oracle/product/19.22.0.0/dbhome_1/bin/oracle
mv /u01/app/oracle/product/19.22.0.0/dbhome_1/rdbms/lib/oracle /u01/app/oracle/product/19.22.0.0/dbhome_1/bin/oracle
chmod 6751 /u01/app/oracle/product/19.22.0.0/dbhome_1/bin/oracle
(if [ ! -f /u01/app/oracle/product/19.22.0.0/dbhome_1/bin/crsd.bin ]; then \
getcrshome="/u01/app/oracle/product/19.22.0.0/dbhome_1/srvm/admin/getcrshome" ; \
if [ -f "$getcrshome" ]; then \
crshome="`$getcrshome`"; \
if [ -n "$crshome" ]; then \
if [ $crshome != /u01/app/oracle/product/19.22.0.0/dbhome_1 ]; then \
oracle="/u01/app/oracle/product/19.22.0.0/dbhome_1/bin/oracle"; \
$crshome/bin/setasmgidwrap oracle_binary_path=$oracle; \
fi \
fi \
fi \
fi\
);
====== End Output from node ex2-itouglab02-dbadm.farm.Itoug-italia.local Ret code 0. Elapsed time: 13305 mS ======
2024-06-21 13:47:25,003 [INFO][ main][ CliDeployUtils:7047] Completed configuration of database home software [/u01/app/oracle/product/19.22.0.0/dbhome_1] on Cluster ex2itouglab
2024-06-21 13:47:25,003 [FINE][ main][ DatabaseHomeCli:1441] processDeployDatabaseHome returning :
2024-06-21 13:47:25,003 [FINE][ main][ CliJsonEndPoint:636] ###CLIJSON-125002
2024-06-21 13:47:25,005 [FINE][ main][ DeployCommands:353] Good Deploy : ADD DATABASEHOME
2024-06-21 13:47:25,006 [FINE][ main][ CliUtils:328] Saved Source file to : /EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab_20240621_134725.xml
2024-06-21 13:47:25,039 [FINE][ main][ FileUtils:754] Creating file /EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab.xml
2024-06-21 13:47:25,039 [FINE][ main][ FileUtils:790] File /EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab.xml exists, removing file /EXAVMIMAGES/onecommand/Itoug-ex2-ex2itouglab.xml
2024-06-21 13:47:25,040 [INFO][ main][ DeployCommands:365] Done...
2024-06-21 13:47:25,040 [FINE][ main][ CommonUtils:4128] Not using regress stuff, not writing lines...
2024-06-21 13:47:25,052 [INFO][ main][ DeployCommands:97] Done [Elapsed = 3442365 mS [57.0 minutes] Fri Jun 21 13:47:25 CEST 2024]]
2024-06-21 13:47:25,053 [FINE][ main][ oedacli:539] Exiting status 0
Check Inventory
If everything is OK in previous step, now you can check if Inventory has been updated successfully:
$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
$ cat /u01/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2024, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>12.2.0.7.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGiHome19180" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="1" CRS="true"/>
<HOME NAME="itouglab_home_1918" LOC="/u01/app/oracle/product/19.18.0.0/dbhome_1" TYPE="O" IDX="2"/>
<HOME NAME="agent13c1" LOC="/u01/app/oracle/agent/agent_13.5.0.0.0" TYPE="O" IDX="4"/>
<HOME NAME="itouglab_home_1922" LOC="/u01/app/oracle/product/19.22.0.0/dbhome_1" TYPE="O" IDX="5"/>
<HOME NAME="ebprd_home_122" LOC="/u01/app/oracle/product/12.2.0.1.220118/dbhome_1" TYPE="O" IDX="3" REMOVED="T"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
Rename Volume Group
This step is not mandatory but can be useful to help volume identification in the future.
To complete this task umount the new volume:
umount /u01/app/oracle/product/19.22.0.0/dbhome_1
Identify the volume group:
# vgs
VG #PV #LV #SN Attr VSize VFree
VGExaDb 1 14 0 wz--n- <100.55g 2.17g
VGExaDbDisk.audit.img 1 1 0 wz--n- <32.00g <2.00g
VGExaDbDisk.db-klone-Linux-x86-64-19000240116.50.img 1 1 0 wz--n- <52.00g <2.00g
VGExaDbDisk.db19.18.0.0.230117_3.img 1 1 0 wz--n- <52.00g <2.00g
VGExaDbDisk.diag01.img 2 1 0 wz--n- 36.99g 1.99g
VGExaDbDisk.grid19.18.0.0.230117.img 1 1 0 wz--n- <52.00g <2.00g
VGExaDbDisk.u01.20.img 2 1 0 wz--n- 153.99g 3.99g
Check the active volumes:
# vgdisplay -A|grep img
VG Name VGExaDbDisk.audit.img
VG Name VGExaDbDisk.db19.18.0.0.230117_3.img
VG Name VGExaDbDisk.diag01.img
VG Name VGExaDbDisk.db-klone-Linux-x86-64-19000240116.50.img
VG Name VGExaDbDisk.grid19.18.0.0.230117.img
VG Name VGExaDbDisk.u01.20.img
Deactivate the volume group:
# vgchange -an VGExaDbDisk.db-klone-Linux-x86-64-19000240116.50.img
0 logical volume(s) in volume group "VGExaDbDisk.db-klone-Linux-x86-64-19000240116.50.img" now active
Check if the volume is correctly de-activated:
# vgdisplay -A|grep img
VG Name VGExaDbDisk.audit.img
VG Name VGExaDbDisk.db19.18.0.0.230117_3.img
VG Name VGExaDbDisk.diag01.img
VG Name VGExaDbDisk.grid19.18.0.0.230117.img
VG Name VGExaDbDisk.u01.20.img
Rename the volume using the syntax:
vgrename <SOURCE NAME> VGExaDbDisk.db<Version included date>_<progressive number>.img
# vgrename VGExaDbDisk.db-klone-Linux-x86-64-19000240116.50.img VGExaDbDisk.db19.22.0.0.240116_4.img
Volume group "VGExaDbDisk.db-klone-Linux-x86-64-19000240116.50.img" successfully renamed to "VGExaDbDisk.db19.22.0.0.240116_4.img"
Activate the volume group:
# vgchange -ay VGExaDbDisk.db19.22.0.0.240116_4.img
1 logical volume(s) in volume group "VGExaDbDisk.db19.22.0.0.240116_4.img" now active
Check active volumes:
# vgdisplay -A|grep img
VG Name VGExaDbDisk.audit.img
VG Name VGExaDbDisk.db19.18.0.0.230117_3.img
VG Name VGExaDbDisk.diag01.img
VG Name VGExaDbDisk.db19.22.0.0.240116_4.img
VG Name VGExaDbDisk.grid19.18.0.0.230117.img
VG Name VGExaDbDisk.u01.20.img
Check logical volume name:
# lvdisplay|grep 19.22
LV Path /dev/VGExaDbDisk.db19.22.0.0.240116_4.img/LVDBDisk
VG Name VGExaDbDisk.db19.22.0.0.240116_4.img
Refresh the logical volume:
# lvchange /dev/VGExaDbDisk.db19.22.0.0.240116_4.img/LVDBDisk --refresh
Modify fstab:
LABEL=DBSYS / xfs defaults 0 0
LABEL=BOOT /boot xfs defaults,nodev 0 0
LABEL=SWAP swap swap defaults 0 0
LABEL=VAR /var xfs defaults 0 0
LABEL=DIAG /var/log xfs defaults 0 0
LABEL=HOME /home xfs defaults,nosuid 0 0
tmpfs /dev/shm tmpfs defaults,size=96149m 0 0
LABEL=KDUMP /crashfiles xfs defaults 0 0
LABEL=TMP /tmp xfs defaults 0 0
LABEL=AUDIT /var/log/audit xfs defaults 0 0
/dev/VGExaDbDisk.grid19.18.0.0.230117.img/LVDBDisk /u01/app/19.0.0.0/grid xfs defaults 0 0
/dev/VGExaDbDisk.db19.18.0.0.230117_3.img/LVDBDisk /u01/app/oracle/product/19.18.0.0/dbhome_1 xfs defaults 0 0
/dev/VGExaDbDisk.u01.20.img/LVDBDisk /u01 xfs defaults 0 0
/dev/VGExaDbDisk.db19.22.0.0.240116_4.img/LVDBDisk /u01/app/oracle/product/19.22.0.0/dbhome_1 xfs defaults 1 1
Mount the device:
# mount /u01/app/oracle/product/19.22.0.0/dbhome_1
# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 47G 0 47G 0% /dev
tmpfs 94G 209M 94G 1% /dev/shm
tmpfs 47G 9.4M 47G 1% /run
tmpfs 47G 0 47G 0% /sys/fs/cgroup
/dev/mapper/VGExaDb-LVDbSys1 15G 12G 3.4G 78% /
/dev/sdc1 509M 86M 424M 17% /boot
/dev/mapper/VGExaDb-LVDbKdump 20G 671M 20G 4% /crashfiles
/dev/mapper/VGExaDbDisk.u01.20.img-LVDBDisk 150G 37G 114G 25% /u01
/dev/mapper/VGExaDbDisk.audit.img-LVDBDisk 30G 865M 30G 3% /u01/app/audit
/dev/mapper/VGExaDbDisk.db19.18.0.0.230117_3.img-LVDBDisk 50G 12G 39G 23% /u01/app/oracle/product/19.18.0.0/dbhome_1
/dev/mapper/VGExaDbDisk.diag01.img-LVDBDisk 35G 4.9G 31G 14% /u01/app/diag
/dev/mapper/VGExaDbDisk.grid19.18.0.0.230117.img-LVDBDisk 50G 18G 33G 35% /u01/app/19.0.0.0/grid
/dev/mapper/VGExaDb-LVDbTmp 3.0G 37M 3.0G 2% /tmp
/dev/mapper/VGExaDb-LVDbHome 4.0G 49M 4.0G 2% /home
/dev/mapper/VGExaDb-LVDbVar1 2.0G 1.1G 973M 53% /var
/dev/mapper/VGExaDb-LVDbVarLog 18G 2.7G 16G 15% /var/log
/dev/mapper/VGExaDb-LVDbVarLogAudit 1014M 142M 873M 14% /var/log/audit
tmpfs 9.4G 0 9.4G 0% /run/user/1001
tmpfs 9.4G 0 9.4G 0% /run/user/1020
tmpfs 9.4G 0 9.4G 0% /run/user/12140
/dev/mapper/VGExaDbDisk.db19.22.0.0.240116_4.img-LVDBDisk 50G 11G 40G 21% /u01/app/oracle/product/19.22.0.0/dbhome_1
Do the same on other cluster nodes
New home for patching:
If the new home has been created for patching purposes don’t forget to copy the following files from old version to new version.
Export environment variables:
$ export ORACLE_HOME_NEW=/u01/app/oracle/product/19.22.0.0/dbhome_1
$ export ORACLE_HOME_OLD=/u01/app/oracle/product/19.18.0.0/dbhome_1
Copy files from source to dest
$ cp -p $ORACLE_HOME_OLD/network/admin/* $ORACLE_HOME_NEW/network/admin/
$ cp -p $ORACLE_HOME_OLD/dbs/* $ORACLE_HOME_NEW/dbs/
$ cp -p $ORACLE_HOME_OLD/sqlplus/admin/* $ORACLE_HOME_NEW/sqlplus/admin/
For sure check the directories content before to copy and evaluate if you need to copy additional files from other configuration directories.
Patching the database:
This section is out of article purpose, but having now a new home available you can simply shutdown each instance and restart them from the new home, then at the end execute datapatch activity, but for sure this can be topic for a new article.
Conclusions
At the end we can say that the activity is not so simple but for sure it is very useful, because if you have more than one RAC in your KVM virtual environent, for sure you are saving space because at Dom 0 level oracle use always the same image and so only “delta” space is allocated and not the source shared image.
In addition, after a patching is completed on all instances in the same RAC, you can safetely remove the old oracle home saving space … but this is stuff for the next article.
BIBLIOGRAPHY
https://docs.oracle.com/en/engineered-systems/exadata-database-machine/dbmin/add-databasehome.html
https://docs.oracle.com/en/engineered-systems/exadata-database-machine/dbmin/alter-cluster.html
https://docs.oracle.com/en/engineered-systems/exadata-database-machine/dbmin/xmlaction.html
Oracle Linux: How to Rename Non-Root Volume Group (Doc ID 2989489.1)
How to create a new Database Home and Database using OEDACLI (Doc ID 2789297.1)
Commenti recenti