ASM (Automatic Storage Management)
ASM is a specialized storage management feature of Oracle Database that simplifies storage management and improves database performance by automating the allocation and management of storage resources.
ASM organizes disks into disk groups and allows you to manage redundancy and performance optimization without needing to manually configure storage on the operating system level.
Key Functionality of ASM:
Disk Group Management:
- ASM organizes disks into disk groups for storage allocation. These groups act as logical containers for database files.
Disk Redundancy:
- ASM provides redundancy through mirroring (RAID-like functionality). Redundancy ensures that data is not lost in case of disk failure, with options like Normal and High redundancy.
Automatic I/O Load Balancing:
- ASM automatically balances I/O operations across disks in a disk group, minimizing manual tuning efforts.
File Management:
- ASM eliminates the need for specifying file locations and mount points for database files (e.g., data files, redo logs), as files are stored directly in ASM-managed disk groups.
Support for Large Files:
- ASM is capable of handling large files, making it suitable for environments with large amounts of data or high-performance requirements.
ASM Initialization Parameters and Instance Creation
The following are important ASM-specific initialization parameters used during the creation and configuration of an ASM instance:
INSTANCE_TYPE:
- Defines the type of instance: ASM (for ASM instances) or RDBMS (for database instances). Default is RDBMS.
DB_UNIQUE_NAME:
- Specifies a globally unique name for the database. The default value is +ASM, but if multiple ASM instances are used, this should be unique across all instances.
ASM_POWER_LIMIT:
- Controls the maximum power for a rebalancing operation. Valid values range from 1 to 11, with 1 being the default. Higher values use more system resources and result in faster rebalancing. This is applied during operations like adding or removing disks.
ASM_DISKGROUPS:
- Specifies the disk groups that should be mounted by the ASM instance upon startup or through commands like ALTER DISKGROUP ALL MOUNT.
ASM_DISKSTRING:
- Limits the discovery of disks by specifying a pattern or location. The default is NULL, meaning all available disks will be considered for ASM use.
Startup and Shutdown of ASM Instances
ASM instances are started and stopped in a similar manner to database instances, with some specific options:
Startup Options:
- FORCE: Forces a SHUTDOWN ABORT before restarting the ASM instance.
- MOUNT: Starts the ASM instance and mounts the specified disk groups.
- NOMOUNT: Starts the ASM instance without mounting any disk groups.
- OPEN: Not applicable to ASM instances.
Shutdown Options:
- NORMAL: Waits for all connections to finish and shuts down gracefully.
- IMMEDIATE: Does not wait for SQL transactions to complete but will shut down once they are finished.
- TRANSACTIONAL: Similar to IMMEDIATE, but ensures that pending transactions are rolled back before shutdown.
- ABORT: Shuts down the ASM instance immediately without waiting for any ongoing processes.
Disk Management in ASM
Creating Disk Groups:
The CREATE DISKGROUP
command allows you to create a disk group with specific redundancy options:
- Normal Redundancy: Requires two failure groups with mirrored disks (2-way mirroring).
- High Redundancy: Requires three failure groups with mirrored disks (3-way mirroring).
- External Redundancy: Disks are protected by external RAID or hardware-based mirroring.
Dropping Disk Groups:
- The
INCLUDING CONTENTS
option removes all files in the disk group along with the disk group.
Adding/Deleting Disks:
To add new disks to a disk group:
To remove a disk:
Resizing Disks:
To resize a specific disk:
To resize all disks in a failure group:
To resize all disks in the disk group:
Rebalancing Disk Groups
Rebalancing ensures the data is evenly distributed across all disks in a disk group. The POWER parameter controls the speed of the rebalancing process.
Higher values for POWER
result in faster rebalancing but higher resource usage.
ASM Directories and Aliases
ASM allows the management of directories and aliases:
Creating and Managing Directories:
- Create Directory:
- Rename Directory:
- Drop Directory:
Creating and Managing Aliases:
- Create Alias:
- Rename Alias:
- Delete Alias:
Dropping Files from ASM:
ASM Views
ASM provides several views for monitoring and managing ASM instances:
- V$ASM_DISKGROUP: Lists disk groups managed by the ASM instance.
- V$ASM_DISK: Displays disks, both part of disk groups and not, along with their status.
- V$ASM_CLIENT: Displays database instances using ASM disk groups.
- V$ASM_FILE: Lists files within disk groups.
- V$ASM_ALIAS: Shows all aliases in use within ASM.
- V$ASM_OPERATION: Displays ongoing long-running operations, such as rebalancing.
ASM Background Processes
ASM instances have various background processes to manage disk operations and communication with the database:
ARBn (ASM Rebalance Process):
Rebalances data extents across ASM disks.ASMB (ASM Background Process):
Coordinates and communicates with the database instance for storage management tasks.GMON (ASM Disk Group Monitor):
Monitors the health and status of mounted ASM disk groups.ABMR (Auto BMR Background Process):
Manages automatic block media recovery (BMR) requests.ACFS (ASM Cluster File System):
Manages the cluster file system in an ASM environment.Bnnn (ASM Blocking Slave Process):
Helps GMON with maintenance tasks related to disk groups.
How to List Disk Groups in ASM:
Use the following commands to list disk groups in an ASM instance:
- Using SQL:
- Using ASM Command Line:
No comments:
Post a Comment