Sunday, January 13, 2013

ORACLE - ASM

Step 1: Down load rpm and installed at all node if RAC : (as a root)
For Unbreakable
rpm -Uvh oracleasm-support-2.1.4-1.el5.x86_64.rpm \
         oracleasmlib-2.0.4-1.el5.x86_64.rpm \
         oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm
warning: oracleasm-support-2.1.3-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-support      ########################################### [ 33%]
   2:oracleasm-2.6.18-128.el########################################### [ 67%]
   3:oracleasmlib           ########################################### [100%]

Step 2 - configure asm: (both node if RAC): /etc/init.d/oracleasm configure :(as a root)

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
Initializing the Oracle ASMLib driver:  [  OK  ]
Scanning the system for Oracle ASMLib disks:  [  OK  ]

3) Check asm status :
/etc/init.d/oracleasm status
/etc/init.d/oracleasm listdisks
/etc/init.d/oracleasm enable

4) Create ASM disks:
# /etc/init.d/oracleasm createdisk DISK01 /dev/dm01
Marking disk "/dev/dm01" as an ASM disk:                   [  OK  ]
# /etc/init.d/oracleasm createdisk DISK02 /dev/dm02
Marking disk "/dev/dm02" as an ASM disk:                   [  OK  ]

5) Scan disk on other nodes:
/etc/init.d/oracleasm scandisks

6) Create disk group, add and drop:
CREATE DISKGROUP jdata01 EXTERNAL REDUNDANCY DISK 'ORCL:DATA01';
ALTER DISKGROUP jdata01 ADD DISK 'ORCL:DISK02';
ALTER DISKGROUP jdata01 DROP DISK DISK02;

7) Verification:
1) select group_number,name,state,total_mb,free_mb, usable_file_mb, type from v$asm_diskgroup GROUP_NUMBER NAME   STATE         TOTAL_MB    FREE_MB USABLE_FILE_MB TYPE
------------ ------------------------------ ----------- ---------- ---------- --------------------------------------
           3 JDATA01      MOUNTED       102398      95565          95565             EXTERN
 

2) select * from v$asm_operation;
GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE
------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- -----------
           1 REBAL RUN           1          1      34578      75081       2498          16

8) Configuring the scan order: Oracle ASMLib configuration file is located at /etc/sysconfig/oracleasm.
# This is a configuration file for automatic loading of the Oracle
# Automatic Storage Management library kernel driver.  It is generated
# By running /etc/init.d/oracleasm configure.  Please use that method
# to modify this file
#

# ORACLEASM_ENABELED: 'true' means to load the driver on boot.
ORACLEASM_ENABLED=true

# ORACLEASM_UID: Default user owning the /dev/oracleasm mount point.
ORACLEASM_UID=oracle

# ORACLEASM_GID: Default group owning the /dev/oracleasm mount point.
ORACLEASM_GID=dba

# ORACLEASM_SCANBOOT: 'true' means scan for ASM disks on boot.
ORACLEASM_SCANBOOT=true

# ORACLEASM_SCANORDER: Matching patterns to order disk scanning
ORACLEASM_SCANORDER=""

# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan
ORACLEASM_SCANEXCLUDE=""

No comments:

Post a Comment