ASM - Online OCR and Voting disk SAN LUN Migration on ASM Diskgroup Normal Redundancy
Once 3 ASM disks are created at OS level using oracleasm utility. We will add to CRS ASM diskgroup online as OCR and voting disk is stored on it.
See also blog link for details in alert log: ASM - Online OCR and Voting disk SAN LUN Migration on ASM Diskgroup
Redundancy Level: Normal
Grid Version: 12.1.0.2.0
- Create ASM disk of same size using oracleasm utility
[root@srv1 ~]# oracleasm createdisk CRSNEW1 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@srv1 ~]# oracleasm createdisk CRSNEW2 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@srv1 ~]# oracleasm createdisk CRSNEW3 /dev/sdk1
Writing disk header: done
Instantiating disk: done
[root@srv1 ~]# oracleasm listdisks
CRS1
CRS2
CRS3
CRSNEW
CRSNEW1
CRSNEW2
CRSNEW3
DATANEW
FRANEW
- Login to the ASM instance using grid user and check the current diskgroup status.
[root@srv1 ~]# su grid
[grid@srv1 root]$ cd
[grid@srv1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base remains unchanged with value /u01/app/grid
[grid@srv1 ~]$ sqlplus / as sysasm
SQL*Plus: Release 12.1.0.2.0 Production on Fri Apr 2 17:45:51 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL>
set lines 999;
col diskgroup for a10
col diskname for a12
col path for a30
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;
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
0 0 0 /dev/oracleasm/disks/CRSNEW FORMER
0 0 0 /dev/oracleasm/disks/CRSNEW1 PROVISIONED
0 0 0 /dev/oracleasm/disks/CRSNEW3 PROVISIONED
0 0 0 /dev/oracleasm/disks/CRSNEW2 PROVISIONED
CRS CRS1 12284 1519 10765 /dev/oracleasm/disks/CRS1 MEMBER
CRS CRS2 12284 1484 10800 /dev/oracleasm/disks/CRS2 MEMBER
CRS CRS3 12284 1485 10799 /dev/oracleasm/disks/CRS3 MEMBER
DATA DATA_0001 20473 2476 17997 /dev/oracleasm/disks/DATANEW MEMBER
FRA FRA_0001 20473 1075 19398 /dev/oracleasm/disks/FRANEW MEMBER
9 rows selected.
SQL> set pages 40000 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 FORMER ONLINE NORMAL /dev/oracleasm/disks/CRSNEW
1 CLOSED PROVISIONED ONLINE NORMAL /dev/oracleasm/disks/CRSNEW1
2 CLOSED PROVISIONED ONLINE NORMAL /dev/oracleasm/disks/CRSNEW3
3 CLOSED PROVISIONED ONLINE NORMAL /dev/oracleasm/disks/CRSNEW2
1 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/FRANEW
3 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRS3
1 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/DATANEW
2 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRS2
0 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRS1
9 rows selected.
- Add these provisioned disks in CRS diskgroup
SQL> ALTER DISKGROUP CRS ADD DISK '/dev/oracleasm/disks/CRSNEW1' NAME CRSNEW1,'/dev/oracleasm/disks/CRSNEW2' NAME CRSNEW2,'/dev/oracleasm/disks/CRSNEW3' NAME CRSNEW3;
Diskgroup altered.
- Check Rebalance operation to complete using below query.
SQL> Select operation, state, est_work, est_minutes from v$asm_operation;
OPERA STAT EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN 2218 3
REBAL WAIT 0 0
SQL> /
OPERA STAT EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN 2218 1
REBAL WAIT 0 0
SQL> /
OPERA STAT EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL DONE 2218 0
REBAL RUN 0 0
SQL> Select operation, state, est_work, est_minutes from v$asm_operation;
OPERA STAT EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL DONE 2218 0
REBAL RUN 0 0
SQL> /
no rows selected
- Check the status of Diskgroup
SQL>
set pages 40000 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 FORMER ONLINE NORMAL /dev/oracleasm/disks/CRSNEW
1 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/FRANEW
3 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRS3
1 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/DATANEW
2 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRS2
5 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRSNEW3
0 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRS1
4 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRSNEW2
1 CACHED MEMBER ONLINE NORMAL /dev/oracleasm/disks/CRSNEW1
9 rows selected.
SQL>
set lines 999;
col diskgroup for a10
col diskname for a12
col path for a30
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>
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
0 0 0 /dev/oracleasm/disks/CRSNEW FORMER
CRS CRS1 12284 778 11506 /dev/oracleasm/disks/CRS1 MEMBER
CRS CRS2 12284 746 11538 /dev/oracleasm/disks/CRS2 MEMBER
CRS CRS3 12284 746 11538 /dev/oracleasm/disks/CRS3 MEMBER
CRS CRSNEW1 12284 743 11541 /dev/oracleasm/disks/CRSNEW1 MEMBER
CRS CRSNEW2 12284 742 11542 /dev/oracleasm/disks/CRSNEW2 MEMBER
CRS CRSNEW3 12284 742 11542 /dev/oracleasm/disks/CRSNEW3 MEMBER
DATA DATA_0001 20473 2476 17997 /dev/oracleasm/disks/DATANEW MEMBER
FRA FRA_0001 20473 1075 19398 /dev/oracleasm/disks/FRANEW MEMBER
9 rows selected.
- Drop old Diskgroup of CRS with disk CRS1,CRS2,CRS3
SQL> alter diskgroup CRS drop disk 'CRS1';
Diskgroup altered.
SQL> alter diskgroup CRS drop disk 'CRS2';
Diskgroup altered.
SQL> alter diskgroup CRS drop disk 'CRS3';
Diskgroup altered.
- Check query to complete rebalance operations.
SQL> Select operation, state, est_work, est_minutes from v$asm_operation;
OPERA STAT EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN 2177 2
REBAL WAIT 0 0
SQL> Select operation, state, est_work, est_minutes from v$asm_operation;
OPERA STAT EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN 2177 2
REBAL WAIT 0 0
SQL> /
OPERA STAT EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN 2177 1
REBAL WAIT 0 0
SQL> /
no rows selected
- Check the current status of disk CRS1, CRS2,CRS3
SQL>
set lines 999;
col diskgroup for a10
col diskname for a12
col path for a30
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;
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
0 0 0 /dev/oracleasm/disks/CRSNEW FORMER
0 0 0 /dev/oracleasm/disks/CRS1 FORMER
0 0 0 /dev/oracleasm/disks/CRS3 FORMER
0 0 0 /dev/oracleasm/disks/CRS2 FORMER
CRS CRSNEW1 12284 1517 10767 /dev/oracleasm/disks/CRSNEW1 MEMBER
CRS CRSNEW2 12284 1485 10799 /dev/oracleasm/disks/CRSNEW2 MEMBER
CRS CRSNEW3 12284 1486 10798 /dev/oracleasm/disks/CRSNEW3 MEMBER
DATA DATA_0001 20473 2476 17997 /dev/oracleasm/disks/DATANEW MEMBER
FRA FRA_0001 20473 1075 19398 /dev/oracleasm/disks/FRANEW MEMBER
9 rows selected.
SQL> /
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
0 0 0 /dev/oracleasm/disks/CRSNEW FORMER
0 0 0 /dev/oracleasm/disks/CRS1 FORMER
0 0 0 /dev/oracleasm/disks/CRS3 FORMER
0 0 0 /dev/oracleasm/disks/CRS2 FORMER
CRS CRSNEW1 12284 1517 10767 /dev/oracleasm/disks/CRSNEW1 MEMBER
CRS CRSNEW2 12284 1485 10799 /dev/oracleasm/disks/CRSNEW2 MEMBER
CRS CRSNEW3 12284 1486 10798 /dev/oracleasm/disks/CRSNEW3 MEMBER
DATA DATA_0001 20473 2476 17997 /dev/oracleasm/disks/DATANEW MEMBER
FRA FRA_0001 20473 1075 19398 /dev/oracleasm/disks/FRANEW MEMBER
9 rows selected.
SQL> /
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
0 0 0 /dev/oracleasm/disks/CRSNEW FORMER
0 0 0 /dev/oracleasm/disks/CRS1 FORMER
0 0 0 /dev/oracleasm/disks/CRS3 FORMER
0 0 0 /dev/oracleasm/disks/CRS2 FORMER
CRS CRSNEW1 12284 1517 10767 /dev/oracleasm/disks/CRSNEW1 MEMBER
CRS CRSNEW2 12284 1485 10799 /dev/oracleasm/disks/CRSNEW2 MEMBER
CRS CRSNEW3 12284 1486 10798 /dev/oracleasm/disks/CRSNEW3 MEMBER
DATA DATA_0001 20473 2476 17997 /dev/oracleasm/disks/DATANEW MEMBER
FRA FRA_0001 20473 1075 19398 /dev/oracleasm/disks/FRANEW MEMBER
9 rows selected.
- Delete Disk at OS level using oracleasm utility
SQL> /
- Check query for current status of ASM Disk group
SQL>
set lines 999;
col diskgroup for a10
col diskname for a12
col path for a30
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;
DISKGROUP DISKNAME TOTAL_MB USED_MB FREE_MB PATH HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
0 0 0 /dev/oracleasm/disks/CRSNEW FORMER
CRS CRSNEW1 12284 1517 10767 /dev/oracleasm/disks/CRSNEW1 MEMBER
CRS CRSNEW2 12284 1485 10799 /dev/oracleasm/disks/CRSNEW2 MEMBER
CRS CRSNEW3 12284 1486 10798 /dev/oracleasm/disks/CRSNEW3 MEMBER
DATA DATA_0001 20473 2476 17997 /dev/oracleasm/disks/DATANEW MEMBER
FRA FRA_0001 20473 1075 19398 /dev/oracleasm/disks/FRANEW MEMBER
6 rows selected.
No comments:
Post a Comment