Announcements

Oracle training based on real-time expertise as per industry standards. Upcoming batch details are here.

View batch schedule

Free Oracle mock interview. Register using the link.

Register

#DBAchallenge: submit your questions.

Ask questions
Swipe for more →
Browse by Topic
Latest Posts

    Wednesday, April 9, 2025

    How to Install Oracle Grid Infrastructure Standalone ASM in Silent Mode

    ######################################################################################
    How to Install Oracle Grid Infrastructure Standalone ASM in Silent Mode (Doc ID 2052802.1)
    - Install GI Software and Create ASM Instance

    How to Use ASMCA in Silent Mode to Configure ASM For a Stand-Alone Server (Doc ID 1068788.1)
    - Already GI software Installed then this will helps creating ASM Instance only

    Silent or Manual Mode of Oracle Home Installation:
    https://mallik034.blogspot.com/2021/08/install-122-database-binaries-or-oracle.html

    12c or 19c Oracle Home Installation in Silent Mode or Manual Method:
    https://mallik034.blogspot.com/2022/11/12c-or-19c-oracle-home-installation-in.html

    Database Creating using dbca in Silent Mode Using Response file:
    https://mallik034.blogspot.com/2022/11/database-creating-using-dbca-in-silent.html

    Silent or Manual Mode of Database Creation:
    https://mallik034.blogspot.com/2022/06/manual-database-creation-or-silent-mode.html

    ######################################################################################

    It is assumed that you carry out all the prerequisites to install standalone ASM in your server. 
    The scope is to outline the steps to approach the installation in the event of non availability of GUI / X Windows.

    1. Prepare the cluster node  for Oracle Grid Infrastructure Standalone ASM.

    (a)  User Accounts
    NOTE: We recommend different users for the installation of the Grid Infrastructure (GI) and the Oracle RDBMS home. 
    The GI will be installed in a separate Oracle base, owned by user 'grid.' 
    After the grid install the GI home will be owned by root, and inaccessible to unauthorized users.

    Create OS groups using the command below. Enter these commands as the 'root' user:

    #/usr/sbin/groupadd -g 501 oinstall
    #/usr/sbin/groupadd -g 502 dba
    #/usr/sbin/groupadd -g 504 asmadmin
    #/usr/sbin/groupadd -g 506 asmdba
    #/usr/sbin/groupadd -g 507 asmoper

    (b) Create the users that will own the Oracle software using the commands:
    #/usr/sbin/useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid

    (b) Set the password for the grid account using the following command. Replace "password" with your own password.
    # passwd grid
    Changing password for user grid.
    New UNIX password: <password>
    retype new UNIX password: <password>
    passwd: all authentication tokens updated successfully.

    (c) Create the Oracle Inventory Directory
    To create the Oracle Inventory directory, enter the following commands as the root user:

    # mkdir -p /u01/app/oraInventory
    # chown -R grid:oinstall /u01/app/oraInventory
    # chmod -R 775 /u01/app/oraInventory

    (d) Creating the Oracle Grid Infrastructure Base and  Home Directory
    To create the Grid Infrastructure home directory, enter the following commands as the root user:

    # mkdir -p /u01/app/grid
    # mkdir -p /u01/app/12.1.0.2/grid
    # chown -R grid:oinstall /u01/app/grid
    # chown -R grid:oinstall /u01/app/12.1.0.2/grid
    # chmod -R 775 /u01/app/12.1.0.2/grid

    (e) Installing and Configuring ASMLib (You can skip this step, if you are not using ASM or Linux)
    Note : You can either install ASM or You can use udev rules to configure ASM disks. ASMLib automatically provides LUN persistence, so when using ASMLib there is no need to manually configure LUN persistence for the ASM devices on the system.

    Download the following packages from the ASMLib OTN page, if you are an Enterprise Linux customer you can obtain the software through the Unbreakable Linux network.

    NOTE: The ASMLib kernel driver MUST match the kernel revision number, the kernel revision number of your system can be identified by running the "uname -r" command. Also, be sure to download the set of RPMs which pertain to your platform architecture, in our case this is x86_64.

    [root@<host> ~]# uname -a
    Linux <host> 3.8.13-55.1.5.el6uek.x86_64 #2 SMP Wed Jan 28 17:03:28 PST 2015 x86_64 x86_64 x86_64 GNU/Linux

    [root@<host> ~]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 6.7 (Santiago)

    oracleasm-support-2.1.8-1.el6.x86_64
    kmod-oracleasm-2.0.8-5.el6_7.x86_64
    oracleasmlib-2.0.12-1.el6.x86_64

    Configure ASMLib by running the following as the root user:

    #/etc/init.d/oracleasm configure
    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
    Initializing the Oracle ASMLib driver: [ OK ]
    Scanning the system for Oracle ASMLib disks: [ OK ]

    Using ASMLib to Mark the Shared Disks as Candidate Disks 

    To create ASM disks using ASMLib:
    As the root user, use oracleasm to create ASM disks using the following syntax:

    # /usr/sbin/oracleasm createdisk disk_name device_partition_name

    e.g
    #/usr/sbin/oracleasm createdisk DATA1 /dev/xvde1
    #/usr/sbin/oracleasm createdisk DATA2 /dev/xvdf1
    After you have created all the ASM disks for your cluster, use the listdisks command to verify their availability:

    [root@<host> ~]# /usr/sbin/oracleasm listdisks
    DATA1
    DATA2

    Note :-
    For other Unix platforms, please ensure that the ASM disks are created with proper permission

    2. Install the Grid Infrastructure Standalone with below steps in silent mode:-

    [grid@<host> ~]$ cd /stage/core/LINUX/X86-64/64bit/rdbms/12.1.0.2.0/grid/

    [grid@<host> ~]$ ./runInstaller -silent \
    INVENTORY_LOCATION=/u01/app/oraInventory \
    SELECTED_LANGUAGES=en \
    ORACLE_BASE=/u01/app/grid \
    ORACLE_HOME=/u01/app/12.1.0.2/grid \
    oracle.install.option=HA_CONFIG \
    oracle.install.asm.OSDBA=asmdba \
    oracle.install.asm.OSOPER=asmoper \
    oracle.install.asm.OSASM=asmadmin \
    oracle.install.crs.config.autoConfigureClusterNodeVIP=false \
    oracle.install.asm.diskGroup.name=DATA1 \
    oracle.install.asm.diskGroup.redundancy=EXTERNAL \
    oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/* \
    oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/DATA2 \
    oracle.install.asm.SYSASMPassword=<password> \
    oracle.install.asm.monitorPassword=<password>

    You can substitute diskDiscoveryString with ORCL:*
    oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/* \                   <<<<<< ORCL:*
    oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/DATA2 \  <<<<<< ORCL:DATA1,ORCL:DATA2
    Starting Oracle Universal Installer...

    Checking Temp space: must be greater than 415 MB. Actual 5420 MB Passed
    Checking swap space: must be greater than 150 MB. Actual 1950 MB Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-11-21_09-33-59PM. Please wait ...[grid@<host> grid]$ [WARNING] [INS-32018] The selected Oracle home is outside of Oracle base.
    ACTION: Oracle recommends installing Oracle software within the Oracle base directory. Adjust the Oracle home or Oracle base accordingly.

    You can find the log of this install session at:
    /u01/app/oraInventory/logs/installActions2015-11-21_09-33-59PM.log
    The installation of Oracle Grid Infrastructure 12c was successful.
    Please check '/u01/app/oraInventory/logs/silentInstall2015-11-21_09-33-59PM.log' for more details.

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

    1. /u01/app/oraInventory/orainstRoot.sh
    2. /u01/app/12.1.0.2/grid/root.sh

    Run the script on the local node.

    Successfully Setup Software.
    As install user, execute the following script to complete the configuration.
    1. /u01/app/12.1.0.2/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file>

    Note:
    1. This script must be run on the same host from where installer was run.
    2. This script needs a small password properties file for configuration assistants that require passwords (refer to install guide documentation).

    Run following scripts with root:

    1. /u01/app/oraInventory/orainstRoot.sh
    2. /u01/app/12.1.0.2/grid/root.sh

    [root@<host> ~]# /u01/app/oraInventory/orainstRoot.sh
    Changing permissions of /u01/app/oraInventory
    Adding read,write permissions for group,Removing read,write,execute permissions for world.
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete

    [root@<host> crsconfig]# /u01/app/12.1.0.2/grid/root.sh
    Check /u01/app/12.1.0.2/grid/install/root_<host>_2015-11-21_21-43-23.log for the output of root script

    [grid@<host> ~]$ tail -100f /u01/app/12.1.0.2/grid/install/root_<host>_2015-11-21_21-43-23.log
    Performing root user operation.

    The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME= /u01/app/12.1.0.2/grid
    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: /u01/app/12.1.0.2/grid/crs/install/crsconfig_params
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    LOCAL ADD MODE
    Creating OCR keys for user 'grid', privgrp 'oinstall'..
    Operation successful.
    LOCAL ONLY MODE
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    CRS-4664: Node <host> successfully pinned.
    2015/11/21 21:43:36 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf'

    <host> 2015/11/21 21:43:55 /u01/app/12.1.0.2/grid/cdata/<host>/backup_20151121_214355.olr 0
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '<host>'
    CRS-2673: Attempting to stop 'ora.evmd' on '<host>'
    CRS-2677: Stop of 'ora.evmd' on '<host>' succeeded
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '<host>' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    CRS-4123: Oracle High Availability Services has been started.
    2015/11/21 21:46:04 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

    The final steps as per the silent installation mentioned above, configuration step will complete the installation (execute this as a grid software owner).

    Please create a configuration named cfgrsp.properties file containing 2 ASM passwords given as parameters to runInstaller:

    [grid@<host> ~]$ vi cfgrsp.properties
    oracle.assistants.asm|S_ASMPASSWORD=<password>
    oracle.assistants.asm|S_ASMMONITORPASSWORD=<password>

    [grid@<host> ~]$ /u01/app/12.1.0.2/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/cfgrsp.properties
    Setting the invPtrLoc to /u01/app/12.1.0.2/grid/oraInst.loc

    perform - mode is starting for action: configure

    ...

    INFO: Executing NETCA
    Nov 22, 2015 10:36:51 AM oracle.install.driver.oui.config.GenericInternalPlugIn invoke
    INFO: Command /u01/app/12.1.0.2/grid/bin/netca /orahome /u01/app/12.1.0.2/grid /orahnam OraGI12Home2 /instype typical /inscomp client,oraclenet,javavm,server,ano /insprtcl tcp /cfg local /authadp NO_VALUE /responseFile /u01/app/12.1.0.2/grid/network/install/netca_typ.rsp /silent /silent /ouiinternal
    ...

    INFO: Executing ASMCA
    Nov 22, 2015 10:36:54 AM oracle.install.driver.oui.config.GenericInternalPlugIn invoke
    INFO: Command /u01/app/12.1.0.2/grid/bin/asmca -silent -oui_internal -configureASM -diskString '/dev/oracleasm/disks/*' -diskGroupName DATA1 -diskList /dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/DATA2 -redundancy EXTERNAL -au_size 1
    ....

    perform - mode finished for action: configure

    You can see the log file: /u01/app/12.1.0.2/grid/cfgtoollogs/oui/configActions2015-11-22_10-36-46-AM.log 

     Validate whether the script has executed successfully by viewing below log file.

    [grid@<host> ~]$ tail -100f /u01/app/12.1.0.2/grid/cfgtoollogs/oui/configActions2015-11-22_10-36-46-AM.log
    ###################################################
    The action configuration is performing
    ------------------------------------------------------
    The plug-in Update CRS flag in Inventory is running
    The plug-in Update CRS flag in Inventory has successfully been performed
    ------------------------------------------------------
    ------------------------------------------------------
    The plug-in Oracle Net Configuration Assistant is running
    The plug-in Oracle Net Configuration Assistant has successfully been performed
    ------------------------------------------------------
    ------------------------------------------------------
    The plug-in Automatic Storage Management Configuration Assistant is running
    The plug-in Automatic Storage Management Configuration Assistant has successfully been performed
    ------------------------------------------------------
    ------------------------------------------------------
    The plug-in Oracle Cluster Verification Utility is running

    Performing post-checks for Oracle Restart configuration

    Checking Oracle Restart integrity...

    Oracle Restart integrity check passed

    Checking OLR integrity...
    Check of existence of OLR configuration file "/etc/oracle/olr.loc" passed
    Check of attributes of OLR configuration file "/etc/oracle/olr.loc" passed

    WARNING:
    This check does not verify the integrity of the OLR contents. Execute 'ocrcheck -local' as a privileged user to verify the contents of OLR.

    OLR integrity check passed

    Post-check for Oracle Restart configuration was successful.

    The plug-in Oracle Cluster Verification Utility has successfully been performed
    ------------------------------------------------------
    The action configuration has successfully completed
    ###################################################

    Verify the installation completed successfully and created the diskgroup

    [grid@<host> ~]$ crsctl check has
    CRS-4638: Oracle High Availability Services is online

    [grid@<host> ~]$ ocrcheck -local
    Status of Oracle Local Registry is as follows :
    Version : 4
    Total space (kbytes) : 409568
    Used space (kbytes) : 944
    Available space (kbytes) : 408624
    ID : 880213001
    Device/File Name : /u01/app/12.1.0.2/grid/cdata/localhost/<host>.olr
                                  Device/File integrity check succeeded

    Local registry integrity check succeeded

    Logical corruption check bypassed due to non-privileged user

    [grid@<host>1 ~]$ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name          Target    State               Server                     State details
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA1.dg
                      ONLINE  ONLINE            <host>         STABLE
    ora.LISTENER.lsnr
                      ONLINE  ONLINE            <host>         STABLE
    ora.asm
                      ONLINE  ONLINE           <host>         Started,STABLE
    ora.ons
                      ONLINE  ONLINE            <host>         STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.cssd
    1                 ONLINE  ONLINE            <host>         STABLE
    ora.diskmon
    1                 OFFLINE OFFLINE                                STABLE
    ora.evmd
    1                 ONLINE  ONLINE            <host>         STABLE
    --------------------------------------------------------------------------------
    [grid@<host> ~]$

    [grid@<host> ~]$ sqlplus / as sysasm

    SQL*Plus: Release 12.1.0.2.0 Production on Sun Nov 22 11:50:49 2015

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


    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
    With the Automatic Storage Management option

    SQL> set pages 40000 lines 120
    SQL> col PATH for a30
    SQL> col DG_NAME for a15
    SQL> col DG_STATE for a10
    SQL> col FAILGROUP for a10
    SQL> select dg.name dg_name, dg.state dg_state, dg.type, d.disk_number dsk_no, d.path, d.mount_status, d.FAILGROUP, d.state
    from v$asm_diskgroup dg, v$asm_disk d
    where dg.group_number=d.group_number
    order by dg_name, dsk_no; 

    DG_NAME DG_STATE TYPE DSK_NO PATH MOUNT_S FAILGROUP STATE
    --------------- ---------- ------ ---------- ------------------------------ ------- ---------- --------
    DATA1 MOUNTED EXTERN 0 /dev/oracleasm/disks/DATA1 CACHED DATA1_0000 NORMAL
    DATA1 MOUNTED EXTERN 1 /dev/oracleasm/disks/DATA2 CACHED DATA1_0001 NORMAL


    No comments:

    Post a Comment

    🌟 Proud to be an Oracle ACE Pro! 🚀

    🌟 Proud to be an Oracle ACE Pro! 🚀 I’m excited to share my official Oracle ACE Profile with the Oracle community. 👨‍💻 Mallikarjun ...