Thursday, 1 April 2021

ASM - Online OCR and Voting disk SAN LUN Migration on ASM Diskgroup


ASM - Online OCR and Voting disk SAN LUN Migration on ASM Diskgroup

We are following oracle metalink doc for OCR and voting disk and mgmt database migration below in our test envirnment.

Exact Steps To Migrate ASM Diskgroups To Another SAN/Disk-Array/DAS/etc Without Downtime. (Doc ID 837308.1)

  • Login using grid user and check diskgroup status , Here in CRS diskgroup OCR and voting disk stored.


SQL> set lines 999;

col diskgroup for a10

col diskname for a12

col path for a30

SQL> SQL> SQL> SQL> 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/BACKUPNEW FORMER

BACKUP     BACKUP_0000       12284         96      12188 /dev/oracleasm/disks/BACKUP    MEMBER

CRS        CRS_0000          12284       4472       7812 /dev/oracleasm/disks/CRS       MEMBER

DATA       DATA_0001         20473       2281      18192 /dev/oracleasm/disks/DATANEW   MEMBER

FRA        FRA_0001          20473        606      19867 /dev/oracleasm/disks/FRANEW    MEMBER


6 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;SQL> SQL>


DISK_NUMBER MOUNT_S HEADER_STATU MODE_ST STATE    PATH

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

          0 CLOSED  FORMER       ONLINE  NORMAL   /dev/oracleasm/disks/CRSNEW

          1 CLOSED  FORMER       ONLINE  NORMAL   /dev/oracleasm/disks/BACKUPNEW

          1 CACHED  MEMBER       ONLINE  NORMAL   /dev/oracleasm/disks/FRANEW

          1 CACHED  MEMBER       ONLINE  NORMAL   /dev/oracleasm/disks/DATANEW

          0 CACHED  MEMBER       ONLINE  NORMAL   /dev/oracleasm/disks/CRS

          0 CACHED  MEMBER       ONLINE  NORMAL   /dev/oracleasm/disks/BACKUP


6 rows selected.

  • Add disk on online in CRS diskgroup

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


Diskgroup altered.

  • Check rebalance operation status to complete. 

SQL> Select operation, state, est_work, est_minutes from v$asm_operation;


OPERA STAT   EST_WORK EST_MINUTES

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

REBAL RUN        2217           1

REBAL WAIT          0           0


SQL> /


OPERA STAT   EST_WORK EST_MINUTES

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

REBAL DONE       2217           0

REBAL RUN           0           0


SQL> /


OPERA STAT   EST_WORK EST_MINUTES

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

REBAL DONE       2217           0

REBAL RUN           0           0


SQL> /


no rows selected


SQL>


  • ASM Alert log details:

[root@srv2 trace]# tail -1000f alert_+ASM2.log


Wed Mar 31 20:34:20 2021
SQL> alter diskgroup CRS add disk '/dev/oracleasm/disks/CRSNEW'
Wed Mar 31 20:34:20 2021
NOTE: GroupBlock outside rolling migration privileged region
NOTE: Assigning number (4,1) to disk (/dev/oracleasm/disks/CRSNEW)
NOTE: requesting all-instance membership refresh for group=4
NOTE: Disk 1 in group 4 is assigned fgnum=2
NOTE: discarding redo for group 4 disk 1
NOTE: initializing header (replicated) on grp 4 disk CRS_0001
NOTE: initializing header on grp 4 disk CRS_0001
NOTE: requesting all-instance disk validation for group=4
Wed Mar 31 20:34:21 2021
NOTE: skipping rediscovery for group 4/0xb6a1c3c6 (CRS) on local instance.
Wed Mar 31 20:34:21 2021
NOTE: requesting all-instance disk validation for group=4
Wed Mar 31 20:34:21 2021
NOTE: skipping rediscovery for group 4/0xb6a1c3c6 (CRS) on local instance.
Wed Mar 31 20:34:21 2021
GMON updating for reconfiguration, group 4 at 55 for pid 30, osid 26667
Wed Mar 31 20:34:21 2021
NOTE: group 4 PST updated.
Wed Mar 31 20:34:21 2021
NOTE: membership refresh pending for group 4/0xb6a1c3c6 (CRS)
Wed Mar 31 20:34:21 2021
GMON querying group 4 at 56 for pid 22, osid 9992
NOTE: cache opening disk 1 of grp 4: CRS_0001 path:/dev/oracleasm/disks/CRSNEW
Wed Mar 31 20:34:22 2021
NOTE: Attempting voting file refresh on diskgroup CRS
NOTE: Refresh completed on diskgroup CRS
. Found 1 voting file(s).
Wed Mar 31 20:34:22 2021
GMON querying group 4 at 57 for pid 22, osid 9992
Wed Mar 31 20:34:22 2021
SUCCESS: refreshed membership for 4/0xb6a1c3c6 (CRS)
Wed Mar 31 20:34:22 2021
SUCCESS: alter diskgroup CRS add disk '/dev/oracleasm/disks/CRSNEW'
Wed Mar 31 20:34:22 2021
NOTE: starting rebalance of group 4/0xb6a1c3c6 (CRS) at power 1
Starting background process ARB0
Wed Mar 31 20:34:22 2021
ARB0 started with pid=34, OS id=28512
NOTE: assigning ARB0 to group 4/0xb6a1c3c6 (CRS) with 1 parallel I/O
Wed Mar 31 20:34:23 2021
NOTE: header on disk 0 advanced to format #2 using fcn 0.713
NOTE: header on disk 1 advanced to format #2 using fcn 0.9951
Wed Mar 31 20:34:29 2021
NOTE: Attempting voting file refresh on diskgroup CRS
NOTE: Refresh completed on diskgroup CRS
. Found 1 voting file(s).
Wed Mar 31 20:36:47 2021
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=4
Wed Mar 31 20:36:47 2021
NOTE: membership refresh pending for group 4/0xb6a1c3c6 (CRS)
Wed Mar 31 20:36:47 2021
GMON querying group 4 at 58 for pid 22, osid 9992
Wed Mar 31 20:36:47 2021
SUCCESS: refreshed membership for 4/0xb6a1c3c6 (CRS)
NOTE: Attempting voting file refresh on diskgroup CRS
NOTE: Refresh completed on diskgroup CRS
. Found 1 voting file(s).
Wed Mar 31 20:38:31 2021
NOTE: stopping process ARB0
Wed Mar 31 20:38:32 2021
SUCCESS: rebalance completed for group 4/0xb6a1c3c6 (CRS)

  • Drop CRS diskgroup using diskname, By using  output above

SQL> alter diskgroup CRS drop disk 'CRS_0000';

Diskgroup altered.

SQL> Select operation, state, est_work, est_minutes from v$asm_operation;

OPERA STAT   EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN        2220           1
REBAL WAIT          0           0

SQL> set lines 999;
col diskgroup for a10
SQL> SQL> 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> SQL>   2    3    4    5

DISKGROUP  DISKNAME       TOTAL_MB    USED_MB    FREE_MB PATH                           HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
                                 0          0          0 /dev/oracleasm/disks/BACKUPNEW FORMER
BACKUP     BACKUP_0000       12284         96      12188 /dev/oracleasm/disks/BACKUP    MEMBER
CRS        CRS_0000          12284       1756      10528 /dev/oracleasm/disks/CRS       MEMBER
CRS        CRS_0001          12284       2719       9565 /dev/oracleasm/disks/CRSNEW    MEMBER
DATA       DATA_0001         20473       2291      18182 /dev/oracleasm/disks/DATANEW   MEMBER
FRA        FRA_0001          20473        606      19867 /dev/oracleasm/disks/FRANEW    MEMBER

6 rows selected.
  • Check status to complete rebalance operation
SQL> Select operation, state, est_work, est_minutes from v$asm_operation;

OPERA STAT   EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN        2220           1
REBAL WAIT          0           0

SQL> /

OPERA STAT   EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN        2220           0
REBAL WAIT          0           0

SQL> /

no rows selected

SQL> Select operation, state, est_work, est_minutes from v$asm_operation;

no rows selected

SQL>
  • ASM alert log on local node

[root@srv2 trace]# tail -1000f alert_+ASM2.log


SQL> alter diskgroup CRS drop disk 'CRS_0000'
Wed Mar 31 20:43:20 2021
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=4
Wed Mar 31 20:43:20 2021
NOTE: Attempting voting file relocation on diskgroup CRS
NOTE: Successful voting file relocation on diskgroup CRS
NOTE: membership refresh pending for group 4/0xb6a1c3c6 (CRS)
Wed Mar 31 20:43:20 2021
GMON querying group 4 at 59 for pid 22, osid 9992
Wed Mar 31 20:43:20 2021
SUCCESS: refreshed membership for 4/0xb6a1c3c6 (CRS)
Wed Mar 31 20:43:20 2021
SUCCESS: alter diskgroup CRS drop disk 'CRS_0000'
Wed Mar 31 20:43:21 2021
NOTE: starting rebalance of group 4/0xb6a1c3c6 (CRS) at power 1
Starting background process ARB0
Wed Mar 31 20:43:21 2021
ARB0 started with pid=34, OS id=31791
NOTE: assigning ARB0 to group 4/0xb6a1c3c6 (CRS) with 1 parallel I/O
Wed Mar 31 20:43:22 2021
NOTE: F1X0 on disk 0 (fmt 2) relocated at fcn 0.19937: AU 10 -> AU 0
NOTE: F1X0 on disk 1 (fmt 2) relocated at fcn 0.19937: AU 0 -> AU 2220
NOTE: 03/31/21 20:43:22 CRS.F1X0 copy 1 relocating from 0:10 to 1:2220 at FCN 0.19937
Wed Mar 31 20:43:27 2021
NOTE: Attempting voting file refresh on diskgroup CRS
NOTE: Refresh completed on diskgroup CRS
. Found 1 voting file(s).
Wed Mar 31 20:45:28 2021
NOTE: stopping process ARB0
Wed Mar 31 20:45:28 2021
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=4
Wed Mar 31 20:45:28 2021
SUCCESS: rebalance completed for group 4/0xb6a1c3c6 (CRS)
Wed Mar 31 20:45:28 2021
GMON updating for reconfiguration, group 4 at 60 for pid 36, osid 32335
Wed Mar 31 20:45:28 2021
NOTE: group 4 PST updated.
SUCCESS: grp 4 disk CRS_0000 emptied
NOTE: erasing header (replicated) on grp 4 disk CRS_0000
NOTE: erasing header on grp 4 disk CRS_0000
NOTE: process _x000_+asm2 (32335) initiating offline of disk 0.3940627262 (CRS_0000) with mask 0x7e in group 4 (CRS) without client assisting
NOTE: initiating PST update: grp 4 (CRS), dsk = 0/0xeae1333e, mask = 0x6a, op = clear
Wed Mar 31 20:45:28 2021
GMON updating disk modes for group 4 at 61 for pid 36, osid 32335
NOTE: group CRS: updated PST location: disk 0001 (PST copy 0)
Wed Mar 31 20:45:28 2021
NOTE: PST update grp = 4 completed successfully
NOTE: initiating PST update: grp 4 (CRS), dsk = 0/0xeae1333e, mask = 0x7e, op = clear
Wed Mar 31 20:45:28 2021
GMON updating disk modes for group 4 at 62 for pid 36, osid 32335
Wed Mar 31 20:45:28 2021
NOTE: cache closing disk 0 of grp 4: CRS_0000
Wed Mar 31 20:45:28 2021
NOTE: PST update grp = 4 completed successfully
Wed Mar 31 20:45:28 2021
GMON updating for reconfiguration, group 4 at 63 for pid 36, osid 32335
Wed Mar 31 20:45:28 2021
NOTE: cache closing disk 0 of grp 4: (not open) CRS_0000
Wed Mar 31 20:45:28 2021
NOTE: group 4 PST updated.
Wed Mar 31 20:45:29 2021
NOTE: membership refresh pending for group 4/0xb6a1c3c6 (CRS)
NOTE: Attempting voting file refresh on diskgroup CRS
NOTE: Refresh completed on diskgroup CRS
. Found 1 voting file(s).
NOTE: Voting file relocation is required in diskgroup CRS
Wed Mar 31 20:45:29 2021
GMON querying group 4 at 64 for pid 22, osid 9992
GMON querying group 4 at 65 for pid 22, osid 9992
Wed Mar 31 20:45:29 2021
NOTE: Disk CRS_0000 in mode 0x0 marked for de-assignment
SUCCESS: refreshed membership for 4/0xb6a1c3c6 (CRS)
NOTE: Attempting voting file refresh on diskgroup CRS
NOTE: Refresh completed on diskgroup CRS
. Found 1 voting file(s).
NOTE: Voting file relocation is required in diskgroup CRS
NOTE: Attempting voting file relocation on diskgroup CRS
NOTE: Successful voting file relocation on diskgroup CRS

  • CRS alter log details below:
[root@srv2 ~]# tail -300f /u01/app/grid/diag/crs/srv2/crs/trace/alert.log




2021-03-31 20:43:21.965 [OCSSD(9604)]CRS-1605: CSSD voting file is online: /dev/oracleasm/disks/CRSNEW; details in /u01/app/grid/diag/crs/srv2/crs/trace/ocssd.trc.
2021-03-31 20:43:21.965 [OCSSD(9604)]CRS-1604: CSSD voting file is offline: /dev/oracleasm/disks/CRS; details at (:CSSNM00069:) in /u01/app/grid/diag/crs/srv2/crs/trace/ocssd.trc.
2021-03-31 20:43:21.965 [OCSSD(9604)]CRS-1626: A Configuration change request completed successfully
2021-03-31 20:43:21.972 [OCSSD(9604)]CRS-1601: CSSD Reconfiguration complete. Active nodes are srv1 srv2 .

  • login using grid user and check diskgroup user on asm instance.
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> SQL> SQL> SQL>   2    3    4    5

DISKGROUP  DISKNAME       TOTAL_MB    USED_MB    FREE_MB PATH                           HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
                                 0          0          0 /dev/oracleasm/disks/BACKUPNEW FORMER
                                 0          0          0 /dev/oracleasm/disks/CRS       FORMER
BACKUP     BACKUP_0000       12284         96      12188 /dev/oracleasm/disks/BACKUP    MEMBER
CRS        CRS_0001          12284       4472       7812 /dev/oracleasm/disks/CRSNEW    MEMBER
DATA       DATA_0001         20473       2291      18182 /dev/oracleasm/disks/DATANEW   MEMBER
FRA        FRA_0001          20473        606      19867 /dev/oracleasm/disks/FRANEW    MEMBER

6 rows selected.

SQL>

  • Delete disk CRS using oracleasm utility and OS user is root
[root@srv1 ~]# oracleasm deletedisk CRS
Clearing disk header: done
Dropping disk: done
[root@srv1 ~]# oracleasm listdisks
BACKUP
BACKUPNEW
CRSNEW
DATANEW
FRANEW
[root@srv1 ~]#

  • Login and check the disk status as we have not perform oracleasm scandsk so CRS showing candidate status
[grid@srv2 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.1.0.2.0 Production on Wed Mar 31 20:56:36 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
SQL> 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> SQL> SQL>   2    3    4    5

DISKGROUP  DISKNAME       TOTAL_MB    USED_MB    FREE_MB PATH                           HEADER_STATU
---------- ------------ ---------- ---------- ---------- ------------------------------ ------------
                                 0          0          0 /dev/oracleasm/disks/BACKUPNEW FORMER
                                 0          0          0 /dev/oracleasm/disks/CRS       CANDIDATE
BACKUP     BACKUP_0000       12284         96      12188 /dev/oracleasm/disks/BACKUP    MEMBER
CRS        CRS_0001          12284       4472       7812 /dev/oracleasm/disks/CRSNEW    MEMBER
DATA       DATA_0001         20473       2291      18182 /dev/oracleasm/disks/DATANEW   MEMBER
FRA        FRA_0001          20473        606      19867 /dev/oracleasm/disks/FRANEW    MEMBER

6 rows selected.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

  • Oracleasm listdisks and scandisk status
[grid@srv2 ~]$ su root
Password:
[root@srv2 grid]# oracleasm listdisks
BACKUP
BACKUPNEW
CRS
CRSNEW
DATANEW
FRANEW
[root@srv2 grid]# oracleasmscandisks
bash: oracleasmscandisks: command not found
[root@srv2 grid]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Cleaning disk "CRS"
Scanning system for ASM disks...
[root@srv2 grid]# oracleasm listdisks
BACKUP
BACKUPNEW
CRSNEW
DATANEW
FRANEW
[root@srv2 grid]#


No comments:

Post a Comment