Oracle 12c – Manage ASM disks and disk groups

An ASM disk group consists of multiple disks and is the base object ASM manages.  Disk Groups contain information for ASM to manage drive space.  Sub-components of a Disk Group are Disks, files, and allocation units.  A disk group can contain files from several different databases and a single database can use files from multiple disk groups.

Disk Group attributes are parameters that belong to disk group and not the ASM instance.  Common ASM disk group attributes are:

  • ENABLED – Can be TRUE or FALSE – determines if access control is possible. Default is false and have to use alter disk group to change.
  • UMASK – determine the permission mask on created oracle ASM user file. Permission for owner, users in same user group, and users not in users group.  Applies to all files on a disk group.
  • AU_SIZE – File extent consists of one or more allocation units. Oracle ASM file consists of one or more file extents.   When creating disk group, you can set the Oracle ASM allocation unit size, value can be 1, 2, 4, 8,16,32,64 MB, depending on the specific disk group compatibility level.
  • ASM – The attribute defines the version used. ASM version must be greater or equal to COMPATIBLE.RDBS version to access disks.  If COMPATIBLE.ASM is 11.0 any database instance with version of 10.1 or higher can access, but to manage disk group it must be 11 or higher.
  • RDBMS – controls the format of message between ASM instance and database instance. Defines the minimum database client release that can access a disk group.
  • TYPE – Id disk group type: data, recovery, or system. Determines the distance to nearest neighbor disk in failure group mirror.   Default is data giving value of 1, recovery – 3, and system – 5 to nearest disk group.
  • DISK_REPAIR_TIME – Amount of time a disk can be unavailable to failure before it is dropped from disk group.  To use both COMPATIBLE.ASM and COMPATIBLE.RDBMS must be set to 11.1 or higher.  Cannot set during disk group creation, but use ALTER DISKGROUP… SET ATTRIBUTE.    Default is 3.6 hours.  If either ASM or RDBMS are set to less then 11.1, disk is immediately dropped from disk group.

 

CREATE DISKGROUP SQL command is used to create diskgroups and specifies the following:

  1. Unique diskgroup name.
  2. Redundancy level:
    1. NORMAL REDUNDANCY – 2 way mirroring is the default
    2. HIGH REDUNDANCY – 3 way mirroring
    3. EXTENAL REDUNDANCY – no mirroring
  3. Disks to format for diskgroup.
  4. Optional – specify disk to specific failure groups.
  5. Optional – specify type of failure group.
  6. Optional – specify diskgroup attributes software compatibility or allocation unit size.

 

Example:

CREATE DISKGROUP data NORMAL REDUNDANCY

FAILGROUP fg1

DISK ‘/u01/ diska1’ NAME diska1,

‘/u01/ diska2’ NAME diska2,

‘/u01/ diska3’ NAME diska3

FAILGROUP fg2

DISK ‘/u01/ diskb1’ NAME diskb1,

‘/u01/ diskb2’ NAME diskb2,

‘/u01/ diskb3’ NAME diskb3

ATTRIBUTE ‘au_size’ =’ 2M’, ‘compatible.asm’ = ‘11.2’, ‘compatible.rdbms’ = ‘11.2’;

 

The ALTER DISKGROUP SQL statement enables you to alter a disk group configuration. It is possible to add, resize, or drop disks while the database remains online. Multiple operations in a single ALTER DISKGROUP statement are both possible and recommended. Grouping operations in a single ALTER DISKGROUP statement can reduce rebalancing operations. Oracle ASM automatically rebalances a disk group when its configuration changes. The V$ASM_OPERATION view allows you to monitor the status of rebalance operations. The following command adds two more disks to the data diskgroup.

 

ALTER DISKGROUP data ADD DISK ‘/u01/ diska4’ NAME diska4, ‘/u01/ diska5’ NAME diska5;

 

When rebalancing a disk group, if the POWER clause is not specified in an ALTER DISKGROUP statement, or if a rebalance is executed implicitly because a disk has been added or dropped, the ASM_POWER_LIMIT initialization parameter determines the power used. The value of this parameter can be adjusted dynamically. Higher power values will cause a rebalance operation to complete faster, but consumes more processing and I/ O resources. The default value of 1 minimizes disruption to other applications.

 

 

Larry Catt

OCP