Oracle Automatic Storage Management (ASM) is the backbone of storage management in Oracle Exadata. Disk groups allow administrators to organize grid disks into logical collections that provide redundancy, performance, and integration with Exadata’s advanced features such as Smart Scan.
This article explains the procedure for creating ASM disk groups, key attributes, and best practices.
Step-by-Step Procedure
- Connect to the ASM Instance
- Set the environment variable:
$ setenv ORACLE_SID ASM_instance_SID
Log in with SYSASM privileges:
$ sqlplus / AS SYSASM
2. Check Available Grid Disks
- Query ASM to list Exadata grid disks:
SQL> SELECT path, header_status STATUS FROM V$ASM_DISK WHERE path LIKE 'o/%';
3. Create Disk Groups
DATA Disk Group (High Redundancy):
CREATE DISKGROUP data HIGH REDUNDANCYDISK 'o/*/DATA*'ATTRIBUTE 'AU_SIZE' = '4M', 'content.type' = 'data', 'compatible.rdbms'='11.2.0.4', 'compatible.asm'='19.0.0.0';
RECO Disk Group (High Redundancy):
CREATE DISKGROUP reco HIGH REDUNDANCYDISK 'o/*/RECO*'ATTRIBUTE 'AU_SIZE' = '4M', 'content.type' = 'recovery', 'compatible.rdbms'='11.2.0.4', 'compatible.asm'='19.0.0.0';
System Disk Group (Older Exadata pre-X7):
ALTER DISKGROUP dbfs_dg SET ATTRIBUTE 'content.type' = 'system','compatible.rdbms' = '11.2.0.4';
Sparse Disk Group (for snapshots/clones):
CREATE DISKGROUP sparsedg NORMAL REDUNDANCYDISK 'o.*/sparse_*'ATTRIBUTE 'AU_SIZE' = '4M', 'content.type' = 'data', 'cell.smart_scan_capable'='TRUE', 'compatible.rdbms' = '12.1.0.2', 'compatible.asm' = '19.0.0.0', 'cell.sparse_dg' = 'allsparse';
Key Notes
- Compatibility Requirements:
- Sparse disk groups require
compatible.asmandcompatible.rdbms≥ 12.1.0.2.0. - ASM disk group attributes override the ASM instance COMPATIBLE parameter.
- Sparse disk groups require
- Allocation Unit Size (AU_SIZE):
- Recommended = 4 MB for Exadata disk groups.
- Viewing Attributes:
- Use dynamic views to check disk group settings:
SQL> SELECT dg.name, a.name, a.value FROM V$ASM_DISKGROUP dg, V$ASM_ATTRIBUTE a WHERE dg.group_number = a.group_number;
Example Disk Group Attributes
| Disk Group | Attribute | Value |
|---|---|---|
| DATA | compatible.rdbms | 11.2.0.4 |
| DATA | compatible.asm | 19.0.0.0 |
| DATA | au_size | 4 MB |
| DATA | disk_repair_time | 3.6h |
| DATA | cell.smart_scan_capable | TRUE |
Using Disk Groups with Tablespaces
- Create tablespaces in ASM disk groups to leverage Exadata features:
SQL> CREATE TABLESPACE tablespace_name DATAFILE '+DATA';
Verify offload capability:
SQL> SELECT tablespace_name, predicate_evaluation FROM dba_tablespaces WHERE tablespace_name = 'DATA_TB';
If predicate_evaluation = STORAGE, queries are offloaded to Exadata storage for faster performance.
Best Practices
- Always set AU_SIZE = 4 MB for optimal scan performance.
- Use proper
content.typevalues (data,recovery,system) for fault tolerance. - Ensure disk groups only contain Exadata grid disks.
- Regularly verify attributes using ASM dynamic views.
- Place frequently queried tables in disk groups that support Smart Scan offload.
Conclusion
Creating ASM disk groups in Oracle Exadata is essential for efficient storage management, redundancy, and performance optimization. By following the recommended attributes, compatibility requirements, and best practices, administrators can ensure reliable and scalable database operations while fully leveraging Exadata’s advanced features.