redundancy与failgroup 转: https://blog.csdn.net/bamuta/article/details/32120945 1.关于redundancy 与fail group官方说明 http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_5008.htm#SQLRF53929 http://docs.oracle.com/cd/E11882_01/server.112/e18951/toc.htm REDUNDANCYClause The REDUNDANCY clause lets you specify theredundancy level of the disk group. NORMAL REDUNDANCY requires the existence of at least two failure groups (see the FAILGROUP clause that follows). Oracle ASM provides redundancy for all files in the disk group according to the attributes specified in the disk group templates. NORMAL REDUNDANCY disk groups can tolerate the loss of one group. Refer to ALTER DISKGROUP ... diskgroup_template_clauses for more information on disk group templates. NORMAL REDUNDANCY is the default if you omitthe REDUNDANCY clause.Therefore, if you omit this clause, you must create at least two failuregroups, or the create operation will fail. HIGH REDUNDANCY requires the existence of at least three failure groups. Oracle ASM fixes mirroring at 3-way mirroring, with each extent getting two mirrored copies. HIGH REDUNDANCY disk groups can tolerate the loss of two failure groups. EXTERNAL REDUNDANCY indicates that Oracle ASM does not provide any redundancy for the disk group. The disks within the disk group must provide redundancy (for example, using a storage array), or you must be willing to tolerate loss of the disk group if a disk fails (for example, in a test environment). You cannot specify the FAILGROUP clause if you specify EXTERNAL REDUNDANCY. FAILGROUPClause · Use this clause to specify a name for one or more failuregroups. If you omit this clause, and you have specified NORMAL or HIGH REDUNDANCY, then Oracle Database automatically adds each disk in thedisk group to its own failure group. The implicit name of the failure groupis the same as the operating system independent disk name (see "NAME Clause"). · You cannot specify this clause if you are creating an EXTERNAL REDUNDANCY disk group. 2.说明 一直在使用ASM,这2个概念也是经常用到,但有时有些混乱,搞不清楚它们之间的关系。今天通过实验来理一下思路。 redundancy 指的是diskgroup的failgroup的冗余级别(注意并不是disk的冗余),冗余通过failgroup实现。 Normal: 至少要2个failgroup。 Diskgroup的可用大小:如果是2个或3个failgroup组,则是(单个failgroup的大小)-(mirror消耗/fiailgroup数)的大小。如果是4个,则是上面的结果的2倍。 High: 至少要3个failgroup。 Diskgroup的可用大小:如果是3个或小于6个failgroup组,则是(单个failgroup的大小)-(mirror消耗/fiailgroup数)的大小。如果是6个,则是上面的结果的2倍。 External : ASM级不使用冗余。Diskgroup的可用大小等于所有disk的和。 在external可以指定failgroup吗? · Youcannot specify this clause if you are creating an EXTERNAL REDUNDANCY disk group. failgroup: 上面normal和high时要用到,也可以不明确写,不指定时,每1个disk当成1个failgroup。 3.相关视图说明: V$asm_diskgroup视图中部分字段说明 GROUP_NUMBER NAME TOTAL_MBREQUIRED_MIRROR_FREE_MB FREE_MBUSABLE_FILE_MB ALLOCATION_UNIT_SIZE ------------ ------------- --------------------------------- ---------- -------------- -------------------- Total_MB就是diskgroup里所有的disk的空间总和,和mirror没有任何关系 Free_MB是diskgroup里所有的disk的free空间总和,和mirror也没有任何关系 REQUIRED_MIRROR_FREE_MB考虑了mirorr,是指为了使diskgroup能在一个或多个磁盘损坏后能够restore冗余(redundancy),磁盘组中应该保留的剩余空间. USABLE_FILE_MB:当前实际可以用的空间,此大小是镜像完后的大小再减去已经使用的大小。 TOTAL_MB NUMBER Total capacity of the diskgroup (in megabytes) FREE_MB NUMBER Unused capacity of the disk group (in megabytes) REQUIRED_MIRROR_FREE_MB NUMBER Amount of space that is required to be availablein a given disk group in order to restore redundancy after one or more diskfailures. The amount of space displayed in this column takes mirroring effectsinto account. USABLE_FILE_MB NUMBER Amount of free space that can be safely utilized takingmirroring into account, and yet be able to restore redundancy after a diskfailure 4.实验测试: 共有9块盘用于测试,从/dev/asm-diske到/dev/asm-diskm 。每块的大小均为1G。 [grid@OEL63 grid]$ sqlplus / as sysasm col GROUP_NUMBER for 999 col DISK_NUMBER for 999 col NAME for a13 col FAILGROUP for a13 col PATH for a20 set lines 1000 SQL> select * from V$version; Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.0 Production TNS for Linux: Version 11.2.0.3.0 -Production NLSRTL Version 11.2.0.3.0 - Production EXTERNAL SQL> create diskgroup data1 external redundancy disk '/dev/asm-diske'; SQL> create diskgroup data2external redundancy disk '/dev/asm-diskf','/dev/asm-diskg'; SQL> create diskgroup data3 external redundancy disk'/dev/asm-diskh','/dev/asm-diski','/dev/asm-diskj'; SQL> select group_number,name, TOTAL_MB, REQUIRED_MIRROR_FREE_MB, FREE_MB , USABLE_FILE_MB,ALLOCATION_UNIT_SIZE fromV$asm_diskgroup; SQL> select group_number,disk_number,name,failgroup,create_date,path fromv$asm_disk order by FAILGROUP; 疑惑:normal下为何为生成不同的failgroup组名? External下不支持failgroup SQL> create diskgroup data2b externalredundancy failgroup fail1 disk '/dev/asm-diskf','/dev/asm-diskg'; create diskgroup data2b external redundancyfailgroup fail1 disk '/dev/asm-diskf','/dev/asm-diskg' * ERROR at line 1: ORA-15018: diskgroup cannot be created ORA-15067: command or option incompatiblewith diskgroup redundancy SQL> create diskgroup data2b externalredundancy failgroup fail1 disk '/dev/asm-diskf','/dev/asm-diskg' 2 failgroup fail2 disk'/dev/asm-diskm','/dev/asm-diskj'; create diskgroup data2b external redundancyfailgroup fail1 disk '/dev/asm-diskf','/dev/asm-diskg' * ERROR at line 1: ORA-15018: diskgroup cannot be created ORA-15067: command or option incompatiblewith diskgroup redundancy NORMAL 不指明failgroup创建不同的磁盘组 drop diskgroup data1; drop diskgroup data2; drop diskgroup data3; SQL> create diskgroup datan1 normalredundancy disk '/dev/asm-diske','/dev/asm-diskf'; SQL> create diskgroup datan2 normalredundancy disk '/dev/asm-diskg','/dev/asm-diskh','/dev/asm-diski'; SQL> create diskgroup datan3 normalredundancy disk '/dev/asm-diskj','/dev/asm-diskk','/dev/asm-diskl','/dev/asm-diskm'; 查看大小 SQL> select group_number,name, TOTAL_MB, REQUIRED_MIRROR_FREE_MB, FREE_MB , USABLE_FILE_MB,ALLOCATION_UNIT_SIZE fromV$asm_diskgroup; 再来看看使用后的变化情况 SQL> create tablespace data3 datafile '+DATAN3/QING/datafile/data301.dbf'size 10m; SQL> conn tan/tan SQL> create table test1 tablespace data3as select * from dba_objects; 查看failgroup SQL> selectgroup_number,disk_number,name,failgroup,create_date,path from v$asm_disk order by FAILGROUP; 不明确写明failgroup时,将为每 1个磁盘创建1个failgroup组。 指明failgroup创建不同的磁盘组 SQL> drop tablespace data3 includingcontents and datafiles; drop diskgroup datan1; drop diskgroup datan2; drop diskgroup datan3; SQL> create diskgroup datan1 normalredundancy failgroup faildg1 disk '/dev/asm-diske' name fail1 failgroup faildg2 disk '/dev/asm-diskf' name fail2; SQL> create diskgroup datan2 normalredundancy failgroup faildg1 disk '/dev/asm-diskg' namefail1 failgroup faildg2 disk '/dev/asm-diskh' namefail2 failgroup faildg3 disk '/dev/asm-diski' namefail3; SQL> create diskgroup datan3 normalredundancy failgroup fail1 disk '/dev/asm-diskm','/dev/asm-diskj' failgroup fail2disk '/dev/asm-diskk','/dev/asm-diskl'; drop前做一次查询,查询结果在后面一起列出。 drop diskgroup datan1; drop diskgroup datan2; drop diskgroup datan3; SQL> create diskgroup datan4 normalredundancy failgroup faildg1 disk '/dev/asm-diskg' namefail1 failgroup faildg2 disk '/dev/asm-diskh' namefail2 failgroup faildg3 disk '/dev/asm-diski' namefail3 failgroup faildg4 disk '/dev/asm-diske' name fail4; 查看failgroup SQL> selectgroup_number,disk_number,name,failgroup,create_date,path from v$asm_disk order by group_number; 查看大小 SQL> select group_number,name, TOTAL_MB, REQUIRED_MIRROR_FREE_MB, FREE_MB , USABLE_FILE_MB,ALLOCATION_UNIT_SIZE fromV$asm_diskgroup; Normal redundancy得至少2个fail group SQL> create diskgroup data1 normalredundancy disk '/dev/asm-diske'; create diskgroup data3 normal redundancy disk'/dev/asm-diske' * ERROR at line 1: ORA-15018: diskgroup cannot be created ORA-15072: command requires at least 2regular failure groups, discovered only 1 HIGH drop diskgroup datan4; SQL> create diskgroup datah1 highredundancy failgroup faildg1 disk '/dev/asm-diske' name fail1 failgroupfaildg2 disk '/dev/asm-diskf' name fail2 failgroup faildg3 disk '/dev/asm-diskg' name fail3; SQL> create diskgroup datah2 highredundancy failgroup faildg1 disk '/dev/asm-diskh' name failh21 failgroupfaildg2 disk '/dev/asm-diski' name failh22 failgroup faildg3 disk '/dev/asm-diskj' name failh23 failgroup faildg4disk '/dev/asm-diskk' name failh24; drop前做一次查询,查询结果在后面一起列出。 drop diskgroup datah1; drop diskgroup datah2; SQL> create diskgroup datah3 highredundancy failgroup faildg1 disk '/dev/asm-diske'name fail1 failgroup faildg2 disk '/dev/asm-diskf'name fail2 failgroup faildg3 disk '/dev/asm-diskg'name fail3 failgroup faildg4 disk '/dev/asm-diskh'name fail4 failgroup faildg5 disk '/dev/asm-diski'name fail5; drop diskgroup datah3; SQL> create diskgroup datah4high redundancy failgroup faildg1 disk'/dev/asm-diske' name fail1 failgroup faildg2 disk'/dev/asm-diskf' name fail2 failgroup faildg3 disk'/dev/asm-diskg' name fail3 failgroup faildg4 disk'/dev/asm-diskh' name fail4 failgroup faildg5 disk'/dev/asm-diski' name fail5 failgroup faildg6 disk'/dev/asm-diskj' name fail6; drop diskgroup datah4; create diskgroup datah5 highredundancy failgroup fail1 disk'/dev/asm-diskm','/dev/asm-diskj' failgroup fail2 disk'/dev/asm-diskk','/dev/asm-diskl' failgroup fail3 disk'/dev/asm-diske','/dev/asm-diskf'; drop diskgroup datah5; create diskgroup datah6 high redundancy failgroup fail1 disk '/dev/asm-diskm','/dev/asm-diskj','/dev/asm-diskg' failgroup fail2 disk '/dev/asm-diskk','/dev/asm-diskl','/dev/asm-diskh' failgroup fail3 disk '/dev/asm-diske','/dev/asm-diskf','/dev/asm-diski'; 查看failgroup SQL> selectgroup_number,disk_number,name,failgroup,create_date,path from v$asm_disk order by group_number,failgroup; 查看大小 SQL> select group_number,name, TOTAL_MB, REQUIRED_MIRROR_FREE_MB, FREE_MB , USABLE_FILE_MB,ALLOCATION_UNIT_SIZE fromV$asm_diskgroup; --------------------- 作者:bamuta 来源:CSDN 原文:https://blog.csdn.net/bamuta/article/details/32120945 版权声明:本文为博主原创文章,转载请附上博文链接!
Oracle ASM 的redundancy与failgroup
来源:这里教程网
时间:2026-03-03 12:48:06
作者:
编辑推荐:
- word2016文档中怎么自动生成目录03-03
- Oracle ASM 的redundancy与failgroup03-03
- oracle11g 查询临时表空间的使用率和正在使用临时表空间的用户03-03
- Word4种缩进排版技巧03-03
- 在Linux上安装Oracle数据库03-03
- word如何设置批注颜色与方向03-03
- Word表格标题行无限复制技巧 Word2016如何设置重复标题行03-03
- 没有索引导致的DIRECT PATH READ03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- oracle11g 查询临时表空间的使用率和正在使用临时表空间的用户
oracle11g 查询临时表空间的使用率和正在使用临时表空间的用户
26-03-03 - 没有索引导致的DIRECT PATH READ
没有索引导致的DIRECT PATH READ
26-03-03 - ASM 搭建单实例
ASM 搭建单实例
26-03-03 - Oracle autotrace 报 SP2-0618 PLUSTRACE role 问题解决
- Oracle的体系结构
Oracle的体系结构
26-03-03 - Oracle Database Cloud - Database as a Service Quick Start
- 关于Word表格的跨页断行操作
关于Word表格的跨页断行操作
26-03-03 - ORACLE分区表梳理系列(一)- 分区表概述、分类、使用方法及注意事项
ORACLE分区表梳理系列(一)- 分区表概述、分类、使用方法及注意事项
26-03-03 - oracle一个listener侦听多个实例的配置
oracle一个listener侦听多个实例的配置
26-03-03 - Oracle 18.3 Resize operation completed for file#
