Recently i was trying to clone my EBS 12.2.7 instance to new hosts. The new hosts had GRID/ASM running and i found out that the diskgroup doesn't have enough space to accommodate my EBS 12.2.7 database. Hence i had to expand my ASM diskgroup size.
Below are the step by step approach to do the same. I hope it will help somebody.
Find out the existing diskgroup
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
512 4096 4194304
61436 53376 0 53376 0 Y
DATA/
ASMCMD>
SQL> select group_number, name from v$asm_diskgroup;
GROUP_NUMBER NAME
------------ ------------------------------
1 DATA
check if there are any candidate disks or not
SQL> SELECT MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,TOTAL_MB,FREE_MB,NAME,PATH,LABEL
FROM V$ASM_DISK;
MOUNT_S HEADER_STATU MODE_ST STATE TOTAL_MB FREE_MB
------- ------------ ------- -------- ---------- ----------
NAME
------------------------------
PATH
--------------------------------------------------------------------------------
LABEL
-------------------------------
CACHED MEMBER ONLINE
NORMAL 61436 53364
DATA_0000
/dev/oracleasm/disks/DISK1
have partioned a new disk
/dev/sdg1
[root@rac1 ~]# oracleasm createdisk DISK2 /dev/sdg1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]#
[root@rac1 ~]# oracleasm listdisks
DISK1
DISK2
[root@rac1 ~]#
in node 2
[root@rac2 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "DISK2"
[root@rac2 ~]# oracleasm listdisks
DISK1
DISK2
[root@rac2 ~]#
SQL> SELECT NVL(a.name, '[CANDIDATE]')
disk_group_name , b.path
disk_file_path ,
b.name disk_file_name , b.failgroup
disk_file_fail_group FROM v$asm_diskgro
up a RIGHT OUTER JOIN v$asm_disk b USING (group_number) ORDER BY a.name;
DISK_GROUP_NAME DISK_FILE_PATH D
ISK_FILE_NAME DISK_FILE_FAIL_GROUP
------------------------------
-------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------------------------------------
------------------------------ -
-----------------------------
DATA /dev/oracleasm/disks/DISK1 D
ATA_0000
DATA_0000
[CANDIDATE]
/dev/oracleasm/disks/DISK2--new disk to be added to existing diskgroup
Please note:
Disks
that were discovered but that have not yet been assigned to a disk group have a
header status of either CANDIDATE or PROVISIONED.
CANDIDATE
Disk is not part of a disk group and may be
added to a disk group with the ALTER DISKGROUP statement
PROVISIONED
Disk is not part of a disk group and may be
added to a disk group with the ALTER DISKGROUP statement. The PROVISIONEDheader status is different
from the CANDIDATE header status in
that PROVISIONED implies that an
additional platform-specific action has been taken by an administrator to make
the disk available for Automatic Storage Management.
For example, on
Windows, the administrator used asmtool or asmtoolg to stamp the
disk with a header, or on Linux, the administrator used ASMLib to prepare the
disk for ASM.
Below are the
HEADER_STATUS in the v$ASM_DISK. I have taken below status from 11gR2.
· UNKNOWN - Automatic Storage Management disk
header has not been read
· CANDIDATE - Disk is not part of a disk group and may
be added to a disk group with the ALTER DISKGROUPstatement
· INCOMPATIBLE - Version number in the disk header is
not compatible with the Automatic Storage Management software version.
· PROVISIONED - Disk is not part of a disk group and may
be added to a disk group with the ALTER DISKGROUPstatement. The PROVISIONED header status is different from the CANDIDATE header status in that PROVISIONEDimplies that an additional platform-specific
action has been taken by an administrator to make the disk available for
Automatic Storage Management.
· MEMBER - Disk is a member of an existing disk
group. No attempt should be made to add the disk to a different disk group.
The ALTER
DISKGROUP statement will
reject such an addition unless overridden with the FORCE option
· FORMER - Disk was once part of a disk group but
has been dropped cleanly from the group. It may be added to a new disk group
with the ALTER
DISKGROUP statement.
· CONFLICT - Automatic Storage Management disk was not
mounted due to a conflict
· FOREIGN - Disk contains data created by an
Oracle product other than ASM. This includes datafiles, logfiles, and OCR
disks.
When adding a disk, the FORCE
option must be used if Oracle ASM
recognizes that the disk was
managed by Oracle. Such a disk appears
in the V$ASM_DISK view with a
status of FOREIGN.
SQL> alter diskgroup DATA add disk
'/dev/oracleasm/disks/DISK2';
Diskgroup altered.
SQL> SELECT NVL(a.name, '[CANDIDATE]') disk_group_name , b.path disk_file_path , b.name disk_file_name , b.failgroup disk_file_fail_group FROM
v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number) ORDER BY
a.name;
DISK_GROUP_NAME DISK_FILE_PATH DISK_FILE_NAME DISK_FILE_FAIL_GROUP
------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------ ------------------------------
DATA
/dev/oracleasm/disks/DISK2
DATA_0001
DATA_0001
DATA /dev/oracleasm/disks/DISK1
DATA_0000
DATA_0000
no candidate disks now
SQL> select name,TOTAL_MB/1024 total_gb,free_mb/1024
FREE_GB from v$asm_diskgroup;
NAME TOTAL_GB FREE_GB
------------------------------ ---------- ----------
DATA 149.988281 142.09375
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 Y
512 4096 4194304
153588 145504 0 145504 0 Y
DATA/