ASM Disk and directory management

Source: Internet
Author: User
Tags file system requires root directory

The ASM disk is an important part of the ASM architecture, and the ASM disk is positioned and managed by the ASM instance, which focuses on the ASM Disk group, the failure group, and so on.

I. Related Concepts

1.ASM Disk Group

ASM Storage Management In addition to the ASM instance, the largest component is the ASM Disk group. An ASM disk group is made up of too many ASM disks

A disk group can hold multiple data files, a data file can only be in one disk group, not across the disk group

Multiple databases can share the same or multiple disk groups

The redundancy types of disk groups can be grouped into three categories: standard redundancy, high redundancy, external redundancy

You cannot change the level of redundancy for a disk group that you have created, and if you want to change it, you need to delete the disk group and then recreate it

2.ASM disk

ASM disks are accessed through standard OS interfaces, read and write by Oracle users, and all nodes in the cluster can be accessed

ASM disks can use different names in different nodes

The ASM disk enables the network file system

The object on the ASM disk is protected by redundancy

The first block of each ASM disk is used to define the disk's header information, the ASM disk name number, the timestamp created, etc.

The ASM files are evenly distributed across the disks in an ASM group

3.ASM Fault Group

A disk group can be composed of two or more failed groups

A failure group consists of one or more ASM disks

Failure groups provide redundancy to share the same resources, so we can understand standard redundancy

Given the disk group DG1 and the creation of two failed group fgroup1,fgroup2, each of which consists of an ASM disk, two failed groups mirror each other for standard redundancy

Failgroup1--> Asmdiska, ASMDISKB

Failgroup2--> ASMDISKC, ASMDISKD

Assuming that the file Datafilea size is 4MB, the 4extent is evenly distributed to ASMDISKA,ASMDISKB, ASMDISKC,ASMDISKD also contains the file's extent

That is, as long as there is a extent in the fault group FGROUP1, there must be a mirrored extent in fgroup2, and vice versa, two extent mirroring each other.

When a disk in a failed group is corrupted and is assumed to be Asmdiska, the extent Asmdiska in the central plains will be copied from failgroup2 to ASMDISKB.

In short, the fault group FAILGROUP1 and Failgroup2 must have the same extent copy

Standard redundancy requires at least 2 failure groups, and high redundancy requires at least 3 failed groups. In fact, a standard redundancy requires at least 2 for the failure group to be explicitly specified

ASM disk, and high redundancy requires at least 3 ASM disks

4. Allocation unit

The minimum granularity of the ASM disk is the allocation unit, which is 1M in size by default, and can be set to 128K for fine-grained access

Supports both coarse grained and fine-grained allocation units for load balancing and reduction of latency

The ASM file consists of a collection of allocation units

5.ASM file

For Oracle itself, it's actually not much different from standard files.

ASM files typically reside within subdirectories created within a disk group, with the disk group beginning with a plus sign, which is equivalent to the root directory of the Linux system

such as +dg1/oradb/datafile/system.258.346542

ASM can be used for control files, data files, online log files, parameter files, archive logs, backups, etc.

Trace files, executables, Ocr,votingdisk, etc. are not supported, note: Oracle 11g R2 can support

Use extent maps to log file to disk mapping

6.I/O distribution

You can use striped and mirrored to protect data

Files are evenly distributed across all disks in a group

The addition and deletion of the disk, ASM will automatically redistribute AU, so there is no fragmentation problem

Improved read-write data by batching I/O to different disk controllers

7.Rebalance

The ASM files are evenly distributed across all disks in a disk group

When a disk is added, a portion of the extent that is shared on all disks loaded by the current disk group will be ported to the new disk until the redistribution is complete to provide I/O balance normally

In the case of a disk deletion or failure, the extent of the deleted or failed disk will be evenly distributed to the remaining disks

The Force keyword Drop disk operation is not used, and all data on the disk is rebalance after it has finished. After that, the disk is offline and the disk head status is former

In short, any change in the nature of the storage (disk increase, deletion, failure) will lead to rebalance, and automatically completed by ASM, without human intervention, in a time period will usually lock a disk area

8.ASM Disk Group Management

It is generally recommended that you create two disk groups, one for saving data files, one for saving flashback, and for backup recovery using

The size of the Flash Recovery area depends on how long the flash-back content needs to be retained

Use a different physical channel for the data area and the flashback area whenever possible

Mount all required disks as one-time as possible

It is recommended that you use a disk of similar disk size and performance. Assuming that two failed groups fg1,fg2 each use one disk, the disks within the FG1 should remain the same size as the disks within the FG2.

Otherwise, the minimum disk space is used as the available space

How to manage a 9.ASM disk group

Sqlplus

Oem

DBCA

Asmcmd

II. ASM disk creation and management

1. View ASM Configuration Disk Search information

Sql> Show Parameter Instance_type

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Instance_type string ASM

Sql> Show Parameter Asm_diskst

NAME TYPE VALUE

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.