ORA-15032 ORA-59303 ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 or higher

For upgrading 12.1.0.2 GI to 12.2.0.1 GI, after running rootupgrade.sh, there are some disk groups are not mounted.

NAME                  STATE       COMPATIBILITY      V
-------------------- ----------- ------------------- -
GIMR                  DISMOUNTED  0.0.0.0.0          N
FRA                   DISMOUNTED  0.0.0.0.0          N
DATA                  MOUNTED     12.1.0.0.0         N
OCR_VOTE              MOUNTED     11.2.0.4.0         Y
SQL> alter diskgroup FRA mount;
alter diskgroup FRA mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-59303: The attribute compatible.asm (10.1.0.0.0) of the 
           diskgroup being mounted should be 11.2.0.2.0 or higher.
ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 
           or higher
SQL> alter diskgroup FRA mount restricted;

Diskgroup altered.

SQL> alter diskgroup FRA set attribute 'compatible.asm'='11.2.0.4';

Diskgroup altered.

SQL> alter diskgroup FRA dismount;

Diskgroup altered.

SQL> alter diskgroup GIMR mount restricted;

Diskgroup altered.

SQL> alter diskgroup GIMR set attribute 'compatible.asm'='11.2.0.4';

Diskgroup altered.

SQL> alter diskgroup GIMR dismount;

Diskgroup altered.

SQL> alter diskgroup FRA mount;

Diskgroup altered.

SQL> alter diskgroup GIMR mount;

Diskgroup altered.



SQL>   select NAME, STATE, COMPATIBILITY  from  v$asm_diskgroup;

NAME                           STATE       COMPATIBILITY
------------------------------ ----------- -------------------
DATA                           MOUNTED     12.1.0.0.0
FRA                            MOUNTED     11.2.0.4.0
OCR_VOTE                       MOUNTED     11.2.0.4.0
GIMR                           MOUNTED     11.2.0.4.0

Drop ASM Diskgroup

Here is an example of how to drop an ASM disk group.

On racnode1:

SQL> connect / as sysasm
Connected.
SQL> drop diskgroup ocr;
drop diskgroup ocr
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup OCR is mounted by another ASM instance

On racnode2 ASM instance.

SQL> alter diskgroup ocr dismount;

alter diskgroup OCR dismount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group

$ sqlplus / as sysasm

SQL> alter diskgroup ocr dismount;

Diskgroup altered.

Back to racnode1 ASM instance, and drop the diskgroup ocr, which is not longer used and required. There are options:

INCLUDING CONTENTS:You must specify this clause if the disk group contains any files.
EXCLUDING CONTENTS: To ensure that Oracle ASM drops the disk group only when the disk group is empty. This is the default. If the disk group is not empty, then an error will be returned.
FORCE: Clears the headers on the disk belonging to a disk group that cannot be mounted by the Oracle ASM instance. The disk group cannot be mounted by any instance of the database.

SQL> drop diskgroup ocr;

drop diskgroup ocr
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "OCR" contains existing files
SQL>  drop diskgroup OCR INCLUDING CONTENTS;

Diskgroup dropped.

Find the ASM disk label:

[root@racnode2 ~]# /sbin/blkid
...
..
.
/dev/sdi1: LABEL="ASM_OCR_VOTE" TYPE="oracleasm"
...
..
..

Delete the asm disk “ASM_OCR_VOTE” on one node only:

[root@racnode1 ~]# oracleasm deletedisk ASM_OCR_VOTE
Clearing disk header: done
Dropping disk: done
[root@racnode1 ~]#

[root@racnode1 bin]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Cleaning disk "ASM_OCR_VOTE"
Scanning system for ASM disks...

Remove vdi file from VirtualBox.

  1. go to every VM –>settings –>storage, choose the right vdi file and removes seleted storage attachment.
  2. go to Virtual Media Manager –>hard disks Tab –> choose the right one, and  click ‘Remove’.