Tuesday 31 May 2016

How to ADD DISK GROUP in ORACLE ASM

How to ADD DISK GROUP in ORACLE ASM
Step.1  System Admin will add the disk on the server which should be visible on all the database nodes.
DBA can check using the below command on the path.
Example:  DISK PATH
/dev/oracleasmdisk
bash-4.3# ll
crwxrwxrwx   1 oragrid    oinstall    13 0x000011 Mar 29 11:31 archivdisk
crwxrwxrwx   1 oragrid    oinstall    13 0x000012 Mar 27 17:05 prddata1disk
crwxrwxrwx   1 oragrid    oinstall    13 0x000027 Mar 23 07:11 prddata2disk
crwxrwxrwx   1 oragrid    oinstall    13 0x00002f Mar 29 08:24 prddata3disk   >>> New Added Disk
crwxrwxrwx   1 oragrid    oinstall    13 0x000026 May  1  2014 prdflash
crwxrwxrwx   1 oragrid    oinstall    13 0x000014 Mar 20 21:02 prdinfradisk
crwxrwxrwx   1 oragrid    oinstall    13 0x000013 Mar 27 17:05 proddatadisk
We check the same disk on all database instance.
Step.2 Login on any database instance using grid user and connect in ASM using SQLPLUS.
Example:-
bash-4.3$ id
uid=112(oragrid) gid=107(oinstall) groups=503(asmadmin),504(asmdba),505(asmoper)
bash-4.3$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 29 11:56:33 2016
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options              
SQL> select name, path, header_status from v$asm_disk;
NAME
PATH
HEADER_STATUS
PRODARCH_0000
/dev/oracleasmdisk/prddata3disk
CANDIDATE
After add disk Header status
PRODDATA1_0000
/dev/oracleasmdisk/archivdisk
MEMBER
PRODINFRA_0000
/dev/oracleasmdisk/prddata1disk
MEMBER
PRODDATA_0000
/dev/oracleasmdisk/prdinfradisk
MEMBER
PRODFLASH1
/dev/oracleasmdisk/prdflash
MEMBER
PRODDATA_0001
/dev/oracleasmdisk/prddata2disk
MEMBER


Step.3 Login using oragrid user and connect through sqlplus / as sysasm . Please follow the below steps.
Example:
SQL> CREATE DISKGROUP PRODDATA2 EXTERNAL REDUNDANCY DISK '/dev/oracleasmdisk/prddata3disk';
 >>>>>.. Execute it on one node
SQL>ALTER DISKGROUP PRODDATA2 mount;
<< Run the mount command in the other remaining two nodes.
Step.4 After add the disk in ASM check the header status result should be like below example.
SQL> select name, path, header_status from v$asm_disk;
NAME
PATH
HEADER_STATUS
PRODARCH_0000
/dev/oracleasmdisk/prddata3disk
MEMBER
Now header status should be member
PRODDATA1_0000
/dev/oracleasmdisk/archivdisk
MEMBER
PRODINFRA_0000
/dev/oracleasmdisk/prddata1disk
MEMBER
PRODDATA_0000
/dev/oracleasmdisk/prdinfradisk
MEMBER
PRODFLASH1
/dev/oracleasmdisk/prdflash
MEMBER
PRODDATA_0001
/dev/oracleasmdisk/prddata2disk
MEMBER

Step.5 Check the added disk in ASM is it mounted or not. You need to check on all 3 nodes.
bash-4.3$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N        1024   4096  1048576    819200   353910                0          353910              0             N  PRODARCH/
MOUNTED  EXTERN  N        1024   4096  1048576   2099200    63706                0           63706              0             N  PRODDATA/
MOUNTED  EXTERN  N        1024   4096  1048576   1740800     5276                0            5276              0             N  PRODDATA1/
MOUNTED  EXTERN  N        1024   4096  1048576    307200   228184                0          228184              0             N  PRODDATA2/
MOUNTED  EXTERN  N        1024   4096  1048576    512000   511852                0          511852              0             N  PRODFLASH/
MOUNTED  EXTERN  N        1024   4096  4194304    204800   204248                0          204248              0             Y  PRODINFRA/
Now you can add new datafiles or tablespace according your requirements.

If your database connected with other OEM application then disk group status will be show mounted until you do not add datafiles in the added disk.

No comments:

Post a Comment

OS Watcher Installation in RAC

 Step:1 Download and untar the oswbb812.tar under the grid user in RAC on the both nodes. Follow the OS Watcher User's Guide (Doc ID 153...