With Oracle Linux 5, we still perform the oracle-validated RPM installations. After we perform the oracle-validated configuration, there are quite of bit of tasks that still need to be performed to bring the Linux server to an environment that is suitable for an enterprise Grid and Database installation.

The following steps provide detailed steps to configure your Linux server in order to effectively prepare and install the Grid Infrastructure software and creating an ASM instance. More importantly, the steps are all performed with command line options without the need for X-Windows or other GUI requirements.

First, modify oracleasm configuration file and set the Oracle ASM UID and GID to comply with your corporate policies. In this environment, we are still using oracle and dba as our UID and GID for Oracle ASM.
vi /etc/sysconfig/oracleasm
Modify the following two lines in a VM environment. In a virtualized infrastructure, you will not need to modify the SCANBOOT or SCANORDER options to the configuration file:

ORACLEASM_UID=oracle
ORACLEASM_GID=dba

Next issue the commands below to confirm our settings:

# oracleasm configure
ORACLEASM_ENABLED=false
ORACLEASM_UID=oracle
ORACLEASM_GID=dba
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"

Next, re-initialize oracleasm to pickup the changes. We need the disk ownership in the /dev/oracleasm/disks directory to be owned by oracle; otherwise, all the oracle utilities will not recognize any of the ASM disks:


# oracleasm exit; oracleasm init
Unmounting ASMlib driver filesystem: /dev/oracleasm
Unloading module "oracleasm": oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm

Scan disks to re-discover the disks:


# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "DATA1"
Instantiating disk "DATA2"
Instantiating disk "DATA3"
Instantiating disk "DATA4"
Instantiating disk "FRA1"

You need to manually download, upload and install the oracleasmlib package manually. It does not pull down via “yum install oracleasmlib”. Without this RPM, you will have not have the oracleasm-discover executable. Without this executable, you will have to use /dev/oracleasm/disks instead of ORCL:* disks for your ASM discovery string.

# ls -ltr
total 36
-rw-r--r-- 1 oracle dba 14176 Jun 23 09:00 oracleasmlib-2.0.4-1.el5.x86_64.rpm
-rwx------ 1 oracle dba   241 Jun 24 12:00 asmca.sh

# rpm -ihv oracleasmlib-2.0.4-1.el5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:oracleasmlib           ########################################### [100%]

Create ASM instance in silent mode

$ cat asmca.sh
/u01/app/oracle/product/11.2.0/grid/bin/asmca -silent -configureASM \
  -sysAsmPassword oracle123 \
  -asmsnmpPassword oracle123 \
  -diskstring \'ORCL:*\' \
  -diskGroupName DATA \
  -disk \'ORCL:DATA1\' \
  -au_size 4 \
  -redundancy external;


$ ./asmca.sh

ASM created and started successfully.

DiskGroup DATA created successfully.

Add more disks to the ASM Data Disk Group:

SQL> alter diskgroup data add disk 'ORCL:DATA2', 'ORCL:DATA3', 'ORCL:DATA4' rebalance power 11 wait;

Diskgroup altered.

Create the FRA Disk Group:


  1* create diskgroup fra external redundancy disk 'ORCL:FRA1' attribute 'au_size'='4M'
SQL> /

Diskgroup created.

Posted by Charles Kim, Oracle ACE Director and VMware vExpert

Posted in ASM
Share this post, let the world know

Comments are closed