2015/12/16

oracleasm same label in different diskgroups prevents mount

After a long time ;  my post .
Again a real-life customer  problem .
Problem definition:
For creating test environment ; a disk based snap is used ; and whole database is processed  via masking ;..etc then used by test teams. And to prevent any developed code,prepared data , a parallel run is required. But both of  old and new databases have to operate in same hardware, because of source unavaliability.  No one wants to spent more than production to test systems :) 

What else ;
oracleasm is used for ASM disk labeling; and because of using storage based snap ; a disk will be presented twice to server (2 identical copied with a time difference). Which causes the label to exist twice in different disks. Also we had change the diskgroup names , because same named diskgroup cannot be mounted simultaneously.  we have a suffix for disk group names  like RCDBv5DG ; RCDBv6DG third from last character represents  year.
5  represents 2015

6  represents 2016


Special thanks to my dear colleague Mustafa YALÇIN , for his contribution .



But if you try to mount; the error raises : 

ORA-15032: not all alterations performedORA-15040: diskgroup is incompleteORA-15042: ASM disk "24" is missing from group number "1" ORA-15042: ASM disk "14" is missing from group number "1" ERROR: ALTER DISKGROUP ALL MOUNT


--------------------- alert log for asm instance
 SQL> ALTER DISKGROUP RCDBDG MOUNT  /* asm agent *//* {0:0:79} */
 NOTE: Assigning number (1,21) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK09)
 NOTE: Assigning number (1,23) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK11)
 NOTE: Assigning number (1,22) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK10)
 NOTE: Assigning number (1,25) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK13)
 NOTE: Assigning number (1,19) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK07)
 NOTE: Assigning number (1,16) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK04)
 NOTE: Assigning number (1,15) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK03)
 NOTE: Assigning number (1,17) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK05)
 NOTE: Assigning number (1,18) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK06)
 NOTE: Assigning number (1,13) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK01)
 NOTE: Assigning number (1,20) to disk (/dev/oracleasm/disks/RCDB_NEW_DISK08)

 NOTE: Disk RCDB_NEW_DISK01 in mode 0x7f marked for de-assignment
 NOTE: Disk  in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK03 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK04 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK05 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK06 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK07 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK08 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK09 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK10 in mode 0x7f marked for de-assignment
 NOTE: Disk RCDB_NEW_DISK11 in mode 0x7f marked for de-assignment



before : 
[grid@server03 ~]$ oracleasm  querydisk /dev/mapper/ASMDISK*p1
Device "/dev/mapper/ASMDISK01p1" is marked an ASM disk with the label "RCDB_NEW_DISK20"

command change label= 
oracleasm renamedisk -f /dev/mapper/ASMDISK01p1 RCDB_2016_DISK20

after: 
[grid@server03 ~]$ oracleasm  querydisk /dev/mapper/ASMDISK*p1
Device "/dev/mapper/ASMDISK01p1" is marked an ASM disk with the label "RCDB_2016_DISK20"


Then mount was succesful.

 GROUP_NUMBER NAME            STATE           TYPE                TOTAL_MB      FREE_MB OFFLINE_DISKS USABL
------------ --------------- --------------- --------------- ------------ ------------ ------------- -----
           1 RCDBV5DG        MOUNTED         EXTERN               6655909      1010362             0    
           2 RCDBDG          MOUNTED         EXTERN               7167902       842899             0    

NAME                     GROUP_NUMBER DISK_NUMBER STATE        HEADER_STATU MOUNT_S PATH                
------------------------ ------------ ----------- ------------ ------------ ------- ----------------------
                                    0           0 NORMAL       UNKNOWN      CLOSED  ORCL:RCDB_NEW_DISK20
RCDB_NEW_DISK01                     1          13 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK01
RCDB_NEW_DISK02                     1          14 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK02
RCDB_NEW_DISK03                     1          15 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK03
RCDB_NEW_DISK04                     1          16 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK04
RCDB_NEW_DISK05                     1          17 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK05
RCDB_NEW_DISK06                     1          18 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK06
RCDB_NEW_DISK07                     1          19 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK07
RCDB_NEW_DISK08                     1          20 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK08
RCDB_NEW_DISK09                     1          21 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK09
RCDB_NEW_DISK10                     1          22 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK10
RCDB_NEW_DISK11                     1          23 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK11
RCDB_NEW_DISK12                     1          24 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK12
RCDB_NEW_DISK13                     1          25 NORMAL       MEMBER       CACHED  ORCL:RCDB_NEW_DISK13
RCDB_NEW_DISK20                     2           0 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK20
RCDB_NEW_DISK01                     2          13 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK01
RCDB_NEW_DISK02                     2          14 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK02
RCDB_NEW_DISK03                     2          15 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK03
RCDB_NEW_DISK04                     2          16 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK04
RCDB_NEW_DISK05                     2          17 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK05
RCDB_NEW_DISK06                     2          18 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK06
RCDB_NEW_DISK07                     2          19 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK07
RCDB_NEW_DISK08                     2          20 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK08
RCDB_NEW_DISK09                     2          21 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK09
RCDB_NEW_DISK10                     2          22 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK10
RCDB_NEW_DISK11                     2          23 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK11
RCDB_NEW_DISK12                     2          24 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK12
RCDB_NEW_DISK13                     2          25 NORMAL       MEMBER       CACHED  ORCL:RCDB_2016_DISK13