Detailed Oracle ASM anatomy

Source: Internet
Author: User

ASM: Automatic Storage Management is a practical solution strongly recommended by Oracle for Oracle database Storage. Oracle ASM is very similar to RDBMS, and Oracle ASM is also composed of files and instances, you can also use the sqlplus tool for maintenance.

You can also use the DBCA command to create and delete an ASM instance. You can configure automatic storage management on the first interface of dbca. The CSS process is required for the ASM instance. If it is not in the RAC environment, a script is prompted before the ASM instance is started.

$ ORACLE_HOME/bin/localconfig add start CSS.

1. The Oracle ASM instance is composed of SGA and background processes.

1. SGA composition:

The SGA of the ASM instance includes Buffer Cache, Share Pool, and Large Pool. Note that the Share Pool is used, because the Extent Map should be placed in the memory, and more data is required to estimate the size of the Extent Map and adjust it accordingly.

The Extent Map size can be estimated based on the sum of the sizes of all files. Use the following statement to calculate all files and:

 
 
  1. Select sum(bytes)/(1024*1024*1024) from v$datafile;  
  2. Select sum(bytes)/(1024*1024*1024) from v$logfile a, v$log b where a.Group#=b.Group#;  
  3. Select sum(bytes)/(1024*1024*1024) from v$tempfile where status='online';  

The sum of the three sums corresponds to the total size of all files in Oracle ASM stored in the database. For a disk group that uses External Redundancy, 1 MB Extent Map is required for every 100 GB, calculate the space required by Extent Map based on this ratio, and add an additional 2 MB. In practice, you do not need to consider the configuration of asm sga. You can use the default value provided by Oracle.

1.2 Background Process

The ASM instance has two more processes than the RDBMS instance: RBAL and ABRn.

RBAL: this process is also called the Rebalancer process, responsible for planning the Reblance activities of the asm disk group.

ABRn: A sub-process of the RBAL process. The number of sub-processes can be multiple. n ranges from 1 ~ 9. This group of processes is responsible for truly completing Reblance activities.

If you use ASM as the storage RDBMS instance, there will be two more processes: RBAL and ASMB.

RBAL: The main function of this process is to open the Rebalance of all disks and data on each disk.

ASMB: This process serves as an information channel between the ASM instance and the database instance. This process is responsible for communication with the ASM instance. It first obtains the connection string of the ASM instance managing the Diskgroup from CSS using Diskgroup Name, and then establishes a persistent connection to the ASM, the two instances periodically exchange information through this connection, which is also a heartbeat mechanism.

To use ASM as storage for RDBMS instances, the RDBMS instance must obtain the Extent Map from the Oracle ASM instance at startup. In the future, disk group maintenance will take place, the ASM instance also notifies the update information of the Extent Map to the RDBMS instance. The information exchange between the two instances is just completed by the ASMB process. That's why: the ASM instance must be started before the database instance and run in sync with the database instance, later than the database instance.

Note: The relationship between the ASM instance and the database instance can be either or. If it is 1: n, it is best to install a separate ASM_HOME for ASM.

2. ASM Configuration

ASM can use bare devices or ASMLib, because the maintenance of bare settings is complicated. Here we will only explain the ASMLib mode.

Different packages are required for different operating systems. The download must be consistent with the operating system kernel. My operating system is Red hat 4 update 7. The kernel version is 2.6.9-78. ELSMP.

 
 
  1. oracleasmlib-2.0.4-1.el4.i386.rpm  
  2. oracleasm-support-2.1.3-1.el4.i386.rpm  
  3. oracleasm-2.6.9-78.EL-2.0.5-1.el4.i686.rpm  
  4. linux/asmlib/index.html"  


Note that the CPU type is selected on this page. Oracle asmlib and support are downloaded on the same page.

Installation package:

 
 
  1. #rpm -ivh *.rpm 

After installation, configure:

 
 
  1. #/etc/init.d/oracleasm configure 

There will be a prompt to answer oracle, dba, y, and y.

Corresponding to the default user, default group, and set permissions when started with the system.

 
 
  1. /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1  
  2. /etc/init.d/oracleasm scandisks  
  3. /etc/init.d/oracleasm listdisks  

For more use of oracleasm, refer to help:

 
 
  1. [root@node1 ~]# /etc/init.d/oracleasm --help  
  2. Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure  
  3. |createdisk|deletedisk|querydisk|listdisks|scandisks|status}   

The above is a detailed description of Oracle ASM, hoping to help you in this aspect.

Related Article

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.