Hello Friend's,
This post will help you to add new disk to exisiting diskgroup (Oracle ASM)
So let's get started.
1. Create or Get the disk name from OS / Storage team.
2. Mark disk as ASM.
3. Check the new added disk as (PROVISIONED).
4. Add Disk to ASM diskgroup.
5. Rebalance status.
6. Newly added disk as member of diskgroup.
==============================Start of Steps=======================================1. Create or Get the disk name from OS / Storage team.
Get the Lun name from storage team.Lun Name – /dev/sdd
[root@dm21db01 ~]# 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 0x46aa6121.
Command (m for help): u
Changing display/entry units to cylinders (DEPRECATED!).
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 cylinder (1-1305, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305):
Using default value 1305
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.
2. Mark disk as ASM
[root@dm21db01 ~]# /usr/sbin/oracleasm createdisk FRA2 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@dm21db01 ~]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@dm21db01 ~]# /usr/sbin/oracleasm listdisks
DATA1
FRA
FRA2
[root@dm21db01 ~]#
[root@dm21db01 ~]#
3. Check the new added disk as (PROVISIONED)
[grid@dm21db01 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM
The Oracle base has been set to /oracle/app/grid
[grid@dm21db01 ~]$
[grid@dm21db01 ~]$
[grid@dm21db01 ~]$ sqlplus / as sysasm
SQL*Plus: Release 21.0.0.0.0 - Production on Mon Dec 6 19:19:03 2021
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL> set lines 999;
col diskgroup for a15
col diskname for a15
col path for a35
select a.name DiskGroup,b.name DiskName, b.total_mb, (b.total_mb-b.free_mb) Used_MB, b.free_mb,b.path,b.header_status
from v$asm_disk b, v$asm_diskgroup a
where a.group_number (+) =b.group_number
order by b.group_number,b.name;SQL> SQL> SQL> SQL> 2 3 4
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
--------------- --------------- ---------- ---------- ---------- ----------------------------------- ------------
0 0 0 /dev/oracleasm/disks/FRA2 PROVISIONED
DATA DATA_0000 20472 4180 16292 /dev/oracleasm/disks/DATA1 MEMBER
FRA FRA_0000 10232 1252 8980 /dev/oracleasm/disks/FRA MEMBER
4. Add Disk to ASM diskgroup
SQL> alter diskgroup FRA add disk '/dev/oracleasm/disks/FRA2' name FRA_0001 rebalance power 10;
Diskgroup altered.
5. Rebalance status.
SQL> select * from v$asm_operation
2 ;
GROUP_NUMBER OPERA PASS STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE CON_ID
------------ ----- --------- ---- ---------- ---------- ---------- ---------- ---------- ----------- ------------------- ----------
2 REBAL COMPACT WAIT 10 10 0 0 0 0 0
2 REBAL REBALANCE RUN 10 10 6 155 3092 0 0
2 REBAL REBUILD DONE 10 10 0 0 0 0 0
once completed :
SQL> /
no rows selected
6. Newly added disk as member of diskgroup
SQL> set lines 999;
col diskgroup for a15
col diskname for a15
col path for a35
select a.name DiskGroup,b.name DiskName, b.total_mb, (b.total_mb-b.free_mb) Used_MB, b.free_mb,b.path,b.header_status
from v$asm_disk b, v$asm_diskgroup a
where a.group_number (+) =b.group_number
order by b.group_number,b.name;SQL> SQL> SQL> SQL> 2 3 4
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
--------------- --------------- ---------- ---------- ---------- ----------------------------------- ------------
DATA DATA_0000 20472 4180 16292 /dev/oracleasm/disks/DATA1 MEMBER
FRA FRA_0000 10232 636 9596 /dev/oracleasm/disks/FRA MEMBER
FRA FRA_0001 10232 632 9600 /dev/oracleasm/disks/FRA2 MEMBER
Hope This will help you all .
Regards
Sultan Khan
ConversionConversion EmoticonEmoticon