How to create an ASM instance and an ASM database

Source: Internet
Author: User
Tags file system requires backup

I. ASM-related concepts

1. What is ASM (Auto Storage Management)

Abbreviation for automatic storage management, a tool for managing disks

Ability to implement striped, mirrored data files, recovery files, etc. across multiple physical devices

The file is distributed across all disks in the disk group by allocation Unit AUS (allocation units), and ASM uses indexing technology to track the location of each AUS

Support for dynamic increase and decrease of online disks, and AUS will automatically regain dynamic distribution once the disk has changed

Support RAC Cluster technology, run an ASM instance on each node, and realize point-to-point communication between ASM instances

is a pure software level implementation, Third-party RAID work at the volume level, using a uniform stripe size, ASM can work at the file level, different files can be used

The different stripe size

The advantages of 2.ASM

Disk increase: Increasing disk becomes very easy. No downtime is required and the file area is automatically reassigned.

I/O allocation: I/O is automatically distributed across all available disks without human intervention, thereby reducing the likelihood of hot spots appearing.

Stripe width: Segments in redo log files can be subdivided (K for faster transfer rates), and for data files, bands are slightly larger (MB, to one-time

Transfer a large number of data blocks).

Buffering: ASM file system does not buffer, direct input/output.

Mirroring: If hardware mirroring is not available, software mirroring can be easily established.

Core asynchronous I/O: implementation of core asynchronous I/O requires no special settings and eliminates the need to use raw or Third-party file systems (such as Veritas Quick I/O)

3.Oracle RAID level for common data files

SYSTEM, undo table space is usually placed on a RAID 1 volume

Online redo logs are usually placed on a RAID 0 volume

Control files are usually placed on a raid 0+1 volume

Data files are typically placed on a RAID 5 volume

4.ASM architecture (mainly composed of ASM instances and ASM disk groups)

The use of ASM requires the creation of an ASM instance for managing ASM disk Groups

The ASM Disk group consists of an ASM disk that can contain one or more ASM disks

The ASM disk can be an actual disk, a partition of a disk, or a logical volume managed by LVM, but must be an unformatted raw device

The size of the ASM disk group is the sum of the size of the ASM disk within the group, and the usable capacity varies according to the fault tolerance level

5.ASM examples and RDBMS examples

The ASM instance is similar to a common database instance (RDBMS) and is also made up of the SGA and a stack of background processes, with the SGA only up to MB for most systems

The Largepool in the ASM instance is used to store the extent map, which calculates the size of the largepool based on the size of the database, usually 100GB size requires 1MB storage extent map

A typical RDBMS instance locates a data file and opens its data file, whereas in a database that uses ASM storage, the work is taken over by an ASM instance, which is used by the ASM instance to locate and

Manage ASM disks, disk groups.

The ASM instance has a background process similar to a common RDBMS instance, such as SMON,PMON,LGWR,DBWR,CKPT, and adds two new processes, one is Rbal, the other is ARBN

Rbal: For coordinating and managing the dynamic balance between disk groups

ARBN: Can be used for more than one, to complete the movement of AU

The ASM instance simply locates and manages the ASM disk, cannot load or open the database, and therefore cannot read the data dictionary information

An ASM instance usually has a parameter that can be started or closed only by using the password file or operating system authentication as SYSDBA or Sysoper.

An ASM instance can serve multiple RDBMS, creating multiple ASM instances on a single host, but typically using an ASM instance on a single host

If an instance serves multiple RDBMS, it is recommended to separate the ASM Asm_home from the DB Oracle_home for future upgrades and maintenance

Creation and configuration of ASM disk groups after the ASM instance starts

An RDBMS instance using the ASM disk is the same as a common RDBMS instance, but there are two more background processes, RBAL,ASMB.

ASMB uses a server process such as ORACLE+ASM1 to establish a common RDBMS instance to an ASM instance session and to pass information about the disk file

Rbal to open an ASM disk that is positioned through an ASM instance

Note: The ASM instance does not replace an RDBMS instance to read or write data files, which are delivered directly to the ASM disk and RDBMS instances, and ASM instances are used only for locating data files

The ASM disk, disk area, and related information that you want. Assuming that the new data file is added, the RDBMS tells the ASM instance to create the data file, and the ASM instance allocates the disk area

(extent) and create a disk map address to return to the RDBMS instance, the RDBMS writes the data directly to the disk group.

File types stored in the 6.ASM instance

Control file parameter file online log file log file data file Temp file

Rman backup set, image Copy control file backup set DataPump dump files, change tracing file

II. Create ASM instances (below VMware + RHEL 5.4 + Oracle 10g R2 Demo)

1. Install ASM Package

Using the ASM instance, you need to download the ASM package required on the Oracle website. Download path: Asmlib download

Note Download support for the kernel of the package, divided into two parts, one is the library and Tools, and the second is drivers for kernel

As my Linux kernel is:

[Root@oradb ~]# Uname-rm

2.6.18-164.el5 i686

then download the corresponding package as:

Library and Tools

oracleasmlib-2.0.4-1.el5.x86_64.rpm

oracleasm-support-2.1.3-1.el5.i386.rpm

Drivers for Kernel 2.6.18-164.el5

oracleasm-2.6.18-164.el5xen-2.0.5-1.el5.i686.rpm

oracleasm-2.6.18-164.el5debug-2.0.5-1.el5.i686.rpm

oracleasm-2.6.18-164.el5pae-2.0.5-1.el5.i686.rpm

oracleasm-2.6.18-164.el5-debuginfo-2.0.5-1.el5.i686.rpm

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.