IT Tutorial

Oracle Automatic Storage Management ( ASM ) -2 Add Disk and Drop Disk Operations in Oracle ASM

Hi Guys,

In this article I will continue to explain Oracle Automatic Storage Management. Before reading this article, I suggest you read the previous article. “Oracle Automatic Storage Management -1





If you want to learn how to Install Oracle ASM, then read the following post.

Oracle Automatic Storage Management 18c Step by Step Installation -2





When the Oracle ASM is used, the concept of Disk group enters our lives. As the name implies, we store our data in Disk Groups where one or more disks come together instead of a single disk.


As mentioned in the previous article, the ASM instance is different from the Oracle Database instances. When we query the smon process as follows, “+ ASM” instance is listed as an instance.

To connect to ASM Instances, create an ASM Instance profile as follows.

After creating as above, we can set the profile as follows and we can now connect to ASM:

Or you can set ASM Instance profile as follows.
oracle:deveci01:/home/users/oracle:>  . oraenv
ORACLE_SID = [oracle] ? +ASM
The Oracle base has been set to /u01/app/oracle
[oracle@deveci ~]# 

asmcmd is a tool that we perform and monitor many disk operations.


We can connect and list disk groups and sizes, free spaces etc with LSDG command as follows.


We can also connect to ASM instances with “sqlplus / as sysasm” command and perform similar operations with queries.

You can add and remove disks to the ASM disk groups as follows.




First set the ASM profile:

Then we are connecting to the ASM Instance with the command “sqlplus / as sysasm”.



Run the following query to see disk groups in here:



If an ASM Disk has been mapped to the operating system(this is a storage-side operation.), they will appear in the following query. HEADER_STATUS = CANDIDATE are disks that could not be added.



Disks with HEADER_STATUS value CANDIDATE are disks that are not mapped to the operating system.




------- ------------ ------- -------- ---------- ---------- ----------- --------      ----------

CLOSED CANDIDATE     ONLINE   NORMAL  0          0                      /dev/rhdisk38

CLOSED CANDIDATE     ONLINE   NORMAL  0          0                      /dev/rhdisk39

CLOSED CANDIDATE     ONLINE   NORMAL  0          0                      /dev/rhdisk40

CACHED MEMBER        ONLINE   NORMAL   102399    17756      DATA_0000   /dev/rhdisk10

CACHED MEMBER        ONLINE   NORMAL   102399    17795      DATA_0001   /dev/rhdisk11

CACHED MEMBER        ONLINE   NORMAL   102399    17787      DATA_0002   /dev/rhdisk12

If you re-create a diskgroup you can use the following commands.

Firstly create this group, then add disks to disk group as follows.

If we created a new diskgroup on a 2-node RAC system, we should not forget to mount the diskgroup on the second node.



---------- ------------ -------  -------

1          1            DATA MOUNTED

1          2            RECO MOUNTED

2          1            DATA MOUNTED

2          0            RECO DISMOUNTED

SQL> alter diskgroup RECO mount;

Diskgroup altered.

---------- ------------ ------  -----------

1          1            DATA    MOUNTED

1          2            RECO    MOUNTED

2          1            DATA    MOUNTED

2          2            RECO    MOUNTED



Add the /dev/rhdisk12 disk to the RECO disk group:

We give the parallelism value of the rebalance operation and increase the speed of REBALANCE with the POWER parameter.




Set to 10 on busy systems can decrease performance in your databases.


If this parameter is not given, it takes the value of the ASM_POWER_LIMIT parameter by default.. ASM_POWER_LIMIT can take values from 0-11. The rebalance status can be monitored from the V$ASM_OPERATION view.


If this parameter is not given, it takes the value of the ASM_POWER_LIMIT parameter by default.

Apart from ASMCMD and sqlplus, you can also see disk groups and add and remove disk with asmca utility.



Add a disk with asmca:






A disk in the ASM disk group can be dropped as follows:

If the RAC is a database, all nodes should be checked and the same status should be seen in other nodes.

Drop a disk with asmca:



If you want to learn how to Install Oracle ASM, then read the following post.

Oracle Automatic Storage Management 18c Step by Step Installation -2


Do you want to learn Oracle Database for Beginners, then read the following articles.

 2,370 views last month,  1 views today

Exit mobile version