Installing GI for Standalone

Yesterday I have installed GI for Standalone, I wanted to install my VBox with AFD, but I got this error. I don’t know, it’s sad I think.

AFD-620: AFD is not supported on this operating system version: 3.10.0-514.10.2.el7.x86_64

So I had to install asmlib and continue with. I don’t understand why I had to restart my machine, it was restarted before I started ./gridSetup.sh so it’s strange.

I had disks sdb and sdc prepared with fdisk. I don’t write about it again, it’s always the same.

[oracle@ora01 oracle]$ lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0  476M  0 part /boot
└─sda2            8:2    0 15.3G  0 part
  ├─ol-root     253:0    0   14G  0 lvm  /
  └─ol-products 253:2    0 23.3G  0 lvm  /products
sdb               8:16   0   12G  0 disk
sdc               8:32   0   12G  0 disk
sdd               8:48   0   30G  0 disk
└─sdd1            8:49   0 25.7G  0 part
  ├─ol-swap     253:1    0  3.7G  0 lvm  [SWAP]
  └─ol-products 253:2    0 23.3G  0 lvm  /products
sr0              11:0    1 1024M  0 rom

Now install the rpms

[root@ora01 ~]# yum install oracleasm-support 
[root@ora01 ~]# rpm -i /media/sf_12.2.0.1/oracleasmlib-2.0.12-1.el7.x86_64.rpm

Configuring oracleasm is always the same

[root@ora01 ~]# 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 []: oracle
Default group to own the driver interface []: dba
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

While initializing it I forgot a package

[root@ora01 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": failed
Unable to load module "oracleasm"
[root@ora01 ~]#
[root@ora01 ~]# yum install kmod-oracleasm

Initialize oracleasm!

[root@ora01 ~]# oracleasm init
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@ora01 ~]#
[root@ora01 ~]# oracleasm createdisk disk1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@ora01 ~]# oracleasm createdisk disk2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@ora01 ~]#
[root@ora01 ~]#
[root@ora01 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@ora01 ~]# oracleasm listdisks
DISK1
DISK2

Now everything is prepared for the gridSetup.sh

[oracle@ora01 oracle]$ cd grid_12.2.0.1/
[oracle@ora01 grid_12.2.0.1]$ ./gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...

You can find the log of this install session at:
 /tmp/GridSetupActions2017-04-06_05-37-53PM/gridSetupActions2017-04-06_05-37-53PM.log
Moved the install session logs to:
 /products/oraInventory/logs/GridSetupActions2017-04-06_05-37-53PM

The root.sh exection failed of course and it wrote I need to restart the machine to continue.

Now I had to manually execute the steps when this error happens, nice thing Oracle, it’s documented and it worked without problems.

[root@ora01 oraInventory]# ./orainstRoot.sh
Changing permissions of /products/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /products/oraInventory to oinstall.
The execution of the script is complete.
[root@ora01 oraInventory]# cd ../
[root@ora01 products]# cd ora
oracle/       oraInventory/
[root@ora01 products]# cd oracle/grid_12.2.0.1/
[root@ora01 grid_12.2.0.1]# ./root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /products/oracle/grid_12.2.0.1
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

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.
Using configuration parameter file: /products/oracle/grid_12.2.0.1/crs/install/crsconfig_params
The log of current session can be found at:
  /products/oracle/crsdata/ora01/crsconfig/roothas_2017-04-06_05-46-45PM.log
2017/04/06 17:46:46 CLSRSC-363: User ignored prerequisites during installation
2017/04/06 17:46:52 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ora01'
CRS-2673: Attempting to stop 'ora.evmd' on 'ora01'
CRS-2677: Stop of 'ora.evmd' on 'ora01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ora01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.

ora01     2017/04/06 17:47:42     /products/oracle/grid_12.2.0.1/cdata/ora01/backup_20170406_174742.olr     0
2017/04/06 17:47:43 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

Now the last part was to generate a response file and run this type of command

[root@ora01 cfgtoollogs]# pwd
/products/oracle/grid_12.2.0.1/cfgtoollogs
[root@ora01 cfgtoollogs]# ./configToolAllCommands RESPONSE_FILE=/products/oracle/grid_12.2.0.1/cfgtoollogs/cfg.props
This script must not be run as root.
[oracle@ora01 ~]$ cat /products/oracle/grid_12.2.0.1/cfgtoollogs/cfg.props
oracle.assistants.asm|S_ASMPASSWORD=oracle
[oracle@ora01 cfgtoollogs]$ ./configToolAllCommands RESPONSE_FILE=/products/oracle/grid_12.2.0.1/cfgtoollogs/cfg.props

Finally it finished with a lot of warnings. But warnings are not problems.

After this I could start my asmca and create my ASM, it went smoothly. What I like to do on my VMs is to set these parameters, Oracle automatically sets AMM for GI to 1000MB and you cannot resize it to a lower value, it’s hardcoded. So you have to use ASMM

[oracle@ora01 trace]$ sqlplus / as sysasm

SQL*Plus: Release 12.2.0.1.0 Production on Thu Apr 6 18:06:42 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter memor

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
memory_max_target                    big integer 1076M
memory_target                        big integer 1076M
SQL> show parameter spf

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/ASM/ASMPARAMETERFILE/reg
                                                 istry.253.940615485
SQL> alter system set sga_target=300m scope=spfile ;

System altered.

SQL> alter system set memory_max_target=0 scope=spfile ;

System altered.

SQL> alter system set memory_target=0 scope=spfile ;

System altered.

SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@ora01 trace]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ora01'
CRS-2673: Attempting to stop 'ora.evmd' on 'ora01'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'ora01'
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'ora01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ora01'
CRS-2677: Stop of 'ora.FRA.dg' on 'ora01' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'ora01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ora01'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ora01' succeeded
CRS-2677: Stop of 'ora.evmd' on 'ora01' succeeded
CRS-2677: Stop of 'ora.asm' on 'ora01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'ora01'
CRS-2677: Stop of 'ora.cssd' on 'ora01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ora01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[oracle@ora01 trace]$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[oracle@ora01 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.2.0.1.0 Production on Thu Apr 6 18:18:23 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show sga

Total System Global Area  314572800 bytes
Fixed Size                  8620224 bytes
Variable Size             280786752 bytes
ASM Cache                  25165824 bytes

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s