Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basic knowledge points of ASM 11R2

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

What are the basic knowledge points of ASM 11R2? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

1 basic concepts

The ASM instance is always in the state of started or mounted. 11R2 has the status of ready registered in the listener, that is, remote access is supported.

The connection string is registered with CSS at startup, and the database instance is read by ASMB when it is started to establish a connection with ASM. ASM uses the foreground process UFG to contact the database instance.

Disks are allocated in AU and are specified when creating a disk group, with a range of 1-64m

ASM files are in units of extent, and an extent can correspond to several AU. In order to avoid excessive SGA,oracle for managing large files, a variable size Extent is used.

Range 0-20000, extent = AU

Range 20000-40000, extent = 4 * AU

> 40000 extentwings 16 * AU

It is generally recommended that ASM extent be equal to or an integral multiple of DB extent

The paths of the same disk in different RAC nodes can be inconsistent, depending on its disk head to determine whether it is the same disk.

2 Mirror and stripe

Mirror image

ASM uses extent mirroring instead of disk mirroring. If a disk fails, the interval pointer can be redirected to the interval mirror with the help of disk partners.

Under normal and high redundancy strategies, ASM saves primary interzone and interval mirrors in different fault groups.

ASM's disk partner maintains the extent mirror copy, which is stored in the PST partner status table; ASM automatically selects the disk partner based on the fault group definition, which is specified when the disk group is created

There can be up to 10 active partnerships on disk, and drop disk will trigger a reset to form a new partnership, which PST tracks until rebalance completes

Too much nesting of disk groups may run out of space and cause ORA-15074 diskgroup requires rebalance completion

In normal and high disk groups, you can specify redundancy levels for files separately

Striping

AU is stored on different disks of the same fault group, which is divided into coarse-grained and fine-grained.

Coarse-grained: stripe = AU. When the interval is more than 20000, the AU of an extent can be located on different disks to improve IO throughput.

Fine-grained: stripe = 128K, reducing IO latency, suitable for online logfile (fine-grained disk groups can be established separately)

The file template determines the striping type, and select the default template if the specified is not displayed when the file is created

3 data structure

Divided into physical metadata and virtual metadata

3.1 physical metadata

Stored in the first 2 AU on disk for necessary ASM boot

3.1.1 the first block of the first AU of the disk head, with a size of 4K

Disk name / disk number

Disk group / fault group name

Disk / AU size

Creation / load time

ASM/DBMS compatibility

File directory pointer

3.1.2 AT allocation Table

Record the AU usage of the disk. Each AU corresponds to an allocation entry ATE (entry), and multiple ATE form an ATB (block).

When AU is used by a file, its ATE records file no + extent no

The assigned AU is marked as free, while the free extent is stored in a linked list for allocation

It is complementary to virtual metadata file directory and can be implemented through alter diskgroup. Check verifies its consistency

3.1.3 FST free space table

Each ATB contains a FST entry that describes the free extent under it

ASM skips full ATB through FST when requesting space allocation

3.1.4 PST Partnership Table

Occupy the second AU to track disk group members and disk partners, through which ASM determines whether the disk group has enough disks online

For each disk, PST records disk status + number of partners + partner list

A disk group can have only one active PST at any time. By default, a fault group contains 1 PST.

PST copy: PST shadow is a copy of active PST (the two are on different disks). The copy is updated with active PST, and the latter two roles are exchanged.

The last block of PST is used for disk heartbeat, 1 to avoid disk groups being loaded in different clusters at the same time, similar to control files

3.2 Virtual metadata

Located in the ASM file, it is divided into directories and registers. The former is a metadata file accessed independently by ASM, with the file number starting from 1; the latter is counted upside down from 255.It is a reserved ASM file.

3.2.1 File directory

Contains the metadata of all ASM files, corresponding to the AT of the physical metadata; the file number is 1

Incarnation number + file size + file type + redundancy level + strip level + created/modified time + file layout

After the ASM file is deleted, the file number can be reused, but the incarnation number can not be the same, thus ensuring the uniqueness of the file.

File layout: consists of interval pointers, including the disk number and AU number corresponding to the interval. A file directory contains 60 direct interval pointers and up to 300 indirect intervals

3.2.2 Disk directory

Contains all the information about the disk group, corresponding to but more detailed than PST, file number 2

3.2.3 ACD

Similar to redo log, file number 3

Each ASM instance has a 42m ACD chunk, the first block contains an on / off status and checkpoint (updated once every 3 seconds), and the rest is recycled

3.2.4 COD

Similar to undo, tracking takes a long time for operations such as rebalance/ file creation, file number 4

If the current instance fails to execute rebalance, other nodes in the cluster can restart the operation.

The rest are template directory, alias directory and attribute directory.

3.2.5 Staleness registry

Available when compatible.rdbms > = 11.1 and redundancy similar to normal or high, file number 254

Get a slot in SR when the disk is offline, assign one bit to each AU of the disk, and set the bit bit of AU if a write operation occurs during offline

When the disk online again, ASM completes the fast mirror resync of 11R2 by synchronizing data from the mirror interval according to the updated bit bits in slot

4 interact with database

Create a file

RDBMS sends a file creation request to ASM. ASM allocates space and returns extent map to RDBMS. The file name format is + / /.

RDBMS initialization files, which are created by COD tracking files that have not been completed

If RDBMS submits a completion request, ASM's LGWR clears ACD,DBWR update AT and file directory and alias directory; if RDBMS cancels the creation request, ASM uses COD rollback

Deleted files are also tracked by COD and rolled back in case of failure

Open a file

RDBMS sends a request to ASM, which returns the extent map of the file to RDBMS;11G. It sends 60 direct intervals first, and then transmits indirect intervals according to the RDBMS request.

Reading error

The mirror interval is automatically selected when there is an error in the main interval, and 11g can also automatically repair the bad blocks in the main interval.

If the ASM instance cannot read the virtual metadata, it will be forced to unmount the disk group, and if it cannot read the physical metadata of the disk, it will be offline

Writing error

If the ASM instance receives a write error, try the disk offline, and check the partner disk status through PST. If many partner disks also offline, the disk group is forced to be unmounted.

Pass messages to other ASM instances to update RDBMS instances

Compatible.rdbms > = 11.1 disk_repair_time specifies the maximum time for which the disk can offline

The answers to the questions about the basic knowledge of ASM 11R2 are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report