Pages

Saturday, April 27, 2013

Create ASM instance

$ export ORACLE_BASE=/u01/app/oracle
$ export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid
$ orapwd file=$ORACLE_HOME/dbs/orapwd+ASM password= entries=20
$ mkdir -p $ORACLE_BASE/admin/+ASM
$ cd $ORACLE_BASE/admin/+ASM

Create init+ASM.ora file.

+ASM.__large_pool_size=20971520
+ASM.__shared_pool_size=515899392
##+ASM.asm_diskgroups='DATADG','FRADG'  #Manual Dismount
*.asm_power_limit=1
*.diagnostic_dest='/u01/app/oracle'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
$ export ORACLE_SID=+ASM
$ sqlplus / as sysasm

SQL> startup nomount pfile='$ORACLE_HOME/dbs/init+ASM'

Saturday, April 20, 2013

Creating ASM Disks

The ASM will be created on unformatted disk partitions.

As the root user, determine which devices can be partitioned.
# cat /proc/partitions

Create the partition for each disk. Select n for action, p for primary partition, 1 for partition number, default values for First and Last cylinder and w to write the partition table.
# fdisk /dev/sda

Configure Oracle ASM library driver. Answer default user and group as oracle and dba, y for Start Oracle ASM library driver on boot, y for Scan for Oracle ASM disks on boot.
# oracleasm configure -i

Load Oracle ASM module and mount oracleasm filesystem /dev/oracleasm.
# oracleasm init

Create ASM disk label for each disk.
# oracleasm createdisk DATA1 /dev/sda1

Check the disks are visible.
# oracleasm listdisks

Check the disks are mounted in oracleasm filesystem.
# ls -l /dev/oracleasm/disks