签到成功

知道了

CNDBA社区CNDBA社区

New Feature on ASM (Automatic Storage Manager). [ID 249992.1]

2016-11-25 15:50 1790 0 原创 Oracle 11g
作者: dave

 

New Feature on ASM (Automatic Storage Manager). [ID 249992.1]


 

Modified 03-DEC-2009     Type BULLETIN     Status ARCHIVED

 

 

PURPOSE

-------

http://www.cndba.cn/Dave/article/852

               Automatic Storage Management is a file system and volume manager built into the database kernel that allows the practical management of thousands of disk drives with 24x7 availability. It provides management across multiple nodes of a cluster for Oracle Real Application Clusters (RAC) support as well as single SMP machines.

               It automatically does load balancing in parallel across all available disk drives to prevent hot spots and maximize performance, even with rapidly changing data usage patterns.http://www.cndba.cn/Dave/article/852

               It prevents fragmentation so that there is never a need to relocate data to reclaim space.  Data is well balanced and striped over all disks. It does automatic online disk space reorganization for the incremental addition or removal of storage capacity.

               It can maintain redundant copies of data to provide fault tolerance, or it can be built on top of vendor supplied reliable storage mechanisms. Data management is done  by selecting the desired reliability and performance characteristics for classes of data rather than with human interaction on a per file basis.

 

               ASM solves many of the practical management problems of large Oracle databases.As the size of a database server increases towards thousands of disk drives, or tens of nodes in a cluster, the traditional techniques for management stop working.  They do not scale efficiently, they  become too prone to human error, and they require independent effort on every node of a cluster. Other tasks, such as manual load balancing, become so complex as to prohibit their application.

 

               These problems must be solved for the reliable management of databases in the tens or hundreds of terabytes. Oracle is uniquely positioned to solve these problems as a result of our existing  Real Application Cluster technology. Oracle’s control of the solution ensures it is reliable and integrated with Oracle products.

 http://www.cndba.cn/Dave/article/852

               This document is intended to give some insight into the internal workings of ASM.  It is not a detailed design document. It should be useful for people that need to support ASM.

               Automatic Storage Management is part of the database kernel. It is linked into $ORACLE_HOME/bin/oracle so that its code may be executed by all database processes.

               One portion of the ASM code allows for the start-up of a special instance called an ASM Instance. ASM Instances do not mount databases, but instead manage the metadata needed to make ASM files available to ordinary database instances. Both ASM Instances and database instances have access to some common set of disks.

 

               ASM Instances manage the metadata describing the layout of the ASM files. Database instances access the contents of ASM files directly,  communicating with an ASM instance only to get information about the layout of these files.  This requires that a second portion of the ASM code run in the database instance, in the I/O path.

 

Note:

1. One and only one ASM instance required per node. So you might have multiple databases,  but they will share the same single ASM.http://www.cndba.cn/Dave/article/852

 

2. ASM is for DATAFILE, CONTROLFILE, REDOLOG, ARCHIVELOG and SPFILE. So you can use  CFS for common oracle binary in RAC.

 

3. ASM can provide mirroring for files in a disk group.

 

4. In external redundancy disk groups, ASM does not mirroring.  For normal redundancy,   ASM 2-way mirrors files by default, but can also leave files unprotected.   [Unprotected  files  are  not recommended].  For high redundancy disk groups,   ASM 3-way mirrors files.

 

5. Unless a user specifies an ASM alias filename during file creation, the file is

   OMF.  OMF files are deleted automatically when the higher level object (eg tablespace)   is dropped, whereas non-OMF files must be manually deleted. Oracle is recommending  to use OMF.

 

HOW TO USE ?

------------

 

Use DBCA to configure your ASM.

 

DBCA eases the configuring and creation of your database while EM provides an integrated approach for managing both your ASM instance and database instance.

   

Automatic Storage Management is always installed by the Oracle Universal Installer when you install your database software. The Database Configuration Assistant (DBCA) determines if an ASM instance already exists, and if not, then you are given the option of creating and configuring an ASM instance as part of database creation and configuration. If an ASM instance already exists, then it is used instead.

   

DBCA also configures your instance parameter file and password file.

 

 

Steps in DBCA:

1. Choose ASM disk.

http://www.cndba.cn/Dave/article/852

2. Create diskgroup by choosing available disk.

3. While creating ASM you have choice of mirroring for files in a disk group and    the options are like below http://www.cndba.cn/Dave/article/852

   HIGH, NORMAL or EXTERNAL.

   High     -> ASM 3-way mirrors

   Normal   -> ASM 2-way mirrors

http://www.cndba.cn/Dave/article/852

   External -> If you have already mirror disk in H/W label like EMC or another                third party

4. dbca will create a separate instance called "+ASM" which will be in nomount stage    to control your ASM.

5. Choose your all datafile, controlfile, redolog and spfile to your ASM volume.

 

Preinstall:

Here DBA will create the ASM volume, so Sysadmin should give the ownership or

proper privs to DBA.

 

Example in LINUX

----------------

 

You have two disk say "/dev/sdf" and "/dev/sdg"

 

Determine what those devices are bound as raw: http://www.cndba.cn/Dave/article/852

$ /usr/bin/raw -qa

If not:

Include devices in diskgroups by editing /etc/sysconfig/rawdevices :

      eg   /dev/raw/raw1 /dev/sdf

           /dev/raw/raw2 /dev/sdg

 

Set owner, group and permission on device file for each raw device:

$ chown oracle:dba /dev/raw/rawn, chmod 660 /dev/raw/rawn

 

Bind disk devices to raw devices:

$ service rawdevices restart

 

So from DBCA you can see the device "raw1" and "raw2".

 http://www.cndba.cn/Dave/article/852

After finishing of ASM volume creation, when you create a database on an ASM volume, you should see the file details using Enterprise Manager (EM). Or you can use V$ or DBA view to check the datafile name. Oracle recommended not to specify the datafile name while adding datafile or creating new tablespace, because ASM will automatically generate OMF file.

 

Note: If DBA's by mistake or intentionally choose the datafile name, dropping of  tablespace, will not drop the datafile from ASM volume.

 

 

IMPORTANT VIEW in ASM

=====================

V$ASM_DISKGROUP

V$ASM_CLIENT

V$ASM_DISK

V$ASM_TEMPLATE

V$ASM_ALIAS

V$ASM_OPERATI

 

 

 

 

-------------------------------------------------------------------------------------------------------

http://www.cndba.cn/Dave/article/852

Blog http://blog.csdn.net/tianlesoftware

Email: dvd.dba@gmail.com

DBA1 群:62697716();   DBA2 群:62697977()   DBA3 群:62697850()  

DBA 超级群:63306533();  DBA4 群: 83829929  DBA5群: 142216823   

聊天 群:40132017   聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

 

版权声明:本文为博主原创文章,未经博主允许不得转载。

oracle 11g

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2297
    原创
  • 3
    翻译
  • 637
    转载
  • 198
    评论
  • 访问:9374077次
  • 积分:4535
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ