Oracle ASM的AU(Allocation Units)

Allocation Units

Every Oracle ASM disk is divided into allocation units (AU). An allocation unit is the fundamental unit of allocation within a disk group. A file extent consists of one or more allocation units. An Oracle ASM file consists of one or more file extents.

When you create a disk group, you can set the Oracle ASM allocation unit size with the AU_SIZE disk group attribute. The values can be 1, 2, 4, 8, 16, 32, or 64 MB, depending on the specific disk group compatibility level. Larger AU sizes typically provide performance advantages for data warehouse applications that use large sequential reads.

For information about specifying the allocation unit size for a disk group, see "Specifying the Allocation Unit Size". For information about disk group compatibility attributes, see "Disk Group Compatibility".

Specifying the Allocation Unit Size

Oracle recommends that the allocation unit (AU) size for a disk group be set to 4 megabytes (MB). In addition to this AU size recommendation, the operating system (OS) I/O size should be set to the largest possible size.

Some benefits of a 4 MB allocation unit are:

  • Increased I/O through the I/O subsystem if the I/O size is increased to the AU size.

  • Reduced SGA size to manage the extent maps in the database instance.

  • Faster datafile initialization if the I/O size is increased to the AU size.

  • Increased file size limits.

  • Reduced database open time.

The allocation unit size is specified with the disk group attribute AU_SIZE. The AU size cannot be altered after a disk group is created. Example 4-1 shows how the AU_SIZE is specified with the CREATE DISKGROUP SQL statement.

{

Example  Creating the DATA disk group


{

CREATE DISKGROUP data NORMAL REDUNDANCY
  FAILGROUP controller1 DISK
    '/devices/diska1' NAME diska1,
    '/devices/diska2' NAME diska2,
    '/devices/diska3' NAME diska3,
    '/devices/diska4' NAME diska4
  FAILGROUP controller2 DISK
    '/devices/diskb1' NAME diskb1,
    '/devices/diskb2' NAME diskb2,
    '/devices/diskb3' NAME diskb3,
    '/devices/diskb4' NAME diskb4
  ATTRIBUTE 'au_size'='4M',
    'compatible.asm' = '11.2', 
    'compatible.rdbms' = '11.2',
    'compatible.advm' = '11.2';

}

Disk Group Compatibility

This section describes disk group compatibility under the following topics:

Overview of Disk Group Compatibility

Advancing the disk group compatibility settings enables you to use the new Oracle ASM features that are available in a later release. For example, a disk group with the disk group compatibility attributes set to 11.2 can take advantage of new Oracle 11g release 2 (11.2) features, such as Oracle ASM volumes in disk groups and Oracle ASM File Access Control. See Table 4-3 for the features enabled for combinations of compatibility attribute settings.

The disk group compatibility feature also enables environments to interoperate when they use disk groups from both Oracle Database 10g and Oracle Database 11g. For example, disk group compatibility settings that are set to Oracle Database 10g enable an Oracle 10g client to access a disk group created with Oracle ASM 11g.

The disk group attributes that determine compatibility are COMPATIBLE.ASMCOMPATIBLE.RDBMS. and COMPATIBLE.ADVM. The COMPATIBLE.ASM andCOMPATIBLE.RDBMS attribute settings determine the minimum Oracle Database software version numbers that a system can use for Oracle ASM and the database instance types respectively. For example, if the Oracle ASM compatibility setting is 11.2, and RDBMS compatibility is set to 11.1, then the Oracle ASM software version must be at least 11.2, and the Oracle Database client software version must be at least 11.1. The COMPATIBLE.ADVMattribute determines whether the Oracle ASM Dynamic Volume Manager feature can create an volume in a disk group.

When you create a disk group, you can specify the disk group compatibility attribute settings in the CREATE DISKGROUP SQL statement. The ALTERDISKGROUP SQL statement can update the compatible attribute settings for existing disk groups. If not specified when using the CREATE DISKGROUP SQL statement, 10.1 is the default setting for both the COMPATIBLE.ASM and COMPATIBLE.RDBMS attributes for Oracle ASM in Oracle Database 11g. TheCOMPATIBLE.ADVM attribute is empty if it is not set. See Table 4-2 for examples of valid combinations of compatible attribute settings.

You can set and update disk group attributes with the ASMCMD setattr command. For information about the ASMCMD setattr command, see"setattr".

Notes:

  • The disk group compatibility settings determine whether your environment can use the latest Oracle ASM features.

  • The disk group compatibility settings can only be advanced; you cannot revert to a lower compatibility setting. See "Reverting Disk Group Compatibility".

  • The COMPATIBLE.ASM attribute must be advanced before advancing other disk group compatibility attributes and its value must be greater than or equal to the value of other disk group compatibility attributes.


setattr

Purpose

Sets the attributes for an Oracle ASM disk group.

Syntax and Description


setattr  -G  diskgroup  attribute_name  attribute_value

Table 12-46 lists the syntax options for the setattr command.

Table 12-46 Options for the setattr command

OptionDescription

-G diskgroup

Disk group name.

attribute_name

Name of the attribute.

attribute_value

Value of the attribute.


The COMPATIBLE.ASM attribute must be advanced before advancing other disk group compatibility attributes and its value must be greater than or equal to the value of other disk group compatibility attributes.

For information about disk group attributes, see "Disk Group Attributes".

Example

The following are examples of the setattr command. The first example sets the disk group attribute COMPATIBLE.ASM to 11.2 for the data disk group. The second example sets the disk group attribute COMPATIBLE.RDBMS to 11.2 for the data disk group.

Example 12-50 Using the ASMCMD setattr command

ASMCMD [+] > setattr -G data compatible.asm 11.2.0.0.0

ASMCMD [+] > setattr -G data compatible.rdbms 11.2.0.0.0

umount

Purpose

Dismounts a disk group.

Syntax and Description


umount {  -a | [ -fdiskgroup }

Table 12-47 lists the syntax options for the umount command.

Table 12-47 Options for the umount command

OptionDescription

diskgroup

Name of the disk group.

-a

Dismounts all mounted disk groups. These disk groups are listed in the output of the V$ASM_DISKGROUPview.

-f

Forces the dismount operation.


Example

The following are examples of the umount command. The first example dismounts all disk groups mounted on the Oracle ASM instance. The second example forces the dismount of the data disk group.

Example 12-51 Using the ASMCMD umount command

ASMCMD [+] > umount -a

ASMCMD [+] > umount -f data


OCP 题库考核

Q128. What is the default AU size of an ASM diskgroup? What is the maximum AU size in an ASM disk group?

A. 100KB default, 10TB maximum

B. 256KB default, 1024MB maximum

C. 10MB default, 126PB maximum

D. 64KB default, 1EB maximum

E. 1MB default, 64MB maximum

 

Answer: E



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

搞怪的索引

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值