Advertisement

Thursday, February 28, 2019

Oracle Database 19c: Grid Infrastructure / RAC Installation - Part 2/3

In this blog I discuss from the part where you have setup your machine and ready to do your Linux configuration
This is a 3 Blog Series and this is Blog 2
Of this Blog series - 
Part 1
Part 3 

(Make sure you have internet connectivity)
Linux Configuration (on Both nodes)
1. Install rpm's via yum


  • yum install oracle-database-preinstall-19c.x86_64 -y
  • yum install oracleasm-support -y
  • yum install kmod-oracleasm.x86_64 -y
  • yum install bind -y
  • yum install kmod -y
  • yum install kmod-libs -y

2. Groups and User Addition

  • groupadd -g 54331 asmadmin
  • useradd -g oinstall -G asmadmin,dba -u 54232 grid
  • Set password for root, oracle and grid user

3. Copy secure/limits.d

  • cd /etc/security/limits.d/
  • In file oracle-database-preinstall-19c.conf duplicate all entries and change the user to grid.

4. Add huge pages

  • vi /etc/sysctl.conf
  • vm.nr_hugepages = 10000
  • sysctl --system

5. Swap Creation - Refer Blog - Swap Creation

6. Update Contents of /etc/profile 

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536 
  ulimit -s 32768
  else
    ulimit -u 16384 -n 65536
    ulimit -s 32768
  fi
fi

if [ $USER = "grid" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536 
  ulimit -s 32768
  else
    ulimit -u 16384 -n 65536
    ulimit -s 32768
  fi
fi

Network Configuration (on both nodes)

7.  Contents of /etc/hosts file 
(The key thing here is to configure your machines as per below addresses. 
There will be 3 interfaces on Virtual box One public, 2 private to Cluster - One for ASM communcation and one Private for Cluster Communcation

192.168.10.51 rac19c01.novalocal rac18c01
192.168.10.52 rac19c02.novalocal rac18c02
192.168.10.61 rac19c01-vip.novalocal rac18c01-vip
192.168.10.62 rac19c02-vip.novalocal rac18c02-vip

192.168.30.21 rac19c01-priv01.novalocal rac18c01-priv01
192.168.30.22 rac19c02-priv01.novalocal rac18c02-priv01



8. DNS Configuration (On Node 1 only)
(After you clone the machine - make sure you disable named service on the cloned machine 

File - /etc/named.conf - Make the changes as given below

Change 1  - Add highlighted entry
options {
        listen-on port 53 { 127.0.0.1;192.168.50.51; };  

Change 1.1
        allow-query     { 192.168.10.0/24; };

Change 2 - remove the below section
zone "." IN {
type hint;
file "named.ca";
};

Change 3 -  and add this in the end of the file

zone "novalocal" IN {
type master;
file "novalocal.zone";
allow-update { none; };
};


Create file /var/named/localdomain.zone with contents as below

$ cat /var/named/novalocal.zone

$TTL  86400
@ IN SOA      novalocal. novalocal.(
42          ; serial (d. adams)
3H          ; refresh
15M         ; retry
1W          ; expiry
1D )        ; minimum

                                 IN NS   rac19c01.novalocal.
localhost                        IN A    127.0.0.1
rac19c01.novalocal.                IN A    192.168.10.51
rac19c02.novalocal.                IN A    192.168.10.52
rac19c01-vip.novalocal.            IN A    192.168.10.61
rac19c02-vip.novalocal.            IN A    192.168.10.62
rac-scan.novalocal.            IN A    192.168.10.71
rac-scan.novalocal.            IN A    192.168.10.72
rac-scan.novalocal.            IN A    192.168.10.73


File - /etc/resolv.conf - create this file as below (On both nodes)

$ cat /etc/resolv.conf

nameserver 192.168.10.51
search novalocal
options attempts:1
options timeout:1

Finally enable the named.service and restart it
Note - the systemctl utiltity used instead of conventional chkconfig and service utility

$ systemctl enable named.service
$ systemctl restart named.service


9.  ORACLEASM Configuration
[As root on All Nodes  ]
$ oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done

$ oracleasm init

[As root on Node 1]
(Ensure the disks are partitioned, no FS required though)

$ oracleasm createdisk OCR_VOTE1 /dev/xvdc1
Writing disk header: done
Instantiating disk: done

$ oracleasm createdisk OCR_VOTE2 /dev/xvdd1
Writing disk header: done
Instantiating disk: done

$ oracleasm createdisk OCR_VOTE3 /dev/xvde1
Writing disk header: done
Instantiating disk: done

[As root on All nodes]
$  oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "OCR_VOTE1"
Instantiating disk "OCR_VOTE2"
Instantiating disk "OCR_VOTE3"

10.  Create Directories and Unzip Software 
[As root user on both/all nodes] 

mkdir /u01 
mkdir /u01/app
chown root:oinstall /u01 /u01/app
chmod 755 /u01 /u01/app

mkdir /u01/app/190
chown grid:oinstall /u01/app/190
chmod 755 /u01/app/190

mkdir /u01/app/grid
chown grid:oinstall /u01/app/grid
chmod 755 /u01/app/grid

mkdir /u01/app/oraInventory
chown grid:oinstall /u01/app/oraInventory
chmod 755 /u01/app/oraInventory

[As grid user]
mkdir -p /u01/app/190/grid


The next part of the blog discusses on the real installation

Oracle Database 19c: Grid Infrastructure / RAC Installation - Part 1/3


In this blog series I am going to demonstrate installation of RAC 18c on on premise Linux.

I have distributed this series into multiple parts, referring few parts from my previous 12c/18c installation series and then few parts are the new way to go.

This is a 3 Blog Series and this is Blog 1 
Of this Blog series - 
Part 2


Part 3


For reference 18c installation is described here - 


Part 1 - Linux Install 
This is an old reference on installing Oracle Linux.

In this version I do use a newer version which is 7.4, however the steps are essential the same, the key difference lies in getting latest ISO from edelivery.oracle.com

Part 2.1 - Linux and Network Configuration
This blog essentially discusses on OS and network configuration. 
, I discuss on how to configure the network (specially DNS). 


You can still refer to my previous blog for Network Configuration of 12c Install to detail out how network configuration is done for each node. (Note the IP addresses I use this time are bit different from earlier)

Part 2.2 is essentially similar to my previous blog for 12c install - where I discuss on how to attach disks and clone a machine . However I do have provided some extra details on how to get the ORACLEASM up and running in 18c as part of Part 2 and 3.

Part 3 - Installation
This part discusses on installation of Oracle Grid Infra on the Servers. 

To detail out - here are my machine configurations
4 vCPU * 32GB RAM


Oracle Linux Server release 7.4
NAME="Oracle Linux Server"
VERSION="7.4"
ID="ol"
VERSION_ID="7.4"
PRETTY_NAME="Oracle Linux Server 7.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.4
Red Hat Enterprise Linux Server release 7.4 (Maipo)
Oracle Linux Server release 7.4

Oracle Database: 19c - Knowledge Base

Oracle Database: 18c Grid Infra (RAC) Silent Installation

In this blog I am going to discuss about silent installation of 18c RAC

Here the pre-reqs are already complete as described in my previous blogs 

Pre-req 1/2
Pre-req 2/2


Let's pick up now - 


1. Setup passwordless ssh between users
cd /u01/app/180/grid

[As root]
$ ./sshUserSetup.sh -user root -hosts "rac18c01 rac18c02" -noPromptPassphrase -confirm -advanced

[As grid]
$ ./sshUserSetup.sh -user grid -hosts "rac18c01 rac18c02" -noPromptPassphrase -confirm -advanced

2. run Cluster Verification and resolve issues if any 
$ ./runcluvfy.sh stage -pre crsinst -n rac18c01,rac18c02 -verbose | tee /tmp/cluvfy.out

3. Final Pre-req check 
(Response file can be found in the end)
$  /u01/app/180/grid/gridSetup.sh -silent  -executePrereqs  -waitForCompletion  -responseFile /tmp/Silent_18cGrid.rsp

Ensure checks complete successfully. 

4. Start the installation
$  /u01/app/180/grid/gridSetup.sh -silent  -waitForCompletion  -responseFile /tmp/Silent_18cGrid.rsp

As a root user, execute the following script(s):
        1. /u01/app/180/grid/root.sh 

Execute /opt/oracle/product/180/grid/root.sh on the following nodes:
[rac18c01, rac18c02]

Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.

Successfully Setup Software with warning(s).
As install user, execute the following command to complete the configuration.
        /u01/app/180/grid/gridSetup.sh  -executeConfigTools -responseFile /tmp/OBS_18cGrid.rsp [-silent]

Step 4.1 Run the Root Script
[As root on Node 1]
$ /u01/app/180/grid/root.sh
[As root on Node 2]
$ /u01/app/180/grid/root.sh

Step 4.2 - Run Post Script 
[As grid on Node 1]
$  /u01/app/180/grid/gridSetup.sh  -silent -executeConfigTools -responseFile /tmp/OBS_18cGrid.rsp 

Installation is complete. 


Response File for 18c RAC
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v18.0.0
INVENTORY_LOCATION=/opt/oracle/oraInventory
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=dba
oracle.install.asm.OSOPER=
oracle.install.asm.OSASM=sysasm
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.gpnp.scanName=rac18c-scan.novalocal
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.clusterName=prod-bss
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.clusterNodes=rac18c01:rac18c01-vip:HUB,rac18c02:rac18c02-vip:HUB
oracle.install.crs.config.networkInterfaceList=eth0:192.168.10.0:1,eth1:192.168.30.0:5
oracle.install.crs.config.useIPMI=false
oracle.install.asm.storageOption=ASM
oracle.install.asmOnNAS.configureGIMRDataDG=false
oracle.install.asm.SYSASMPassword=Oracle123
oracle.install.asm.diskGroup.name=OCR_VOTE
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/OCR_VOTE1p1,/dev/oracleasm/disks/OCR_VOTE2p1,/dev/oracleasm/disks/OCR_VOTE3p1
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/*
oracle.install.asm.monitorPassword=Oracle123
oracle.install.asm.configureAFD=false
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE

oracle.install.crs.rootconfig.executeRootScript=false

Wednesday, February 27, 2019

Oracle Database 19c : GI Upgrade (from 18c) - 2 Nodes Cluster - Part 2/2

In this blog, I pickup from my last blog where I had done all the pre-reqs successfully. 

In this blog we will be doing the real upgrade. 

Connect using user - grid (make sure 'X' is enabled and you use 'X' server - I prefer MobaXterm)



$ cd /u01/app/190/grid
$ ./gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...

Step 1  - Select "Upgrade Oracle Grid Infrastructure" and Click "Next"



Step 2 - Select Nodes "Do not select - Skip upgrade on unreachable nodes and " Click "Next"


Step 3 - Skip EM Registeration Check - Do this after installation and Click "Next"

Step 4 - Select oracle base - generally it is populated correctly


Step 5 - Un-check Root Script Execution - We will do this manually. Click "Next"



Step  6 - RPM DB checks can be ignored (this is probably due to this GI version is specific to Exadata - I am still not sure but a confirmation will come when official normal Linux release will be done. by Oracle). Click "Next" and "Yes" when Prompted



Step 7 -  Click Submit to continue


Step 8 - Wait for the operations to complete






Step 8.1 - Execute the Root Scripts (1 by 1 on both nodes)
First on Node 1 (where Installer is running and then on node 2)
Node 1 - 
$ /u01/app/190/grid/rootupgrade.sh

Node 2 
$ /u01/app/190/grid/rootupgrade.sh

Step 8.2 - Click "OK" after root script execution is complete
The Complete output of the root scripts is in the last. 


Step 9 - Wait for the Config tools and post upgrade to complete. 



Step 10 - Click Close to Complete the installation. 




Verify the Cluster Version
[As root]
$ /u01/app/190/grid/bin/crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [19.0.0.0.0]


Note - if you had made any entries in /etc/oratab - Correct them to point to new homes respectively for ASM,APX and MGMT DB. 


Root Scripts Output
Node 1 

$ /u01/app/190/grid/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/190/grid

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.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/190/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac18c01/crsconfig/rootcrs_rac18c01_2019-02-27_09-28-36PM.log
2019/02/27 21:28:53 CLSRSC-595: Executing upgrade step 1 of 18: 'UpgradeTFA'.
2019/02/27 21:28:53 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.
2019/02/27 21:28:53 CLSRSC-595: Executing upgrade step 2 of 18: 'ValidateEnv'.
2019/02/27 21:28:58 CLSRSC-595: Executing upgrade step 3 of 18: 'GetOldConfig'.
2019/02/27 21:28:58 CLSRSC-464: Starting retrieval of the cluster configuration data
2019/02/27 21:29:04 CLSRSC-692: Checking whether CRS entities are ready for upgrade. This operation may take a few minutes.
2019/02/27 21:30:38 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.
2019/02/27 21:30:45 CLSRSC-693: CRS entities validation completed successfully.
2019/02/27 21:30:50 CLSRSC-515: Starting OCR manual backup.
2019/02/27 21:31:06 CLSRSC-516: OCR manual backup successful.
2019/02/27 21:33:08 CLSRSC-486:
 At this stage of upgrade, the OCR has changed.
 Any attempt to downgrade the cluster after this point will require a complete cluster outage to restore the OCR.
2019/02/27 21:33:08 CLSRSC-541:
 To downgrade the cluster:
 1. All nodes that have been upgraded must be downgraded.
2019/02/27 21:33:08 CLSRSC-542:
 2. Before downgrading the last node, the Grid Infrastructure stack on all other cluster nodes must be down.
2019/02/27 21:33:16 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.
2019/02/27 21:33:16 CLSRSC-595: Executing upgrade step 4 of 18: 'GenSiteGUIDs'.
2019/02/27 21:33:18 CLSRSC-595: Executing upgrade step 5 of 18: 'UpgPrechecks'.
2019/02/27 21:33:21 CLSRSC-363: User ignored prerequisites during installation
2019/02/27 21:33:34 CLSRSC-595: Executing upgrade step 6 of 18: 'SetupOSD'.
2019/02/27 21:33:34 CLSRSC-595: Executing upgrade step 7 of 18: 'PreUpgrade'.
2019/02/27 21:36:32 CLSRSC-468: Setting Oracle Clusterware and ASM to rolling migration mode
2019/02/27 21:36:32 CLSRSC-482: Running command: '/u01/app/180/grid/bin/crsctl start rollingupgrade 19.0.0.0.0'
CRS-1131: The cluster was successfully set to rolling upgrade mode.
2019/02/27 21:36:37 CLSRSC-482: Running command: '/u01/app/190/grid/bin/asmca -silent -upgradeNodeASM -nonRolling false -oldCRSHome /u01/app/180/grid -oldCRSVersion 18.0.0.0.0 -firstNode true -startRolling false '

ASM configuration upgraded in local node successfully.

2019/02/27 21:36:41 CLSRSC-469: Successfully set Oracle Clusterware and ASM to rolling migration mode
2019/02/27 21:36:46 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack
2019/02/27 21:37:08 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.
2019/02/27 21:37:09 CLSRSC-595: Executing upgrade step 8 of 18: 'CheckCRSConfig'.
2019/02/27 21:37:11 CLSRSC-595: Executing upgrade step 9 of 18: 'UpgradeOLR'.
2019/02/27 21:37:20 CLSRSC-595: Executing upgrade step 10 of 18: 'ConfigCHMOS'.
2019/02/27 21:37:20 CLSRSC-595: Executing upgrade step 11 of 18: 'UpgradeAFD'.
2019/02/27 21:37:27 CLSRSC-595: Executing upgrade step 12 of 18: 'createOHASD'.
2019/02/27 21:37:34 CLSRSC-595: Executing upgrade step 13 of 18: 'ConfigOHASD'.
2019/02/27 21:37:34 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2019/02/27 21:39:34 CLSRSC-595: Executing upgrade step 14 of 18: 'InstallACFS'.
2019/02/27 21:42:03 CLSRSC-595: Executing upgrade step 15 of 18: 'InstallKA'.
2019/02/27 21:42:09 CLSRSC-595: Executing upgrade step 16 of 18: 'UpgradeCluster'.
2019/02/27 21:43:30 CLSRSC-343: Successfully started Oracle Clusterware stack
clscfg: EXISTING configuration version 5 detected.
Successfully taken the backup of node specific configuration in OCR.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
2019/02/27 21:43:50 CLSRSC-595: Executing upgrade step 17 of 18: 'UpgradeNode'.
2019/02/27 21:43:54 CLSRSC-474: Initiating upgrade of resource types
2019/02/27 21:44:47 CLSRSC-475: Upgrade of resource types successfully initiated.
2019/02/27 21:44:57 CLSRSC-595: Executing upgrade step 18 of 18: 'PostUpgrade'.
2019/02/27 21:45:05 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded


Node 2 
$ /u01/app/190/grid/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/190/grid

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.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/190/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac18c02/crsconfig/rootcrs_rac18c02_2019-02-27_09-46-43PM.log
2019/02/27 21:46:52 CLSRSC-595: Executing upgrade step 1 of 18: 'UpgradeTFA'.
2019/02/27 21:46:52 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.
2019/02/27 21:46:52 CLSRSC-595: Executing upgrade step 2 of 18: 'ValidateEnv'.
2019/02/27 21:46:53 CLSRSC-595: Executing upgrade step 3 of 18: 'GetOldConfig'.
2019/02/27 21:46:53 CLSRSC-464: Starting retrieval of the cluster configuration data
2019/02/27 21:48:23 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.
2019/02/27 21:48:23 CLSRSC-595: Executing upgrade step 4 of 18: 'GenSiteGUIDs'.
2019/02/27 21:48:23 CLSRSC-595: Executing upgrade step 5 of 18: 'UpgPrechecks'.
2019/02/27 21:48:24 CLSRSC-363: User ignored prerequisites during installation
2019/02/27 21:48:26 CLSRSC-595: Executing upgrade step 6 of 18: 'SetupOSD'.
2019/02/27 21:48:26 CLSRSC-595: Executing upgrade step 7 of 18: 'PreUpgrade'.
2019/02/27 21:48:49 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

ASM configuration upgraded in local node successfully.

2019/02/27 21:49:56 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack
2019/02/27 21:50:27 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.
2019/02/27 21:51:48 CLSRSC-595: Executing upgrade step 8 of 18: 'CheckCRSConfig'.
2019/02/27 21:51:49 CLSRSC-595: Executing upgrade step 9 of 18: 'UpgradeOLR'.
2019/02/27 21:51:54 CLSRSC-595: Executing upgrade step 10 of 18: 'ConfigCHMOS'.
2019/02/27 21:51:54 CLSRSC-595: Executing upgrade step 11 of 18: 'UpgradeAFD'.
2019/02/27 21:51:56 CLSRSC-595: Executing upgrade step 12 of 18: 'createOHASD'.
2019/02/27 21:51:57 CLSRSC-595: Executing upgrade step 13 of 18: 'ConfigOHASD'.
2019/02/27 21:51:57 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2019/02/27 21:53:39 CLSRSC-595: Executing upgrade step 14 of 18: 'InstallACFS'.
2019/02/27 21:55:52 CLSRSC-595: Executing upgrade step 15 of 18: 'InstallKA'.
2019/02/27 21:55:53 CLSRSC-595: Executing upgrade step 16 of 18: 'UpgradeCluster'.
2019/02/27 21:57:17 CLSRSC-343: Successfully started Oracle Clusterware stack
clscfg: EXISTING configuration version 19 detected.
Successfully taken the backup of node specific configuration in OCR.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
2019/02/27 21:58:52 CLSRSC-595: Executing upgrade step 17 of 18: 'UpgradeNode'.
Start upgrade invoked..
2019/02/27 21:58:57 CLSRSC-478: Setting Oracle Clusterware active version on the last node to be upgraded
2019/02/27 21:58:57 CLSRSC-482: Running command: '/u01/app/190/grid/bin/crsctl set crs activeversion'
Started to upgrade the active version of Oracle Clusterware. This operation may take a few minutes.
Started to upgrade CSS.
CSS was successfully upgraded.
Started to upgrade Oracle ASM.
Started to upgrade CRS.
CRS was successfully upgraded.
Started to upgrade Oracle ACFS.
Oracle ACFS was successfully upgraded.
Successfully upgraded the active version of Oracle Clusterware.
Oracle Clusterware active version was successfully set to 19.0.0.0.0.
2019/02/27 22:00:09 CLSRSC-479: Successfully set Oracle Clusterware active version
2019/02/27 22:00:12 CLSRSC-476: Finishing upgrade of resource types
2019/02/27 22:00:41 CLSRSC-477: Successfully completed upgrade of resource types
2019/02/27 22:01:04 CLSRSC-595: Executing upgrade step 18 of 18: 'PostUpgrade'.
Successfully updated XAG resources.
2019/02/27 22:01:26 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

Oracle Database 19c : GI Upgrade (from 18c) - 2 Nodes Cluster - Part 1/2

In this blog I am going to work on upgrade of my GI from 18c to 19c for my 3 node Cluster running on OEL 7.3.
(You can download the latest binaries from oracle edelivery )

If you directly want to run on Part 2 then click here.

Here is a brief of my cluster


1. Version 
$ /u01/app/180/grid/bin/crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [18.0.0.0.0]

2. Disk Groups

[As grid]$ /u01/app/180/grid/bin/asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512             512   4096  4194304    368628   360856           122876          118990              0             N  DATA/
MOUNTED  NORMAL  N         512             512   4096  4194304    307188   253828           102396           75716              0             Y  OCR_VOTE

3. Databases
$ /u01/app/180/grid/bin/srvctl config database
orpl

4. Patches (Grid and Database)
$ /u01/app/180/grid/OPatch/opatch lspatches
28656071;OCW RELEASE UPDATE 18.4.0.0.0 (28656071)
28655963;DBWLM RELEASE UPDATE 18.4.0.0.0 (28655963)
28655916;ACFS RELEASE UPDATE 18.4.0.0.0 (28655916)
28655784;Database Release Update : 18.4.0.0.181016 (28655784)
28547619;TOMCAT RELEASE UPDATE 18.0.0.0.0 (28547619)
27908644;UPDATE 18.3 DATABASE CLIENT JDK IN ORACLE HOME TO JDK8U171
27923415;OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)

$ /u01/app/oracle/product/180/db/OPatch/opatch lspatches
28502229;OJVM RELEASE UPDATE: 18.4.0.0.181016 (28502229)
28656071;OCW RELEASE UPDATE 18.4.0.0.0 (28656071)
28655784;Database Release Update : 18.4.0.0.181016 (28655784)
27908644;UPDATE 18.3 DATABASE CLIENT JDK IN ORACLE HOME TO JDK8U171


In my cluster upgrade, I always keep backup of cluster registry, cluster resources running and listeners & instances running on each node for finaly comparison (just in case)

If configuration is correct, all things will come up automatically, however few things might not - for example a listener running from DB home, not registered with Clusterware.

In general below is the advise for 18c to 19c upgrade.

1. Backup OCR (Local & Global, Logical too)
2. Take Snapshot of resources (just in case you want to compare)
3. Have 33G+ free space in DG with OCR as this is mandatory requirement for upgrade else you will get an error -  INS-43100 asking for space
4. Have /etc/resolv.conf files matching across all nodes
5. Have the mandatory patch installed for GI Upgrade - I generally always patch for upgrades.
6. Have atleast 15GB free space on your installation mount point.
7. And lastly make sure you have on all servers clusterware up and running (There is an option in the installer to skip upgrade on unreachable nodes, which I doubt you want it)
8. Ensure all Packges are up to date as listed here (I had issues with kmod and kmod-libs)
9. Install Mandatory Patch - 28553832 before proceeding.
Steps to Install are as follows
[As root - on each node rolling]
$ unzip -qq /tmp/p28553832_184000OCWRU_Linux-x86-64.zip
$ export ORACLE_HOME=/u01/app/180/grid/

$ export PATH=$PATH:$ORACLE_HOME/OPatch
$ opatchauto apply /tmp/install/28553832/
Note - It might take 30-40 minutes depending no how fast your system is to apply this patch on one node.

10. Finally run the Upgrade Steps

On  Node 1,2,3 (and more if there)
[As grid]
$ mkdir -p /home/grid/org/Upgrade19cGI

On  Node 1
[As root:]
Set the environment to 18c Grid Home / (+ASM1)

$ ocrconfig  -export /home/grid/org/Upgrade19cGI/OCRLogicalBackupCluster.bak

$ ocrconfig -showbackuploc
Note down your backup loc here. 
$ ocrconfig -backuploc  
$ ocrconfig  -manualbackup 


$ ocrconfig -local -export /home/grid/org/Upgrade19cGI/OCRLogicalBackup_Local.bak


[As root:]
Set the environment to 18c Grid Home / (+ASM1)
$ crsctl stat res -t > /home/grid/org/Upgrade19cGI/crsctl_stat_res_t.log

On  Node 2, 3 and others (if more) 
[As root:]
Set the environment to 18c Grid Home / (+ASM2) (+ASM3)
$ ocrconfig -local -export /home/grid/org/Upgrade19cGI/OCRLogicalBackup_Local.bak

On Each Node 
$ ps -ef | grep pmon > /home/grid/org/Upgrade19cGI/pmon_snapshot.log

$  ps -ef | grep tns > /home/grid/org/Upgrade19cGI/tns_snapshot.log

Create a blackout in OEM
Disable any jobs / cron (better disable cron daemon, if only oracle server is running)

Create Grid Home Directory on each node 


[As root on All Nodes]

$ mkdir -p /u01/app/190/grid



Unzip Oracle Media on first node. 


[As root on Node 1]
cd /u01/app/190/grid
$ unzip -qq  V981627-01.zip
[As root on all Nodes]
$ chown -R grid:oinstall /u01/app/190/grid
(Make a note of image based installation here) 


[As Grid]  - Run Cluster Verification in pre - crs install stage

$ cd /u01/app/190/grid
$ ./runcluvfy.sh stage -pre crsinst -upgrade -rolling -src_crshome  /u01/app/180/grid -dest_crshome /u01/app/190/grid -dest_version 19.2.0.0 -fixup -verbose  | tee /tmp/cluvfy_upgd.out

Pre-check for cluster services setup was successful.
Verifying RPM Package Manager database ...INFORMATION
PRVG-11250 : The check "RPM Package Manager database" was not performed because
it needs 'root' user privileges.


CVU operation performed:      stage -pre crsinst
Date:                         Feb 27, 2019 7:20:38 AM
CVU home:                     /u01/app/190/grid/
User:                         grid



I generally redirect output using tee command to see it incoming and also have a copy

Fix anything which is shown as failed.

Finally Unset any environment variables related to Oracle
$ unset ORACLE_HOME ORACLE_SID ORACLE_BASE

Follow the next blog which provides screenshots and the upgrade process. 
Make sure you connect using grid user and do not do "su" for UI to work. 

$ ./gridSetup.sh

Tuesday, February 26, 2019

Oracle Database 18c: RAC Install - [FATAL] [INS-30516] Please specify unique disk groups

In this blog I discuss an error in installation of 18c RAC (or any), when you try to re-install 18c RAC due to any reason or probably deinstall a previous version and install a new one (not upgrade) then the below error is possible. 

[FATAL] [INS-30516] Please specify unique disk groups.

   CAUSE: Installer has detected that the diskgroup name provided already exists on the system.

This error is due to disk headers still have the entry of last Disk group which was using it. 


What you need to do ? 

1. List out all the disks which are part of your installation 
2. Wipe out all the disks as below
 dd if=/dev/zero of=<disk complete path> bs=1024k count=50
Note - the path has to be of physical disk and not the path which oracleasm gives (in case you are using oracleasm)
In multipath you can have the multipathed device

3. Re-run the installation