How to Add New Disk in ASM instance?

How to Add New Disk in ASM instance

In this article i’m going to show you how to add new disk in ASM instance step by step.

Steps to Add New Disk in ASM instance

First of all we need to plug a new hard disk in machine then make partition, follow below steps carefully.

Make a New Partition

Login with the root user: In my case my hard drive name is "/dev/sdb" it may be different in your case.

# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xd2973f79.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n
  <<<<<<-------------type n to make new partition
Command action
e extended
p primary partition (1-4)
p
                       <<<<<<-------------type p then enter
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-261, default 261):
Using default value 261
Command (m for help): w
    <<<<<<-------------type w for save
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

Now you have a new disk partition name is "/dev/sdb1", you can find and verify the partition using the below command.

# fdisk -l | grep "/dev/s"

Create ASM disk

Now Create ASM disk using above partition name.

# oracleasm createdisk NEWDISK1 /dev/sde1

Writing disk header: done
Instantiating disk: done

Check all disk name using following command.

# oracleasm listdisks

------------
CRSDISK1
DATADISK1
FRADISK1
NEWDISK1

Reboot Machine

Take reboot your machine and follow below steps.

Create ASM DiskGroup

After reboot login with grid user and run the following command, that command will create new diskgroup.

SQL> CREATE DISKGROUP DISK_GROUP_NAME EXTERNAL REDUNDANCY DISK '[YOUR DISK ADDRESS LIKE /dev/sde1]';

Now check the diskgroup.

SQL> SELECT STATE, NAME FROM V$ASM_DISKGROUP;

Mount DiskGroup

Now mount the diskgroup with ASM instance using below command.

SQL> ALTER DISKGROUP TEST MOUNT; 

Check it again.

SQL> SELECT STATE, NAME FROM V$ASM_DISKGROUP;

Now you can use it for store your data.

Read -
How to drop the ASM disk group?
How to migrate NON-ASM into ASM environment.

Connect with me on:

Instagram: https://www.instagram.com/shripaldba
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube:
https://www.youtube.com/ocptechnology

2 thoughts on “How to Add New Disk in ASM instance?

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top