CREATING THE DISK GROUP IN COMMAND PROMPT


+ASM1> sqlplus / as sysasm
SQL*Plus: Release 11.2.0.2.0 Production on Tue Dec 13 16:02:22 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> CREATE DISKGROUP ANAR_TEST EXTERNAL REDUNDANCY
DISK '/dev/oracleasm/disks/DG_ANAR_TEST',
'/dev/oracleasm/disks/DG_ANAR_TEST1',
'/dev/oracleasm/disks/DG_ANAR_TEST2' ATTRIBUTE 'au_size'='4M',
'compatible.asm' = '11.2.0.2.0',
'compatible.rdbms' = '11.2.0.2.0',
'compatible.advm' = '11.2.0.2.0';
Diskgroup created.
SQL> select * from v$asm_diskgroup where name='ANAR_TEST';
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE
------------ ------------------------------ ----------- ----------
ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB
-------------------- ----------- ------ ---------- ---------- -----------
COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS
------------ ----------------------- -------------- -------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY V
------------------------------------------------------------ -
 32 ANAR_TEST 512 4096
 4194304 MOUNTED EXTERN 6144 6004 0
 140 0 6004 0
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE
------------ ------------------------------ ----------- ----------
ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB
-------------------- ----------- ------ ---------- ---------- -----------
COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS
------------ ----------------------- -------------- -------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY V
------------------------------------------------------------ -
11.2.0.2.0
11.2.0.2.0 N
ON NODE#2 if you run the same queries on the second node, it shows there is no disk group with the name. When I check further on the issue, I found that we need to manual mount in all the cluster nodes.
SQL> select * from v$asm_diskgroup where name='ANAR_TEST';
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE
------------ ------------------------------ ----------- ----------
ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB
-------------------- ----------- ------ ---------- ---------- -----------
COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS
------------ ----------------------- -------------- -------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY V
------------------------------------------------------------ -
 0 ANAR_TEST 0 4096
 0 DISMOUNTED 0 0 0
 0 0 0 0
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE
------------ ------------------------------ ----------- ----------
ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB
-------------------- ----------- ------ ---------- ---------- -----------
COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS
------------ ----------------------- -------------- -------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY V
------------------------------------------------------------ -
0.0.0.0.0
0.0.0.0.0 N
WHEN I TRY TO DISMOUNT DISK GROUP, I GOT AN ERROR SAYING THAT THERE IS NO DISK AVAILABLE ON THE NODE
SQL> alter diskgroup ANAR_TEST dismount;
alter diskgroup ANAR_TEST dismount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15001: diskgroup "ANAR_TEST" does not exist or is not mounted
THEN MOUNT THE DISK GROUP
SQL> alter diskgroup ANAR_TEST mount;
Diskgroup altered.
SQL> select * from v$asm_diskgroup where name='ANAR_TEST';
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE
------------ ------------------------------ ----------- ----------
ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB
-------------------- ----------- ------ ---------- ---------- -----------
COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS
------------ ----------------------- -------------- -------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY V
------------------------------------------------------------ -
 32 ANAR_TEST 512 4096
 4194304 MOUNTED EXTERN 6144 6004 0
 140 0 6004 0
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE
------------ ------------------------------ ----------- ----------
ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB
-------------------- ----------- ------ ---------- ---------- -----------
COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS
------------ ----------------------- -------------- -------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY V
------------------------------------------------------------ -
11.2.0.2.0
11.2.0.2.0 N
SQL>
NOTE#
I have the DISK GROUP is automatically added in the cluster registry.
oracle +ASM1 bhuora02> crsctl stat res ora.ANAR_TEST.dg -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS 
----------------------------------------------------------------------------
Local Resources
----------------------------------------------------------------------------
ora.ANAR_TEST.dg
 ONLINE ONLINE azdb02 
 ONLINE ONLINE azdb01
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: