©2015 -
Oracle 12c ASM Installation and Configuration -
NOTE: If the raw disk had a different naming convention, you may add that to asm_diskstring so that it can be seen by the ASM.
For example, if I had the new disks as -
SQL> alter system set asm_diskstring='/dev/rdsk/asm*','/dev/rdsk/ssd_asm*' scope=both;
In that way, the new disks can now be seen by the ASM as 'CANDIDATE'.
Moving forward, let's add the new disk to DATA_DG group. The rebalance power has a maximum of 11, adjustments are proportional to the
performance impact on your storage.
SQL> alter diskgroup DATA_DG add
2 failgroup A disk '/dev/rdsk/asmdata05_c1t7d0s6'
3 failgroup B disk '/dev/rdsk/asmdata06_c1t8d0s6' rebalance power 10;
Diskgroup altered.
SQL>
Once the SQL statement above was executed, you may monitor the progress of rebalancing by querying the view V$ASM_OPERATION.
SQL> column group format a12
SQL> select g.name "GROUP", o.operation "OPERATION", o.state "STATE", o.power "POWER", o.est_minutes "EST MINUTES"
2 from v$asm_operation o, v$asm_diskgroup g
3 where o.group_number = g.group_number;
GROUP OPERATION STATE POWER EST_MINUTES
-
DATA_DG REBAL RUN 10 7
Continue executing the query above until no rows are returned which would indicate the rebalancing has completed.
HOW TO DROP DISKS FROM A DISK GROUP
Besides a bad disk, some of the reasons as to why we need to drop disks from a disk group is related to migrating
your data onto a newer drive such as replacing the current hard drive with SSD.
If you are doing raw disk migration, you first need to add the new raw disk to your disk group and make sure that the size
of your new raw disks matches the old one. Perform the procedure of adding the disk to a disk group as I had discussed previously.
Make sure that before you proceed with dropping the old disks, the rebalance of the additional disk had completed its tasks.
An example to drop a disk:
SQL> alter diskgroup DATA_DG drop disk DATA_DG_0000, DATA_DG_0002 rebalance power 10;
Diskgroup altered.
SQL>
Then, check the progress of rebalancing by runing the following query:
SQL> column group format a12
SQL> select g.name "GROUP", o.operation "OPERATION", o.state "STATE", o.power "POWER", o.est_minutes "EST MINUTES"
2 from v$asm_operation o, v$asm_diskgroup g
3 where o.group_number = g.group_number;
Once the rebalancing has completed, you can then remove the associated hard drive.
ASMCMD COMMAND INSTANCE MANAGEMENT
shutdown Shuts down an Oracle ASM instance.
startup Starts up an Oracle ASM instance.
lsct Lists information about current Oracle ASM clients.
lsop Lists the current operations on a disk group or Oracle ASM instance.
showclustermode Displays the current mode of the Oracle ASM cluster.
showclusterstate Displays the current state of the cluster.
showversion Displays the Oracle ASM cluster release and software patch levels.
For additional commands and syntax, refer to Oracle 12c online doc -
ORATAB
The oratab has an entry +ASM instance. An active 12c ASM instance causes hanging during installation on certain database software of lower version. You need to shutdown the ASM instance and comment the oratab +ASM entry and stop the ohasd using the script found in /etc/rc3.d in order for the install to be successful. This behavior has been observed when installing Oracle 10g R2.