About Oracle ASM instances
About Oracle ASM disk groups
About grouping and failure groups
About Oracle ASM Disks
About Oracle ASM files
The Oracle ASM instance is built based on the same technology as the Oracle database instance. Oracle ASM instance has a system global area (SGA) and background process similar to the Oracle database instance. However, Oracle ASM runs fewer tasks than database instances, and Oracle asm sga is much smaller than SGA of database instances. In addition, Oracle ASM has little impact on server performance. Responsible for Oracle ASM instances
Mount the disk to make the Oracle ASM file available to the database instance. The Oracle ASM instance does not mount the database.
Oracle ASM is installed in Oracle grid infrastructure home, while Oracle database is installed in a separate Oracle Home. Both Oracle ASM and database instances need to share and access disks in the disk group. The Oracle ASM instance is responsible for managing the metadata of the disk group and providing the file layout information for the database instance.
Oracle ASM uses Oracle ASM metadata to control disk groups. The Oracle ASM metadata is located in the disk group and contains the following information:
Ing between a disk and Its disk group
Size of available space on the disk
File Name on the disk
Location of the extent of the data file in the disk group
Redo log that records information about automatically changing metadata Blocks
Oracle advm volume information
Oracle ASM can be clustered using Oracle clusterware software. Each cluster node has one Oracle ASM instance. If multiple synchronized database instances exist on the same node, these database instances share an oracle ASM instance on the node.
If an oracle ASM instance on a node fails, all database instances on the Node also fail. Unlike the file system drive, an oracle ASM instance does not need to be restarted if it fails. In the Oracle RAC environment, the Oracle ASM instances and database instances on the surviving nodes are automatically restored from the Oracle ASM instances on the failed nodes.
Figure 1-1 shows the configuration of a Single-node Oracle ASM instance serving multiple database instances. The Oracle ASM instance manages metadata and does not provide space allocation for the Oracle ASM file. When a database instance creates or opens an oracle ASM file, the database instance first sends a request to the Oracle ASM instance. Then, Oracle ASM will respond and provide the extent bitmap information for the database instance.
In Figure 1-1, there are two disk groups: one disk group has four disks and the other has two disks. The database can access these two disk groups. Figure 1-1 shows that only one Oracle ASM instance can provide service configurations for multiple database instances.
Figure 1-1 Oracle ASM for single-instance Oracle databases
Figure 1-2 shows an oracle ASM cluster in the Oracle RAC environment. Oracle ASM provides a cluster-based storage pool. Each node has an oracle ASM instance, and multiple Oracle RAC databases or single-instance databases in the cluster provide services. All databases are integrated and share two Oracle ASM disk groups.
Figure 1-2 Oracle ASM cluster configuration with Oracle RAC
As shown in figure 1-3, a cluster storage pool can be shared by multiple single-instance Oracle databases. In this case, multiple databases share the shared disk group. The shared Oracle ASM storage pool can be implemented through Oracle clusterware. Note that Oracle RAC license is not required in such environments.
Whether or not you want to install Oracle RAC on a node, to share a disk group on multiple nodes, you must install Oracle clusterware on all nodes to be shared. The Oracle ASM instance on a single node does not need to be part of the Oracle ASM cluster. However, if the Oracle ASM instance does not belong to an oracle ASM cluster, nodes cannot communicate with each other. Multiple nodes that do not belong to an oracle ASM cluster cannot share the Oracle ASM disk group.
Figure 1-3 Oracle ASM cluster with single-instance Oracle databases
About Oracle ASM disk groups
A disk group consists of multiple disks and is the basic object for Oracle ASM management. Each disk group contains metadata used for space management in the disk group. The disk group components include disks, files, and allocation units.
The Oracle ASM file is allocated in the disk group, and all Oracle ASM files are completely included in a single disk group. A disk group can contain files belonging to multiple databases. A database can use a warm-up instance from multiple disk groups. For most installation configurations, only two to three disks are required.
About grouping and failure groups
Image Technology can protect data integrity by storing data copies in multiple disks. When creating a disk group, you must specify the type of the Oracle ASM disk group based on the following three redundancy levels:
Normal: 2-way processing ing
High: 3-way processing ing
External: Oracle ASM image technology is not used, and raid and other hardware redundancy technologies are used.
The redundancy level controls how much disk failures can be tolerated without dismount the disk group or data loss. The disk group type determines the image level of the files created by Oracle in the disk group.
Oracle ASM images are much more flexible than traditional raid images. For a disk group with a non-normal redundancy level, you can specify a redundancy level for each Oracle ASM file. For example, two files that share the same disk group can create an image for one of the files, and the other can not create an image.
When Oracle ASM assigns an extent to the image file, Oracle ASM allocates a primary copy and a mirror copy. Oracle ASM selects the failure group (fault group) that is synchronized with the disk where primary copy is located to store mirror copy. A fault group is used to store image copies of data, so that each copy is stored on disks in different fault groups. In this way, when all disks in a fault group fail, data will not be lost.
When creating an oracle ASM disk group, you can define a fault group for the disk group. After a disk is created, the redundancy level of the disk cannot be modified. If you ignore the specified fault group, Oracle ASM puts each disk into its fault group (except for the disk groups on Oracle exadata cell ). The normal redundant disk group requires at least two fault groups. A high redundant disk group requires at least three disk groups. External redundant disk groups do not need to use fault groups.
About Oracle ASM Disks
An Oracle ASM disk is a storage device used to configure an oracle ASM disk group. Oracle ASM disk examples include:
Disks or partitions on the storage array
Partitions on a whole disk or disk
NFS (Network-attached files)
When you add a disk to a disk group, you can manually allocate the Oracle ASM disk name or enable Oracle ASM to automatically allocate the Oracle ASM disk name. This name is different from the path used by the operating system. In a cluster, a disk may be assigned different operating system device names on different nodes, but the disk has the same oracle ASM disk name on all nodes. In a cluster, the Oracle ASM disk must be accessible from all instances that share the disk group.
Oracle ASM distributes files evenly across all disks in the disk group. This allocation method maintains each disk at the same capacity level to ensure that all disks in the disk group have the same I/O load. Since Oracle ASM distributes Load Balancing across all disks in the disk group, different Oracle ASM disks do not need to share the same physical drive.Allocation units
Each Oracle ASM disk is divided into several allocation units (Au ). The allocation unit is the basic unit for disk space allocation. A file extent consists of one or more allocation units. The Oracle ASM file is composed of one or more file extent.
When creating a disk group, you can use
AU_SIZEThe disk group attribute specifies the size of the Oracle ASM allocation unit. This value can be set to 1, 2, 4, 8, 16, 32, or 64 MB, depending on the Compatibility Level of the specified disk group. For data warehouse applications, there are a large number of sequential reads, a large au size, usually providing better performance advantages.
The files stored in the Oracle ASM disk group are called Oracle ASM files. Each Oracle ASM file package is contained in a single oracle ASM disk group. Oracle Database interacts with Oracle ASM as a file. This is similar to the file on any file system used by Oracle database. Oracle ASM disk groups can store the following types of files:
Data files, temporary data files, and data file copies
Online redo log, archive log, and flashback log
Disaster recovery Configuration
Change tracking bitmap
Data Pump dumpset
Oracle ASM will automatically generate the name of the Oracle ASM file when creating files and tablespaces. The Oracle ASM file name uses the plus sign (
+. You can specify a user-friendly alias for the Oracle ASM file to create a hierarchical directory structure for the alias.
The Oracle ASM file contains the following components:
Oracle ASM striping
The content of the Oracle ASM file is stored in a disk group in the form of a group or a series of extent files stored on each disk in the disk group. Each extent is located on a separate disk. Extent is composed of one or more allocation units (Au. To adapt to the increasing file size, Oracle ASM uses a variable-size extent.
For a very large database, the variable size extent can support larger Oracle ASM data files, reduce the number of requests to the SGA memory, and improve the file creation and opening performance. The size of the initialized extent is equal to the size of the allocation unit of the disk group, which increases continuously according to the predefined coefficient of 4 or 16. When the compatibility attribute of a specified disk group is set to 11.1 or above, this feature automatically creates a data file and recharges the size of the data file.
The extent size varies as follows:
In the first 20000 extent set (0-19999), the extent size is always equal to 1 * Au of the disk group.
In the next 20000 extent set (20000-39999), the size of extent is 4 * Au.
In more than 40000 extent sets, the size of extent is equal to 16 * Au.
Figure 1-4 shows the relationship between the extent of the Oracle ASM file and the allocation unit. The first eight extent (0 to 7) are distributed on four Oracle ASM disks and the size is equal to 1 * Au. After the first 20000 extent set, the size of extent in the next 20000 extent set (20000-39999) is changed to 4 * Au. This is shown as bold rectangles extent 20000 ~ 20007
To 4 * Au, use the bold rectangle label.
Figure 1-4 Oracle ASM file allocation in a disk groupOracle ASM striping
Oracle ASM strip has the following two purposes:
Distribute the Server Load balancer across all disks in the disk group.
Reduces I/O latency
ASM strip is divided into coarse-grained strip and fine-grained strip. Coarse-grained strip is used as a disk group to provide load balancing, while fine-grained strip can reduce the I/O latency of a specific file type by widely distributing loads.
To strip the data, Oracle ASM stores the files in strip and distributes the data in the files evenly across all disks in the disk group. In any configuration, the size of the fine-grained strip is always equal to 128 kb, which can provide a low I/O latency for small I/O operations. The size of the coarse-grained strip is always equal to the AU size (the size of the non-data extent ).
Figure 1-5 and figure 1-6 show the striping of Oracle ASM files. In the two figures, the AU size is 1 m (
1M). The disk group consists of eight disks. The instance version is Oracle ASM 11g Release 2 (11.2), and the compatibility attribute of the disk group ASM and RDBMS is set
11.2. The figure shows the extentThe size of extent is 1 m and 1 * Au. For the next 20,000 extent set, the size of extent is 4 MB, which is equal to 4 * Au.
In Figure 1-5, the file uses 128 K small blocks (with ...... X is a tag), and each 128 K small block is stored in an extent, starting from the first extent in Disk 1, followed by the first extent in Disk 2, then it is distributed cyclically on all disks until the entire file is striped. As shown in this example, the striped small block first fills up the first extent of each disk, and then fills in the second extent of each disk until the entire file is fully striped.
Figure 1-5 Oracle ASM fine-grained striping
In Figure 1-6, the file takes 1 m small blocks (with ...... X is the tag). Each 1 m small block is stored in an extent, starting from the first extent of Disk 1, it is the first extent of Disk 2 in turn, and then distributed in a circular manner on all disks until the entire file is striped. For the first 20,000 extent, the extent size is equal to 1 * Au (1 m), the strip size is equal to the extent size and the allocation unit size. For a variable extent
Extent is composed of multiple allocation units. The file strip is located in the AU of extent. Before the strip extension to the next extent, the strip blocks are located in the allocation unit of the first extent of all disks.
Figure 1-6 Oracle ASM coarse-grained stripingFile templates
A template is a series of attribute values used to specify the disk area, file image, and strip attributes when creating an oracle ASM file. When creating a file, you can include a Template Name and assign the required attributes to each file instead of the file type.
The default template is used for all Oracle file types and can be customized to meet specific requirements. All disk groups have a default template for each file type.
For reprinting, please indicate the author's source and original article links; otherwise, you will be held legally responsible: