Monday, December 30, 2013

How to move ASM and Voting Files to another location

Assume that  you have the following disks (here ASMLIB):

[root@xxxxx ~]# oracleasm listdisks
....
OCR_VOTED1
OCR_VOTED1B
OCR_VOTED2
OCR_VOTED2B
OCR_VOTED3
OCR_VOTED3B

where OCR_VOTED1-3 are the existing disks on the old SAN/location and OCR_VOTED1B - 3B are the new disks in the new SAN/location.

The current voting disks show as:

[oragrid@xxxxxxx]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   154c5cab6b2f4f5dbfd5dd9b1eab4bd7 (ORCL:OCR_VOTED1) [OCR]
 2. ONLINE   543487a699a44f50bfaa75fb4dd432a8 (ORCL:OCR_VOTED2) [OCR]
 3. ONLINE   5cf1b3ccf1a54f53bff8f0b2f6dc9930 (ORCL:OCR_VOTED3) [OCR]
Located 3 voting disk(s).

In sqlplus connected to the ASM instance check the current disk names for the OCR diskgroup:

sqlplus '/ as sysasm'
...
SQL> select GROUP_NUMBER,name from V$asm_diskgroup;

GROUP_NUMBER NAME
------------ ------------------------------
       1 DATA
       2 FRA
       3 OCR

SQL> select name from v$asm_disk where group_number = 3;

NAME
------------------------------
OCR_VOTED1
OCR_VOTED2
OCR_VOTED3

and then just issue the following command to add the new and drop  the old disks:

alter diskgroup OCR
add disk 
'ORCL:OCR_VOTED1B',
'ORCL:OCR_VOTED2B',
'ORCL:OCR_VOTED3B'
drop disk 
'OCR_VOTED1',
'OCR_VOTED2',
'OCR_VOTED3'
;

This can be done without any downtime, once the command completes the clusterware will show that the voting disks have changed:

[oragrid@xxxxxxx~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   7936809b67604f05bf39cb777384d4b5 (ORCL:OCR_VOTED1B) [OCR]
 2. ONLINE   27046d28c4e64f78bf34f8e89af212e4 (ORCL:OCR_VOTED2B) [OCR]
 3. ONLINE   419edf08dceb4f28bf14fa57a42666ad (ORCL:OCR_VOTED3B) [OCR]
Located 3 voting disk(s).