DBA Hub

📋Steps in this guide1/6

Adding new disk to ASM diskgroup - DBACLASS DBACLASS

Adding a disk to an ASM diskgroup is really simple, just an alter command. But when if you are doing this in a production database, then before adding we have to make sure that the disk is healthy. We will follow below steps to confirm that the disk is healthy. 1.First, create the disk using […]

oracle clusteringintermediate
by OracleDba
12 views
1

Overview

Adding a disk to an ASM diskgroup is really simple, just an alter command. But when if you are doing this in a production database, then before adding we have to make sure that the disk is healthy. 1.First, create the disk using ASMLIB NOTE – If this is Solaris or HP, then the 1st step is not required, as it doesn’t need ASMLIB. 2. Check the visibility of the disks at OS level:( as grid owner from all the nodes)

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
# /etc/init.d/oracleasm createdisk DATA02 /dev/mapper/mpathagp1
Marking disk "DATA02" as an ASM disk:                      [  OK  ]

-- Do scandisk on the all the nodes (if RAC)

/etc/init.d/oracleasm scandisks

-- check whether the disk DATA02 has been created .

/etc/init.d/oracleasm listdisk
2

Section 2

3. Use kfed to read the disks:(as grid owner from all the nodes) If you are getting an error like kfbh.type: 0 ; 0x002: KFBTYP_INVALID , then you can ignore it safely.

Code/Command (click line numbers to comment):

1
2
3
dd if=/dev/oracleasm/disks/DATA02 of=/dev/null count=100 bs=8192

kfed read /dev/oracleasm/disks/DATA02
3

Section 3

4. Now create a diskgroup for testing purpose: 5. Create a tablespace on this diskgroup:

Code/Command (click line numbers to comment):

1
CREATE DISKGROUP TESTDG EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/DATA02';
4

Section 4

As tablespace created, we can confirm that the disk is healthy. We can clean the diskgroup. 6.Let’s drop the tablespace and the diskgroup:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
SQL>Create tablespace TEST_TS datafile '+TESTDG' size 5G;

Tablespace created

DROP TABLESPACE TEST_TS;

ALTER DISKGROUP TESTDG DISMOUNT; --(from all the ASM instances, except from one). 

DROP DISKGROUP TESTDG; --(from the ASM instance, which the diskgroup is still mounted).
5

Section 5

> If you try to drop the diskgroup, without dismounting the diskgroup from all instance, except one, then you will hit the error. ORA-15073: diskgroup TESTDG is mounted by another ASM instance If you try to drop the diskgroup, without dismounting the diskgroup from all instance, except one, then you will hit the error. ORA-15073: diskgroup TESTDG is mounted by another ASM instance Now we have cleaned up diskgroup, after confirming that disk is perfectly healthy. So let’s proceed and add that disk to your required existing diskgroup. 7.Add the disk to existing diskgroup:
6

Section 6

> UTILITY can also be used for adding, dropping, dismount ASM disk/disk groups. Also Read : ASMCA Utility in  oracle UTILITY can also be used for adding, dropping, dismount ASM disk/disk groups. Also Read : ASMCA Utility in  oracle

Code/Command (click line numbers to comment):

1
SQL> ALTER DISKGROUP PROD_DG  ADD DISK '/dev/oracleasm/disks/DATA02';

Comments (0)

Please to add comments

No comments yet. Be the first to comment!