Disclaimer

Sunday 11 July 2021

Oracle ASM Flex Redundancy and Flex Disk Groups

 

What is ASM Flex Disk Groups?

An Oracle ASM flex disk group is a disk group that supports Oracle ASM file groups.

What is an Oracle ASM File Group?

An Oracle ASM file group describes a group of files that belong to a database.

What are the Characteristics Oracle ASM Flex Disk Groups?

  • The redundancy of a flex disk group is FLEX REDUNDANCY and each file group in the flex disk group has its own redundancy.
  • A flex disk group requires a minimum of three failure groups and tolerates failure like NORMAL redundancy.
  • A flex disk group generally tolerates two failures, the same as a HIGH redundancy if there are five failure groups
  • The failure tolerated by a database is dependent on the redundancy setting of its associated file group in the flex disk group
  • File groups of flex disk groups are used to describe database files. Each database has its own file group, and storage management can be done at the file group level, in addition to the disk group level.
  • You can convert a NORMAL and HIGH redundancy DG to FLEX Redundancy DiskGroup.
  • The default size of the allocation unit (AU) is 4 M.
  • The Virtually Allocated Metadata (VAM) is enabled and required for a flex disk group
  • The COMPATIBLE.ASM and COMPATIBLE.RDBMS disk group attributes must be set to 12.2 or greater

How to Create Flex Diskgroup

SQL> CREATE DISKGROUP DG_FLEX_DATA FLEX REDUNDANCY DISK 'AFD:DISK15','AFD:DISK011','AFD:DISK10';
Diskgroup created.

SQL> select GROUP_NUMBER,NAME,STATE,TYPE from v$asm_diskgroup where GROUP_NUMBER=5 ;
GROUP_NUMBER NAME                           STATE       TYPE
------------ ------------------------------ ----------- ------
           5 DG_FLEX_DATA                   MOUNTED     FLEX



How To Migrate a DiskGroup to FLEX DiskGroup

To migrate a DG to FLEX diskgroup following is required

1> Only NORMAL or HIGH redundancy DiskGroups can be migrated to FLEX diskgroup
2> Diskgroup must be mounted in RESTRICTED mode.
3> Compatible.asm and  Compatible.rdbms of the diskgroup should be 12.2.0.0.0 or higher
4> Requires at least 3 failure groups

I created a diskgroup DG_NORMAL with NORMAL redundancy. I will convert this DG to from NORMAL to FLEX Diskgroup to demonstrate the steps.


Create the Diskgroup
SQL> CREATE DISKGROUP DG_FLEX_DATA FLEX REDUNDANCY DISK 'AFD:DISK15','AFD:DISK011','AFD:DISK10';
Diskgroup created.


SQL> select GROUP_NUMBER,NAME,STATE,TYPE from v$asm_diskgroup where GROUP_NUMBER=5 ;

GROUP_NUMBER NAME    
------------ ------------------------------ ----------- ------
           5 DG_FLEX_DATA                   MOUNTED     FLEX





Configure compatible.asm and compatible.rdbms  to 12.2 for the Diskgroup:_

SQL> select NAME,VALUE,GROUP_NUMBER from  v$asm_attribute where GROUP_NUMBER=5 and NAME like '%compatible.asm%';
NAME            VALUE           GROUP_NUMBER
--------------- --------------- ------------
compatible.asm  11.2.0.2.0                 5


SQL> ALTER DISKGROUP DG_NORMAL SET ATTRIBUTE 'compatible.asm' = '12.2';
Diskgroup altered.

SQL> ALTER DISKGROUP DG_NORMAL SET ATTRIBUTE 'compatible.rdbms' = '12.2';
Diskgroup altered.


SQL> 
select NAME,VALUE,GROUP_NUMBER from  v$asm_attribute where GROUP_NUMBER=5 and NAME like '%compatible.asm%';
NAME            VALUE           GROUP_NUMBER
--------------- --------------- ------------
compatible.asm  12.2.0.0.0                 5





Mount the Diskgroup in Restricted Mode

SQL>  alter diskgroup DG_NORMAL dismount;
Diskgroup altered.

SQL>  alter diskgroup DG_NORMAL mount restricted;
Diskgroup altered.




Convert the Diskgroup to FLEX Diskgroup

SQL> ALTER DISKGROUP DG_NORMAL CONVERT REDUNDANCY TO FLEX;
Diskgroup altered.

SQL> select GROUP_NUMBER,NAME,STATE,TYPE from v$asm_diskgroup where GROUP_NUMBER=5 ;
GROUP_NUMBER NAME            STATE       TYPE
------------ --------------- ----------- ------
           5 DG_NORMAL       RESTRICTED  FLEX





Mount the Diskgroup normal

SQL> alter diskgroup DG_NORMAL dismount;
Diskgroup altered.

SQL> alter diskgroup DG_NORMAL mount;
Diskgroup altered.

SQL> select GROUP_NUMBER,NAME,STATE,TYPE from v$asm_diskgroup where GROUP_NUMBER=5 ;
GROUP_NUMBER NAME            STATE       TYPE
------------ --------------- ----------- ------
           5 DG_NORMAL       MOUNTED     FLEX






No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...