ASM (Automatic Storage Management) is a new feature introduced in oracle10g R2 to simplify the management of Oracle databases, which is Oracle's own volume manager, which is used primarily to replace the LVM provided by the operating system. It not only supports single instances, but also supports RAC very well.
First, the Origin of ASM
ASM is a new feature introduced in Oracle 10g R2 to simplify the management of Oracle databases, a volume manager provided by Oracle itself, primarily used to replace the LVM provided by the operating system, which not only supports single instancing, but also supports the RAC very well. ASM can automatically manage disk groups and provide effective data redundancy capabilities. With ASM (Automatic storage Management), database administrators no longer need to manage and categorize thousands of data files in Oracle, simplifying the workload of DBAs and making productivity much more productive.
Second, what is ASM
ASM it provides platform-independent file systems, logical volume management, and soft raid services. ASM supports stripe and disk mirroring, enabling you to add or remove disks and automatically balance I/O when the database is loaded to remove hotspots. It also supports direct and asynchronous I/O and uses the Oracle Data Manager API (simplified I/O system invocation Interface) introduced in Oracle9i.
ASM is implemented and deployed as a separate Oracle instance, and it only needs to have parameter files, no other physical files, to launch an ASM instance that can be accessed by other data only when it is running. On the Linux platform, only the OCSSD service (the Oracle installer is installed by default) can be run and access ASM.
III. Benefits of using ASM
Advantages:
(1) Averaging the I/O to all available disk drives to prevent hotspots from being generated and maximizing performance. In ASM, the concept of diskgroup is similar to the concept of VG in LVM Volume group management, which is also a disk group of multiple physical disk assemblies, and the data in one disk group is evenly distributed across the physical disks. When you manually add and delete physical disks, the data is automatically balanced (ReBalance);
(2) The configuration is simpler, and maximizes the utilization of storage resources that drive database consolidation; Data files are stored in DiskGroup (DG), which is relatively simple to manage.
(3) Intrinsic support for large files, supporting bigfile files.
(4) After incremental increase or deletion of storage capacity to perform automatic contact redistribution, that is, automatic rebalance;
(5) Maintain redundant copies of data to improve usability;
(6) Support 10g, 11g of data storage and RAC shared storage management, relative to the 11g ASM more stable, 10g some bugs.
(7) Support for third-party multipath software such as PowerPath (AIX), Mutlipath (Linux)
(8) Use the OMF (Oracle Managed files) mode to manage files.
Disadvantages:
(1) A new ASM instance is added to the database, which requires the management of ASM to increase the maintenance cost.
(2) ASM is relatively a black box, if the problem, recovery is also a difficult point.
Iv. ASM Redundancy Mode
ASM uses a unique mirroring algorithm: it does not mirror disks, but mirrors the extents. As a result, in order to provide continuous protection in the case of a failure, only the space capacity in the disk group is required, without the need to prepare a hot spare disk. It is not recommended that users create fault groups of different sizes, as this will cause problems when assigning secondary extents. ASM assigns a primary disk of a file to a disk in a disk group, which allocates a mirrored copy of that region to another disk in the disk group. The primary extents on a given disk will have their own mirrored extents on one of the partner disks in the disk group. ASM ensures that the primary extents and their mirrored copies do not reside in the same fault group. The redundancy of a disk group can be as follows: Normal redundancy (default redundancy) for bidirectional image files (with a minimum of two fault groups) and high redundancy with a three-way mirror (requiring at least 3 fault groups) for a higher degree of protection. Once you create a disk group, you cannot change its redundancy level. To change the redundancy of the disk group, you must create another disk group with the appropriate redundancy, and then you must use Rman restore or Dbms_file_transfer to move the data files to the newly created disk group.
The three different redundancy methods are as follows:
(1) External redundancy (external redundancy)--Common
Indicates that Oracle does not manage the image for you, which is implemented by an external storage system, such as through RAID technology, and that the effective disk space is the sum of the size of all disk device space.
(2) Default redundancy (normal redundancy)
Indicates Oracle provides 2 images to protect data, and valid disk space is 1/2 of the sum of all disk device sizes (most used)
(3) highly redundant (high redundancy)
Indicates that Oracle provides 3 images to protect data to improve performance and data security, requiring a minimum of three disks (three failure group), and valid disk space is 1/3 of the sum of all disk device sizes, although the redundancy level is high, but the hardware is the most expensive.
V. ASM PROCESS
ASM instances, in addition to the traditional Dbwr,lgwr,ckpt,smon,pmon process, include the following four new background processes:
(1) Rbal: Responsible for coordinating disk group rebalancing activities (responsible for disk group equalization)
(2) Arb0-arbn: There can be many such processes at the same time, named ARB0, ARB1, and so on, performing the actual rebalancing allocation unit move process.
(3) Gmon: For ASM disk Group monitoring
(4) O0nn 01-10: This set of processes establishes a connection to an ASM instance, and some long operations such as creating a data file, the RDBMS sends information to ASM through these processes
ASMB is connected to the foreground process of the ASM instance, periodically checking the health status of two instance. Each DB instance can be connected to only one ASM instance at a time, so the database will only have one ASMB background process. If there are multiple DB instances on a node, they can share only one ASM instance.
The Rbal is used to make a global call to open a disk in a disk group. The ASMB process communicates with the node's CSS daemon and receives the file interval mapping information from the ASM instance. ASMB is also responsible for providing I/O statistics for ASM instances
CSS cluster Synchronization service. To use ASM, you must ensure that the CSS Cluster Synchronization service is running and that the CSS is responsible for synchronizing between the ASM instance and the DB instance.
Note :
An ASM instance must be started before the DB instance and run synchronously with the DB instance later than the DB instance is closed. The relationship between an ASM instance and a DB instance can be either 1:1 or 1:n. If it is 1:n, it is best to install a separate asm_home for ASM.
Six,
ASM
Supported file Types
ASM support automatic database file management such as Datafile,logfiles,control Files,archivelogs,rman backup sets.
In general, an ASM single-instance database consists of two DG. One is DATADG, the other is FRADG. DATADG mainly stores data files, while FRADG (Flash recovery area) stores archivelog files, control files, and backup files.
Seven,ASM instance and DB instance correspondence relationship
Viii. Cluster ASM Architecture
Ix. Related views
View Name |
x$ base table name |
Describe |
V$asm_diskgroup |
X$kfgrp |
Implement disk Discovery disks discovery and List disk groups |
V$asm_diskgroup_stat |
X$kfgrp_stat |
Show Disk Group status |
V$asm_disk |
X$kfdsk, X$kfkid |
Implement disk Discovery disks discovery and list disks and usage metrics for these disks |
V$asm_disk_stat |
X$kfdsk_stat,x$kfkid |
List disks and their usage metrics information |
V$asm_file |
X$kffil |
Listing ASM files also includes meta-data information |
V$asm_alias |
X$kfals |
Lists ASM aliases, files and directories |
V$asm_template |
X$kftmta |
List the available templates and their properties |
V$asm_client |
X$kfncl |
List DB instances linked to ASM |
V$asm_operation |
X$kfgmg |
List rebalancing rebalance operations |
|
X$kfklib |
Available Asmlib paths |
|
X$kfdpartner |
List disk-partners Relationships |
|
X$kffxp |
Extent map of all ASM files |
|
X$kfdat |
Extent list of all ASM disk |
|
X$kfbh |
Description ASM Cache |
|
X$kfcce |
ASM Block's linked list |
V$asm_attribute (New in 11g) |
X$kfenv (New in 11g) |
ASM property, the x$ base table also shows some hidden properties |
V$asm_disk_iostat (New in 11g) |
X$kfnsdskiost (New in 11g) |
I/O statistical information |
|
X$kfdfs (New in 11g) |
|
|
X$KFDDD (New in 11g) |
|
|
X$KFGBRB (New in 11g) |
|
|
X$KFMDGRP (New in 11g) |
|
|
X$kfclle (New in 11g) |
|
|
X$kfvol (New in 11g) |
|
|
X$kfvolstat (New in 11g) |
|
|
X$kfvofs (New in 11g) |
|
|
X$KFVOFSV (New in 11g) |
|
X. References
Http://www.jb51.net/article/43527.htm
http://blog.csdn.net/tianlesoftware/article/details/5314541
http://docs.oracle.com/cd/B28359_01/server.111/b31107/asmcon.htm#OSTMG036