Skip to main content

ASM Disks Migration from Old storage to New storage on RAC

 Check Number of Disk Groups

SQL> select name,path, total_mb, state, mount_status, header_status from v$asm_disk;


NAME                      PATH                            TOTAL_MB   STATE   MOUNT_STATUS HEADER_STATUS

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

DATA_0000      /dev/oracleasm/disks/DATA      225264    NORMAL      CACHED                MEMBER

FRA_0000        /dev/oracleasm/disks/FRA          92160    NORMAL      CACHED                MEMBER

CRS_0000        /dev/oracleasm/disks/CRS          92160    NORMAL      CACHED               MEMBER

1. Backup the database using RMAN and validate the backups.

2. Check Old Disk's added on what sd* just to verify

prodmachine22:/dev/oracleasm/disks # ll
total 0
brw-rw---- 1 grid asmadmin 8, 37 Jan 14 05:00 CRS
brw-rw---- 1 grid asmadmin 8, 39 Jan 14 05:00 DATA
brw-rw---- 1 grid asmadmin 8, 38 Jan 14 05:00 FRA


prodmachine22:/dev/oracleasm/disks # ls -lha /dev | grep -w "8,.*37"
brw-rw----   1 root disk      8,  37 Jan 13 14:31 sdc5

prodmachine22:/dev/oracleasm/disks # ls -lha /dev | grep -w "8,.*39"
brw-rw----   1 root disk      8,  39 Jan 13 14:31 sdc7

prodmachine22:/dev/oracleasm/disks # ls -lha /dev | grep -w "8,.*38"
brw-rw----   1 root disk      8,  38 Jan 13 14:31 sdc6

Now that all disks are confirmed on sdc5,6 and 7.

3. Add same size New Lun (storage) and verify with lsblk

# lsblk

Old Disks
├─sdc1             8:33   0    1K  0 part
├─sdc5             8:37   0   90G  0 part
├─sdc6             8:38   0   90G  0 part
└─sdc7             8:39   0  220G  0 part

New Disks added
sdd                8:48   0  400G  0 disk
├─sdd1             8:49   0    1K  0 part
├─sdd5             8:53   0   90G  0 part
├─sdd6             8:54   0   90G  0 part
└─sdd7             8:55   0  220G  0 part

4. We will create new Disks mentioned below

sdd5 for CRS
sdd6 for FRA
sdd7 for DATA

oracleasm createdisk CRSNEW /dev/sdd5
oracleasm createdisk FRANEW /dev/sdd6
oracleasm createdisk DATANEW /dev/sdd7


prodmachine22:# oracleasm createdisk CRSNEW /dev/sdd5
Writing disk header: done
Instantiating disk: done

prodmachine22:# oracleasm createdisk FRANEW /dev/sdd6
Writing disk header: done
Instantiating disk: done

prodmachine22:# oracleasm createdisk DATANEW /dev/sdd7
Writing disk header: done
Instantiating disk: done

prodmachine22:/dev/oracleasm/disks # ll
total 0
brw-rw---- 1 grid asmadmin 8, 37 Jan 14 05:21 CRS
brw-rw---- 1 grid asmadmin 8, 53 Jan 14 05:20 CRSNEW
brw-rw---- 1 grid asmadmin 8, 39 Jan 14 05:21 DATA
brw-rw---- 1 grid asmadmin 8, 55 Jan 14 05:21 DATANEW
brw-rw---- 1 grid asmadmin 8, 38 Jan 14 05:21 FRA
brw-rw---- 1 grid asmadmin 8, 54 Jan 14 05:20 FRANEW

5. On other nodes Scan for new added disks

prodmachine23:~ # oracleasm listdisks
CRS
DATA
FRA

prodmachine23:~ # oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "CRSNEW"
Instantiating disk "FRANEW"
Instantiating disk "DATANEW"

prodmachine23:~ # oracleasm listdisks
CRS
CRSNEW
DATA
DATANEW
FRA
FRANEW

6. Add new disks to the existing disk group.

Connect to grid user and connect sqlplus as /as sysasm


SQL> 
set pages 300 lines 120
col PATH for a30
select DISK_NUMBER,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,
PATH FROM V$ASM_DISK;

DISK_NUMBER MOUNT_S HEADER_STATU MODE_ST STATE    PATH
----------- ------- ------------ ------- -------- ------------------------------
          0 CLOSED  PROVISIONED  ONLINE  NORMAL   /dev/oracleasm/disks/CRSNEW
          1 CLOSED  PROVISIONED  ONLINE  NORMAL   /dev/oracleasm/disks/DATANEW
          2 CLOSED  PROVISIONED  ONLINE  NORMAL   /dev/oracleasm/disks/FRANEW
          0 CACHED  MEMBER       ONLINE  NORMAL   /dev/oracleasm/disks/DATA
          0 CACHED  MEMBER       ONLINE  NORMAL   /dev/oracleasm/disks/FRA
          0 CACHED  MEMBER       ONLINE  NORMAL   /dev/oracleasm/disks/CRS

6 rows selected.


SQL> 
select name, total_mb, state, type from v$asm_diskgroup;

NAME                             TOTAL_MB STATE       TYPE
------------------------------ ---------- ----------- ------
CRS                                 92160 MOUNTED     EXTERN
DATA                               225264 MOUNTED     EXTERN
FRA                                 92160 MOUNTED     EXTERN




Alter the diskgroup to add new disks and wait until the rebalace operation is completed

SQL> alter diskgroup DATA add disk '/dev/oracleasm/disks/DATANEW' rebalance power 11;

Diskgroup altered.

Wait for rebalance to complete by checking with below queries:

select * from v$asm_operation;
select * from gv$asm_operation;

Wait until output comes to

SQL> 
no rows selected

SQL> alter diskgroup FRA add disk '/dev/oracleasm/disks/FRANEW' rebalance power 11;

Diskgroup altered.

Keep checking the rebalance manually and proceed ahead.


SQL> alter diskgroup CRS add disk '/dev/oracleasm/disks/CRSNEW' rebalance power 11;

Diskgroup altered.

Keep checking rebalance manually and proceed ahead.



7. Verify the newly added disks:

SQL> 
select name, total_mb, state, type from v$asm_diskgroup;

NAME                             TOTAL_MB STATE       TYPE
------------------------------ ---------- ----------- ------
CRS                                184320 MOUNTED     EXTERN
DATA                               450540 MOUNTED     EXTERN
FRA                                184320 MOUNTED     EXTERN

Size of disks increased after disk addition.


SQL>
select name,path, total_mb, state, mount_status, header_status from v$asm_disk;

NAME       PATH                             TOTAL_MB STATE    MOUNT_STATUS HEADER_STATUS
----------------------------------------- ---------- -------- -------       ------------
DATA_0000  /dev/oracleasm/disks/DATA          225264 NORMAL   CACHED        MEMBER
FRA_0000   /dev/oracleasm/disks/FRA            92160 NORMAL   CACHED        MEMBER
CRS_0000   /dev/oracleasm/disks/CRS            92160 NORMAL   CACHED        MEMBER
DATA_0001  /dev/oracleasm/disks/DATANEW       225276 NORMAL   CACHED        MEMBER
FRA_0001   /dev/oracleasm/disks/FRANEW         92160 NORMAL   CACHED        MEMBER
CRS_0001   /dev/oracleasm/disks/CRSNEW         92160 NORMAL   CACHED        MEMBER


8. Remove the old disks from the diskgroups

SQL>
alter diskgroup DATA drop disk 'DATA_0000' rebalance power 11;

Diskgroup altered.

Wait for rebalance to complete, then proceed.


SQL> 
alter diskgroup FRA drop disk 'FRA_0000' rebalance power 11;

Diskgroup altered.

Wait for rebalance to complete, then proceed.

SQL>
alter diskgroup CRS drop disk 'CRS_0000' rebalance power 11;

Diskgroup altered.

Then wait until the rebalance operation is completed.

Rebalance Check query:

select * from v$asm_operation;
select * from gv$asm_operation;

Output:
SQL> 
select * from gv$asm_operation;

GROUP_NUMBER OPERA PASS      STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE   CON_ID
------------ ----- --------- ---- ---------- ---------- ---------- ---------- ---------- ----------- ------------ -------
           3 REBAL COMPACT   WAIT         11         11          0          0          0           0              0
           3 REBAL REBALANCE RUN          11         11        382        474      29802           0              0
           3 REBAL REBUILD   DONE         11         11          0          0          0           0              0



SQL> set linesize 200
set pagesize 200
col path for a30
select name,path, total_mb, state, mount_status, header_status from v$asm_disk;

NAME                           PATH                             TOTAL_MB STATE    MOUNT_S HEADER_STATU
------------------------------ ------------------------------ ---------- -------- ------- ------------
                               /dev/oracleasm/disks/DATA               0 NORMAL   CLOSED  FORMER
                               /dev/oracleasm/disks/FRA                0 NORMAL   CLOSED  FORMER
                               /dev/oracleasm/disks/CRS                0 NORMAL   CLOSED  FORMER
DATA_0001                      /dev/oracleasm/disks/DATANEW       225276 NORMAL   CACHED  MEMBER
FRA_0001                       /dev/oracleasm/disks/FRANEW         92160 NORMAL   CACHED  MEMBER
CRS_0001                       /dev/oracleasm/disks/CRSNEW         92160 NORMAL   CACHED  MEMBER

6 rows selected.

9. Now delete the disk from ASM and release the storage

List the disks

prodmachine22:~ # oracleasm listdisks

CRS

CRSNEW

DATA

DATANEW

FRA

FRANEW

Delete the disk from ASM

oracleasm deletedisk DATA

oracleasm deletedisk FRA

oracleasm deletedisk CRS

output:

prodmachine22:~ # oracleasm deletedisk DATA

Clearing disk header: done

Dropping disk: done

prodmachine22:~ # oracleasm deletedisk FRA

Clearing disk header: done

Dropping disk: done

prodmachine22:~ # oracleasm deletedisk CRS

Clearing disk header: done

Dropping disk: done


Validate the Disks

prodmachine22:~ # oracleasm listdisks

CRSNEW

DATANEW

FRANEW


Scan Disks on 2nd node.

prodmachine23:~ # oracleasm listdisks

CRS

CRSNEW

DATA

DATANEW

FRA

FRANEW


prodmachine23:~ # oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Cleaning disk "CRS"

Cleaning disk "DATA"

Cleaning disk "FRA"

Scanning system for ASM disks...

prodmachine23:~ # oracleasm listdisks

CRSNEW

DATANEW

FRANEW

We have successfully migrated ASM disks from old storage to new on RAC.




Comments

Popular posts from this blog

Upgrade Oracle Database 12c to 19c by DBUA Method

  Introduction Upgrade Oracle Database is a crucial step to ensure you're benefiting from the latest features, performance enhancements, and security updates. In this guide, we'll walk you through the process of upgrading your Oracle Database 12c to the latest version, 19c . Follow these steps to ensure a smooth and successful upgrade Environment Hostname : prod.infoinflux.com Database Name : PROD DB VERSION : 12.2.0.1.0 ORACLE_BASE : /u01/app/oracle DB Home Path : /u01/app/oracle/product/12.2.0.1/db_1 Datafile Location : /u01/app/oracle/oradata/PROD Target DB VERSION : 19.0.0.0 Target DB Path : /u01/app/oracle/product/19c/db_1 Upgrade Method : Database Upgrade Assistant Steps For upgrade using Database Upgrade Assistant (DBUA): Take Latest Database backup Make Directory for 19c Home Download and Unzip Software to 19c Home Directory Install 19c Binary or Software Create Pre and Post Upgrade Scripts Run Pre-Upgrade Script Pre-Upgra...

ORA-12012: error on auto execute of job SYS.ORA$AT_OS_OPT_SY_**

  Introduction ORA-12012 error is related to Oracle Database and is part of the Oracle Job Scheduler (DBMS_SCHEDULER) . It usually occurs when an automatic task or job execution encounters an issue. The error message you're seeing, " ORA$AT_OS_OPT_SY_<number> ," is specific to the job causing the problem. During the 12c database creation process, you can see ORA-12012 error in the alert log file when the “ SYS.ORA$AT_OS_OPT_SY_ ” auto job runs. To fix the error, it is necessary to drop the job and recreate it. Errors will be as follows. Errors in file /u01/app/oracle/diag/rdbms/prod/PROD/trace/PROD_j000_14524.trc: ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_767" ORA-20001: Statistics Advisor: Invalid task name for the current user ORA-06512: at "SYS.DBMS_STATS", line 47207 ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882 ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059 ORA-065...

Install Oracle Database 12.2(12c) on Linux

  Introduction Installing Oracle Database 12.2 on Linux system might seem daunting at first, but with the right guidance, it can be a smooth process. In this guide, we'll take you through the step-by-step procedure to install Oracle Database on a Linux environment. By the end of this tutorial, you'll have a functional Oracle Database instance up and running. Steps for Installation: 1. Prerequisites Automatic Setup 2. Prerequisites Manual Setup 3. Install Oracle Database Binary (Software only) 4. Create Database by DBCA 1. Prerequisites Automatic Setup To perform all your prerequisite setup automatically, issue the following command or you can proceed with manual setup explained in 2nd point. [ root @ prod ] # yum install oracle - database - server - 12cR2 - preinstall - y 2. Prerequisites Manual Setup a) Download and Unzip the oracle 12.2 Setup Download or copy the oracle setup file to any location as per your requirement. In...