Oracle grid…unattended ;)

You can setup a reproducible installation of Oracle Grid in this way:
1- run the ./runInstaller in graphical mode;
2- have care to setup ssh pki authentication for both oracle and grid users;
3- save the configured setup in a response file;
4- eventually edit the response file setting the password;

Now run:

 grid$ ./runInstaller  -silent -ignorePrereq -responseFile /home/grid/ 

This will setup the whole thing without your interaction. Using -ignorePrereq forces the installation even if some requirement is not met, so check twice if the missing prerequisites are actually required ;)

At the end, you’ll be told to

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/
        2. /u01/app/11.2.0/grid/

Execute /u01/app/oraInventory/ on the following nodes: 
Execute /u01/app/11.2.0/grid/ on the following nodes: 
[db-01, db-02]

As install user, execute the following script to complete the configuration.
        1. /u01/app/11.2.0/grid/cfgtoollogs/configToolAllCommands

        1. This script must be run on the same system 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).

To check if your grid infrastructure correctly setup the Automatic Storage Management, take the ASM sid (eg. ASM1, ASM2, ..)

#pgrep -fl pmon.*ASM
24490 asm_pmon_+ASM1

Then list the diskgroupd with

#export ORACLE_SID=+ASM1
#export ORACLE_HOME=/u01/app/11.2.0/grid #!!!BEWARE!!! REMOVE THE TRAILING SLASH!!!
#asmcmd  lsdsk # all the devices
#asmcmd ls  # my diskgroup(s)

#asmcmd lsdg # with infos
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  1048576      3072     2146             1024             561              0             Y  OCRVOTE/