Add Disk to Existing Asm Diskgroup

Hello Friend's,

In this post we will discuss about how to add disk to existing diskgroup

Step1 : check the existing diskgroup and and current size


ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 25592 14200 0 14200 0 N DATA/
MOUNTED EXTERN N 512 512 4096 4194304 15356 2356 0 2356 0 N FRA/

Disk to be added taken from linux team :


Disk /dev/sdd: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Format the disk :


[root@dm10db11 ~]# fdisk /dev/sdd
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xa6320499.

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519):
Using default value 20971519
Partition 1 of type Linux and of size 10 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Create disk at os level :


[root@dm10db11 ~]# oracleasm createdisk disk1 /dev/sdd1
Writing disk header: done
Instantiating disk: done

[root@dm10db11 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@dm10db11 ~]#
[root@dm10db11 ~]# oracleasm listdisks
DATA
DISK1
FRA

Check for provisioned disk and add disk


[grid@dm10db11 ~]$ sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 22 02:23:03 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>
SQL>
SQL>--Check for PROVISIONED (candidate) disk to be added--
SQL> set pagesize 2000
set lines 2000
set long 999
col path for a54
select name, path, header_status, total_mb free_mb, trunc(bytes_read/1024/1024) read_mb, trunc(bytes_written/1024/1024) write_mb from v$asm_disk;SQL> SQL> SQL> SQL>

NAME PATH HEADER_STATU FREE_MB READ_MB WRITE_MB
------------------------------ ------------------------------------------------------ ------------ ---------- ---------- ----------
/dev/oracleasm/disks/DISK1 PROVISIONED 0
FRA_0000 /dev/oracleasm/disks/FRA MEMBER 15356 1 0
DATA_0000 /dev/oracleasm/disks/DATA MEMBER 25592 2 0

SQL>
SQL>--Command to add disk to diskgroup DATA--
SQL> alter diskgroup DATA add disk '/dev/oracleasm/disks/DISK1';

Diskgroup altered.

Now check the disks again :


SQL> set pagesize 2000
set lines 2000
set long 999
col path for a54
select name, path, header_status, total_mb free_mb, trunc(bytes_read/1024/1024) read_mb, trunc(bytes_written/1024/1024) write_mb from v$asm_disk;SQL> SQL> SQL> SQL>

NAME PATH HEADER_STATU FREE_MB READ_MB WRITE_MB
------------------------------ ------------------------------------------------------ ------------ ---------- ---------- ----------
FRA_0000 /dev/oracleasm/disks/FRA MEMBER 15356 1 0
DATA_0000 /dev/oracleasm/disks/DATA MEMBER 25592 5534 2304
DATA_0001 /dev/oracleasm/disks/DISK1 MEMBER 10236 0 3237

it's Added :

ASMCMD> lsdsk
Path
/dev/oracleasm/disks/DATA
/dev/oracleasm/disks/DISK1
/dev/oracleasm/disks/FRA
ASMCMD>
ASMCMD>
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 35828 24424 0 24424 0 N DATA/
MOUNTED EXTERN N 512 512 4096 4194304 15356 14520 0 14520 0 N FRA/
Previous
Next Post »