ASM FAQ
Oracle Automatic Storage Management (ASM) FAQ
Contents
- 1 Why should we use separate ASM home?
- 2 How many ASM instances should one have?
- 3 How many diskgroups should one have?
- 4 Should I create table and index tablespaces in separate diskgroups?
- 5 How to check how much disk space is allocated/ in-use by an ASM instance?
- 6 How big should I make my datafiles within ASM?
- 7 ASMCMD is very slow. How can I speed it up?
- 8 ASM disk header/superblock backups?
- 9 How does one create a database directly on ASM?
Why should we use separate ASM home?
ASM should be installed separately from the database software in its own ORACLE_HOME directory. This will allow you the flexibility to patch and upgrade ASM and the database software independently.
How many ASM instances should one have?
Several databases can share a single ASM instance. So, although one can create multiple ASM instances on a single system, normal configurations should have one and only one ASM instance per system.
For clustered systems, create one ASM instance per node (called +ASM1, +ASM2, etc).
How many diskgroups should one have?
Generally speaking one should have only one disk group for all database files - and, optionally a second for recovery files (see FRA).
Data with different storage characteristics should be stored in different disk groups. Each disk group can have different redundancy (mirroring) settings (high, normal and external), different fail-groups, etc. However, it is generally not necessary to create many disk groups with the same storage characteristics (i.e. +DATA1, +DATA2, etc. all on the same type of disks).
To get started, create 2 disk groups - one for data and one for recovery files. Here is an example:
CREATE DISKGROUP data EXTERNAL REDUNDANCY DISK '/dev/d1', '/dev/d2', '/dev/d3', ....; CREATE DISKGROUP recover EXTERNAL REDUNDANCY DISK '/dev/d10', '/dev/d11', '/dev/d12', ....;
Here is an example how you can enable automatic file management with such a setup:
ALTER SYSTEM SET db_create_file_dest = '+DATA' SCOPE=SPFILE; ALTER SYSTEM SET db_recovery_file_dest = '+RECOVER' SCOPE=SPFILE;
You may also decide to introduce additional disk groups - for example, if you decide to put historic data on low cost disks, or if you want ASM to mirror critical data across 2 storage cabinets.
In 11gR2, an ASM Instance can have up to 63 disk groups, 10,000 disks and 1 million files for each disk group. In 12c, an ASM instance can have up to 511 disk groups, the other limits are not changed.
Should I create table and index tablespaces in separate diskgroups?
No, tables and indexes can be stored within a single disk group. Do not create different disk groups for tables and indexes.
How to check how much disk space is allocated/ in-use by an ASM instance?
Login to your +ASM instance (SYS AS SYSDBA) and execute the following query:
SQL> COL % FORMAT 99.0 SQL> SELECT name, free_mb, total_mb, free_mb/total_mb*100 "%" FROM v$asm_diskgroup; NAME FREE_MB TOTAL_MB % ------------------------------ ---------- ---------- ----- DATA 917104 1482145 61.9 RECOVER 17387 17437 99.7
From Oracle 10g Release 2, one can also use the asmcmd command line utility:
ASMCMD> du Used_MB Mirror_used_MB 1523 1523
ASMCMD> lsdg State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name MOUNTED EXTERN N N 512 4096 1048576 11264 9885 0 9885 0 DISKGROUP1/ MOUNTED EXTERN N N 512 4096 1048576 10240 9906 0 9906 0 FLASH/
How big should I make my datafiles within ASM?
Use uniform sized files (say 2 or 4 GB each). Reason being that the a 2TB datafile will unnecessarily extend backup and recovery times.
ASMCMD is very slow. How can I speed it up?
The asmcmd utility appears to be very slow. This slowness is a result of queries against the v$asm_diskgroup view. To solve this problem edit the $ORACLE_HOME/bin/asmcmdcore script and change all v$asm_diskgroup references to v$asm_diskgroup_stat.
V$asm_diskgroup and v$asm_diskgroup_stat provides exactly the same information, but the %_stat view operates from cache, while v$asm_diskgroup rescans all disk headers. This method is also used by Oracle in their Enterprise Manager product.
ASM disk header/superblock backups?
ASM disk headers (superblocks) cannot be backed up and restored in Oracle 10g. By implication, if you use EXTERNAL REDUNDANCY and a single disk's header is accidentally overwritten, the entire disk group will have to be restored. To solve this problem, Oracle introduced the md_backup and md_restore asmcmd commands in Oracle 11g. In Oracle 10g, the only viable method to prevent logical corruption of ASM header block is to add failgroup, storage vendor has no responsibility to verify/checksum ASM disk header blocks (EXTERNAL REDUNDANCY is not going to help). There is a kfed utility to backup ASM disk headers and restore them for LIMITED scenario. It is best to be executed under guidance of a few elite support engineers. Oracle did not advertise the utility due to the potential damage it could cause. For those unrecoverable (tedious manual fixes) cases, restoring disk group is the last resort.
How does one create a database directly on ASM?
The trick is to create an SPFILE and restart the instance before issuing the CREATE DATABASE statement:
STARTUP NOMOUNT PFILE=initorcl_0.ora CREATE SPFILE FROM pfile='initorcl_0.ora'; SHUTDOWN IMMEDIATE STARTUP NOMOUNT
Point all OMF files into ASM:
ALTER SYSTEM SET db_create_file_dest = '+DATA'; ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 134G; ALTER SYSTEM SET db_recovery_file_dest = '+RECOVER';
Issue the create database command:
CREATE DATABASE orcl UNDO TABLESPACE undots DEFAULT TEMPORARY TABLESPACE temp character set "WE8ISO8859P1" national character set "AL16UTF16";
参考至:http://www.orafaq.com/wiki/ASM_FAQ
如有错误,欢迎指正
邮箱:czmcj@163.com
相关推荐
六、FAQ ASM常见的问题包括diskgroup的管理、条带化原理和rebalance、文件名和Template、ASMCMD命令行、ASM文件转化、Failure Groups in ASM等。 七、ASM的优点 ASM的优点包括高可用性、高性能、灵活性和可扩展性...
汇编基础知识 FAQ 文档 硬盘分区表 Hook初步 Dll初步
在文件列表中,虽然只有一个“同步手机屏幕”的条目,但我们可以推测这可能包含了ASM工具的安装包、运行脚本以及其他相关文件,如使用指南、FAQ等。用户需要按照提供的说明或者运行脚本来安装和配置这个工具,然后...
集成了,Iczelion,罗云彬,Win32ASM经验点滴,asm问题(基础知识,FAQ,文档),x86保护模式教程,x86汇编罗云彬,病毒分析和防治,加密解密,Petzold的Windows程式开发设计指南5th,PC硬件端口参考资料,及一篇婚变...
汇编教程中的经典,在win32ASM方面算是老大的Iczelion写的入门FAQ,对初学者来说,这是最好的指南!另外他写的tutor简直太经典了,简直就是学习Win32ASM的圣经级教程。 很好的汇编入门书,也是深入学习汇编的好教材...
FAQ部分为常见的问题提供了快速参考,而Tips则分享了一些提高测试效率的技巧和最佳实践。 总之,Robotium作为一个测试框架,为Android应用的自动化测试提供了强大支持,从简单的“Hello World”示例到复杂的多活动...
10. DGUS屏开发典型程序参考(ASM51、C51):提供了针对51单片机汇编语言(ASM)和C语言的典型开发程序示例。 综上,迪文DGUS屏开发指南覆盖了从基础配置、界面设计到程序开发的全方位知识点,是为开发者提供的一份...
"FAQ_Chipsea MCU_V1.2.1.pdf"这份文档很可能是芯海科技提供的常见问题解答,包含了用户在使用MCU过程中可能会遇到的问题及其解决方案。用户可以通过查阅这份文档来解决在设计和调试过程中遇到的难题,提高开发效率...
描述中提到"在STVD环境下编译C语言",STVD全称是STMicroelectronics Visual Develop,是一个由意法半导体提供的集成开发环境(IDE),用于STM8和STM32系列微控制器的C和ASM语言编程。这个环境包括了代码编辑器、...
【压缩包子文件的文件名称列表】中的"vs2010_asm_wizard"可能是该向导的主程序或者安装文件,用户解压后可能需要运行这个文件来安装或启动向导服务。 在使用"VS2010汇编向导"时,用户可以期待以下功能和知识点: 1...
9. DGUS屏应用问答(FAQ)和特殊应用软件使用说明,为用户在开发过程中遇到的问题提供解决方案。 10. 提供DGUS屏开发典型程序参考(ASM51)。 在进行DGUS屏开发时,需要遵循DGUS屏开发流程,涵盖从配置初始化到...
6. **文档和说明**:安装指南、步骤文档或者FAQ,帮助用户正确安装和配置IIS以适应Exchange Server的需求。 安装IIS时,需要注意以下关键知识点: 1. **系统需求**:确保操作系统版本兼容IIS和Exchange Server,...
asm asn asp aspx ass asv at atch atex atlab au0828 au3 audio aut aux ava ave avmb1 avs avsi avx awk ax axb axi axl b bak bakgms bar bas bash bash_profile bashrc bat ...