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.ASM
, COMPATIBLE.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.ADVM
attribute 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 ALTER
DISKGROUP
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
Sets the attributes for an Oracle ASM disk group.
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
Option | Description |
---|---|
| Disk group name. |
| Name of the attribute. |
| 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".
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.
umount
Dismounts a disk group.
umount
{
-a
| [
-f
]
diskgroup
}
Table 12-47 lists the syntax options for the umount
command.
Table 12-47 Options for the umount command
Option | Description |
---|---|
| Name of the disk group. |
| Dismounts all mounted disk groups. These disk groups are listed in the output of the |
| Forces the dismount operation. |
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.
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