五、  目录及目录文件管理

5.1   创建目录

SQL> alter diskgroup ASMGROUP1 add directory ‘+ASMGROUP1/WWL1‘;

Diskgroupaltered.

5.2   修改目录

SQL> alterdiskgroup ASMGROUP1 rename directory ‘+ASMGROUP1/WWL1‘ to ‘+ASMGROUP1/WWL2‘;

Diskgroupaltered.

5.3   删除目录

SQL> alter diskgroup ASMGROUP1 drop directory ‘+ASMGROUP1/WWL2‘;

Diskgroupaltered.

六、  手动平衡磁盘组

一般情况下ASM都会自动对其下的磁盘组进行平衡,不过ORACLE也提供了手动平衡磁盘组的方式,通过alter diskgroup ... power 语句。前面提到过磁盘组的平衡度有0到11多个级别,默认是按照ASM_POWER_LIMIT初始化参数中设置的值,手动平衡的话,设置的平衡度可以与初始化参数中并不相同,例如,设置磁盘组平衡度为5,语句如下:

SQL>alter diskgroup asmgroup1 rebalance power 5;

Diskgroup altered.

七、  通过ASMCMD工具管理ASM

[oracle@wwl ~]$ which asmcmd

/oracle/orahome/10.2.0/db_1/bin/asmcmd

[oracle@wwl ~]$ cd/oracle/orahome/10.2.0/db_1/bin/

ASMCMD> ls

ASMEXTERNAL/

ASMGROUP1/

ASMHIGH/

ASMNORMAL/

ASMCMD>

ASMCMD> help

asmcmd [-p] [command]

The environment variables ORACLE_HOME and ORACLE_SID determine the

instance to which the program connects, and ASMCMD establishes a

bequeath connection to it, in the same manner as a SQLPLUS / AS

SYSDBA.  The user must be a memberof the SYSDBA group.

Specifying the -p option allows the current directory to be displayed

in the command prompt, like so:

ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >

[command] specifies one of the following commands, along with its

parameters.

Type "help [command]" to get help on a specific ASMCMDcommand.

commands:

--------

cd:------------------------------------------进入下级目录或进入所需要的目录

du:------------------------------------------显示指定的ASM目录下ASM文件占用的所有磁盘空间

find:-----------------------------------------查找所需的文件

help:-----------------------------------------显示帮助信息

ls:---------------------------------------------列出ASM目录下的内容及其属性

lsct:-------------------------------------------列出当前ASM客户端的信息

lsdg:-------------------------------------------列出所有磁盘组及其属性

mkalias:--------------------------------------为系统生成的文件名创建别名

mkdir:----------------------------------------创建新目录

pwd:------------------------------------------显示当前目录路径

rm:--------------------------------------------删除ASM目录下的某个文件或文件夹

rmalias:--------------------------------------删除别名

ASMCMD>

要查看某个命令的相信通过在命令前添加help来查看,如下:

ASMCMD> help cd

cd

Change the current directory to

ASMCMD> help du

du [-H] [dir]

Display total space used for files located recursively under [dir],

similar to "du -s" under UNIX; default is the currentdirectory.  Two

values are returned, both in units of megabytes.  The first value does

not take into account mirroring of the diskgroup while the second does.

For instance, if a file occupies 100 MB of space, then it actually

takes up 200 MB of space on a normal redundancy diskgroup and 300 MB

of space on a high redundancy diskgroup.

[dir] can also contain wildcards.

The -H flag suppresses the column headers from the output.

ASMCMD> help find

find [-t ]

Find the absolute paths of all occurrences of under

can be a directory and may include wildcards.

include wildcards.  Note thatdirectory names in the results have the

"/" suffix to clarify their identity.

The -t option allows searching by file type.  For instance, one can

search for all the control files at once.  must be one of the

valid values in V$ASM_FILE.TYPE.

ASMCMD>

八、  oracleasm工具的使用和语法介绍

[root@wwl ~]# oracleasm --help

Usage: oracleasm[--exec-path=] [ ]

oracleasm --exec-path

oracleasm -h

oracleasm -V

The basic oracleasm commands are:

configure        Configure the OracleLinux ASMLib driver

init             Load andinitialize the ASMLib driver

exit             Stop the ASMLibdriver

scandisks        Scan the systemfor Oracle ASMLib disks

status           Display thestatus of the Oracle ASMLib driver

listdisks        List known OracleASMLib disks

querydisk        Determine if adisk belongs to Oracle ASMlib

createdisk       Allocate a devicefor Oracle ASMLib use

deletedisk       Return a deviceto the operating system

renamedisk       Change the labelof an Oracle ASMlib disk

update-driver    Download thelatest ASMLib driver

[root@wwl ~]#

九、  ASM相关视图(V$)和数据字典(X$)

ASM由于其高度的封装性,使得我们很难知道窥探其内部的原理。可以通过一下视图和数据字典来来查看ASM 的信息。

相关视图和数据字典

View Name

X$ Table name

Description

V$ASM_DISKGROUP

X$KFGRP

performs  disk discovery and lists diskgroups

V$ASM_DISKGROUP_STAT

X$KFGRP_STAT

diskgroup  stats without disk discovery

V$ASM_DISK

X$KFDSK,  X$KFKID

performs  disk discovery, lists disks and their usage metrics

V$ASM_DISK_STAT

X$KFDSK_STAT,  X$KFKID

lists  disks and their usage metrics

V$ASM_FILE

X$KFFIL

lists  ASM files, including metadata/asmdisk files

V$ASM_ALIAS

X$KFALS

lists  ASM aliases, files and directories

V$ASM_TEMPLATE

X$KFTMTA

lists  the available templates and their properties

V$ASM_CLIENT

X$KFNCL

lists  DB instances connected to ASM

V$ASM_OPERATION

X$KFGMG

lists  rebalancing operations

N.A.

X$KFKLIB

available  libraries, includes asmlib path

N.A.

X$KFDPARTNER

lists  disk-to-partner relationships

N.A.

X$KFFXP

extent  map table for all ASM files

N.A.

X$KFDAT

extent  list for all ASM disks

N.A.

X$KFBH

describes  the ASM cache (buffer cache of ASM in blocks of 4K (_asm_blksize)

N.A.

X$KFCCE

a  linked list of ASM blocks. to be further investigated

This list isobtained querying v$fixed_view_definitionwhere view_name like ‘%ASM%‘ whichexposes all the v$ and gv$ views with theirdefinition. Fixed tables are exposedby querying v$fixed_table where name like‘x$kf%‘ (ASM fixed tables use the‘X$KF‘ prefix).

SQL>select* fromv$fixed_view_definition whereview_name like ‘%ASM%‘;

SQL>select* from sys.v$fixed_tablewhere name like ‘X$KF%‘ ;

十、  ASM常见的错误处理

错误一、

ORA-15097:cannotSHUTDOWN ASM instance with connected RDBMS instance

解决办法:

发生这个问题,唯一的一个原因就是Oracle实例没有关闭,或ORACLE实例正在关闭或处于挂起状态,导致ASM实例无法关闭,解决办法,关闭RDBMS实例后再关闭ASM实例。

错误二、

[root@wwl ~]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd

Marking disk "VOL3" as an ASM disk: [FAILED]

报这个错的原因在于磁盘为分区导致。在创建ASM的之前必须线将磁盘分区,但不能格式化,后执行创建就不会有问题了。

十一、       ASM 扩展性

最多支持63个磁盘组;     最多支持10000个磁盘;     最大支持4pb/磁盘;     最大支持40     exabyte/ASM存储; 最大支持1百W个文件/磁盘组; 外部冗余时单个文件最大35tb,标准冗余时单个文件最大5.8tb,高冗余度时单个文件最大3.9tb

十二、       ASM其它信息请参考如下连接:

http://docs.oracle.com/cd/E11882_01/server.112/e16102/asmfiles.htm

本文出自 “IT小矮人!” 博客,请务必保留此出处http://lqx049.blog.51cto.com/1919902/1703043

ORACLE之ASM概念

标签:oracle   数据库   asm   操作系统

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉 本文系统来源:http://lqx049.blog.51cto.com/1919902/1703043

oracle asm 概念,ORACLE之ASM概念相关推荐

  1. oracle flex cluster,Oracle Flex ASM和Flex集群

    Oracle Flex ASM和Flex集群 Oracle RAC 12c 引入了两个新概念: 中心节点:  和以前的版本一样,它们通过专用网络相互连接,并且可以直接访问共享存储.这些节点可以直接访问 ...

  2. Oracle数据库自动存储管理(ASM)

    关于ASM的讨论很多,但是到底什么是ASM?ASM是一个有效的抽象层,使你的Oracle数据库可以与叫做diskgroups的抽象空间一起使用,而不是直接使用datafiles.这带来了很多好处,但是 ...

  3. oracle中实例与数据库的概念解释

    很容易混淆,这就是"实例 "(instance)和"数据库 "(database).作为Oracle术语,这两个词的定义如下: q 数据库 (database) ...

  4. ORACLE执行计划的一些基本概念

    本文介绍了ORACLE执行计划的一些基本概念,供学习应用. 一.相关的概念 Rowid的概念:rowid是一个伪列,既然是伪列,那么这个列就不是用户定义,而是系统自己给加上的.对每个表都有一个rowi ...

  5. oracle rac 磁盘重建,Oracle RAC环境下重建ASM磁盘组 Re-create ASM diskgroup with Oracle RAC...

    oracle@node01:/$dbca 查看创建结果: 16)最后,引用原文如下: Steps to Re-Create ASM Diskgroups [ID 268481.1] 修改时间 17-M ...

  6. oracle物理备份与恢复,Oracle 备份与恢复概念原理学习

    梳理下oracle中备份与恢复的概念原理--[@more@] 一.备份与恢复分逻辑和物理备份与恢复. 二.逻辑类:命令有EXP和IMP. 三.物理类:Noarchivelog和archivelog模式 ...

  7. oracle asm磁盘头 备份,ASM磁盘头的第三个备份-Physically Addressed Metadata Redundancy

    这几天很蕉绿,想着复习下技术.个人很喜欢ASM,就从ASM开始复习.循环kfed发现一个很奇怪的事情,就是,我扫到AU 11的时候发现,居然这个aun的blkn0是KFBTYP_DISKHEAD.要知 ...

  8. oracle几个网络,ORACLE网络的几个重点概念

    数据库名(DB_NAME).数据库实例名(INSTANCE_NAME).操作系统环境变量ORACLE_SID.数据库服务名 (SERVICE_NAME).数据库域名(DB_DOMAIN)以及全局数据库 ...

  9. 创建ASM With Oracle 10g

    由于后文会相关的演示操作会用到ASM实例,因此在文章的开始就先创建一个简单的ASM实例,后面再开始详细的介绍ASM. cuug每周五晚8点都有免费网络课程,详情可点击http://www.51CTO提 ...

最新文章

  1. 快速使用wordpress
  2. Word中轻松插入本地视频
  3. 程序员面试题准备(1)单链表逆置
  4. Java黑皮书课后题第4章:*4.13(判断元音还是辅音)编写程序,提示用户输入一个字母,判断该字母是元音还是辅音。对于非字母的输入,提示非法输入
  5. Python时间库—datetime的详解及使用
  6. equipment download和CRM 的change history
  7. UI素材模板|App搜索页UI界面设计版式
  8. [JNI] 开发基础(5)内存分配
  9. Windows下的发包工具推荐[Colasoft Packet Builder]含使用教程
  10. 凉州馆中与诸判官夜集
  11. 购买弹性云服务器怎么部署网站,购买后怎么部署自己的云服务器
  12. Vue中美元$符号的意思
  13. C. Petya and Inequiations
  14. 深度学习——A Gentle Introduction to Graph Neural Networks
  15. 前端提高篇(十一)JS进阶8函数参数及arguments
  16. 使用po模型进行自动化测试
  17. swift纯代码UITabBarController的使用
  18. C语言程序设计课程设计(服装销售管理系统)
  19. 2021年茶艺师(中级)报名考试及茶艺师(中级)操作证考试
  20. python+Mysql+flask架构的在线留言板实战

热门文章

  1. cuSPARSE库:(七)cusparseCreate()的功能与作用
  2. Introduction to Real-Time Kernels
  3. 第一个ncurses程序: hello world !!!
  4. 几何画板是哪方面的计算机应用,几何画板在几何中的奇妙应用
  5. Flink批处理练习
  6. Centos、Ubuntu的区别
  7. java快速排序代码6_分分钟掌握快速排序(Java / Scala 实现)
  8. arm poky linux,Solved: Re: arm-poky-linux - NXP Community
  9. oracle rollup 排序,Oracle教程之rollup用法
  10. ie浏览器框架不显示_thinkphp框架下后台验证码不显示