Disk Group Attributes
Disk group attributes are parameters that are bound to a disk group, rather
than an Oracle ASM instance.
Disk group attributes can be set when a disk group is created or altered,
unless otherwise noted in the following list.
ACCESS_CONTROL.ENABLED
This attribute can only be set when altering a disk group.
This attribute determines whether Oracle ASM File Access Control is enabled
for a disk group.
The value can be
true or
false. The default is
false.
If the attribute is set to
true,
accessing Oracle ASM files is subject to access control. If
false, any user can access every file in
the disk group. All other operations behave independently of this attribute.
ACCESS_CONTROL.UMASK
This attribute can only be set when altering a disk group.
This attribute determines which permissions are masked out on the creation
of an Oracle ASM file for the user that owns the file, users in the same user
group, and others not in the user group. This attribute applies to all files on
a disk group.
The values can be combinations of three digits {
0|
2|
6} {
0|
2|
6}
{
0|
2|
6}.
The default is
066.
Setting to
0 masks out
nothing. Setting to
2 masks
out write permission. Setting to
6
masks out both read and write permissions.
Before setting the
ACCESS_CONTROL.UMASK
disk group attribute, you must set the
ACCESS_CONTROL.ENABLED
attribute to
true to enable
Oracle ASM File Access Control.
Setting
up Oracle ASM File Access Control
ALTER DISKGROUP data1 SET ATTRIBUTE 'access_control.enabled'
= 'true';
ALTER DISKGROUP data1 SET ATTRIBUTE 'access_control.umask' =
'026';
AU_SIZE
This attribute can only be set when creating a disk group.
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 4-1 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';
In
Example
4-1, the
NAME clauses
enable you to explicitly assign names to the disks rather than the default
system-generated names. The system-generated names are in the form
diskgroup_nnnn,
where
nnnn is the disk number for the disk in the disk
group. For ASMLib disks, the disk name defaults to the ASMLib name that is the
user label of the disk; for example,
mydisk
is the default Oracle ASM disk name for
ORCL:mydisk.
When creating the disk group in
Example
4-1, the values of following
disk group attributes were explicitly set:
·
AU_SIZE
Specifies the size of the allocation unit for the
disk group. For information about allocation unit size and extents, see
"Extents".
You can view the value of the AU_SIZE disk group attribute in the ALLOCATION_UNIT_SIZE column of the V$ASM_DISKGROUP view.
·
COMPATIBLE.ASM
Determines the minimum software version for any
Oracle ASM instance that uses a disk group. For information about the
COMPATIBLE.ASM attribute, see
"COMPATIBLE.ASM".
·
COMPATIBLE.RDBMS
Determines the minimum software version for any
database instance that uses a disk group. For information about the
COMPATIBLE.RDBMS attribute, see
"COMPATIBLE.RDBMS".
·
COMPATIBLE.ADVM
Determines whether the disk group can contain
Oracle ASM volumes.
CELL.SMART_SCAN_CAPABLE
This attribute is only applicable to Oracle Exadata storage.
COMPATIBLE.ASM
The value for the disk group
COMPATIBLE.
ASM attribute determines the minimum
software version for an Oracle ASM instance that can use the disk group. This
setting also affects the format of the data structures for the Oracle ASM
metadata on the disk. The format of other file contents is determined by Oracle
ASM Dynamic Volume Manager (Oracle ADVM) and the database instance.
For Oracle ASM in Oracle Database 11
g,
10.1
is the default setting for the
COMPATIBLE.ASM
attribute when using the SQL
CREATE
DISKGROUP statement, the
ASMCMD
mkdg command, and Oracle
Enterprise Manager
Create Disk Group page. When creating a disk group with ASMCA, the
default setting is
11.2.
COMPATIBLE.RDBMS
The value for the disk group
COMPATIBLE.RDBMS attribute determines
the minimum
COMPATIBLE
database initialization parameter setting for any database instance that is
allowed to use the disk group. Before advancing the
COMPATIBLE.
RDBMS attribute, ensure that the values for the
COMPATIBLE
initialization parameter for all of the databases that access the disk group
are set to at least the value of the new setting for
COMPATIBLE.
RDBMS.
For example, if the
COMPATIBLE
initialization parameters of the databases are set to either
11.1 or
11.2, then
COMPATIBLE.RDBMS
can be set to any value between
10.1
and
11.1 inclusively.
For Oracle ASM in Oracle Database 11
g,
10.1
is the default setting for the
COMPATIBLE.
RDBMS attribute when using the SQL
CREATE DISKGROUP statement, the ASMCMD
mkdg command, ASMCA
Create
Disk Group page, and Oracle
Enterprise Manager
Create Disk Group page.
COMPATIBLE.ADVM
The value for the disk group
COMPATIBLE.ADVM attribute determines
whether the disk group can contain Oracle ASM volumes. The value must be set to
11.2 or higher. Before
setting this attribute, the
COMPATIBLE.ASM
value must be
11.2 or higher.
Also, the Oracle ADVM volume drivers must be loaded in the supported
environment.
By default, the value of the
COMPATIBLE.ADVM attribute is empty until
set.
CONTENT.TYPE
The
CONTENT.TYPE
attribute identifies the disk group type:
data,
recovery, or
system. The type value determines the
distance to the nearest neighbor disk in the failure group where Oracle ASM
mirrors copies of the data. The default value is
data which specifies a distance of 1 to the nearest
neighbor disk. A value of
recovery
specifies a distance of 3 to the nearest neighbor disk and a value of
system specifies a distance of 5.
The attribute can be specified when creating or altering a disk group. If
CONTENT.TYPE attribute is set or changed
using
ALTER DISKGROUP, then the new configuration
does not take effect until a disk group rebalance is explicitly run.
The
CONTENT.TYPE
attribute is only valid for disk groups that are set to normal or high
redundancy. The
COMPATIBLE.ASM
attribute must be set to
11.2.0.3
or higher to enable the
CONTENT.TYPE
attribute for the disk group.
The attribute can be set with SQL, ASMCMD, or ASMCA. For example:
SQL> CREATE DISKGROUP data NORMAL REDUNDANCY
FAILGROUP controller1 DISK
'/devices/diska1' NAME diska1,
...
ATTRIBUTE
'compatible.asm' = '11.2.0.3',
'content.type' = 'recovery',
...
SQL> ALTER DISKGROUP data SET ATTRIBUTE 'content.type' = 'data';
This attribute is primarily intended for use with Oracle Exadata storage.
DISK_REPAIR_TIME
This attribute can only be set when altering a disk group.
Oracle ASM Fast Mirror Resync
Restoring
the redundancy of an Oracle ASM disk group after a transient disk path failure
can be time consuming. This is especially true if the recovery process requires
rebuilding an entire Oracle ASM failure group. Oracle ASM fast mirror resync
significantly reduces the time to resynchronize a failed disk in such
situations. When you replace the failed disk, Oracle ASM can quickly
resynchronize the Oracle ASM disk extents.
Note:
To use this feature, the disk group compatibility attributes
must be set to
11.1 or higher. For more information, refer to
"Disk
Group Compatibility".
Any problems that make a failure group temporarily unavailable are
considered transient failures that can be recovered by the Oracle ASM fast
mirror resync feature. For example, transient failures can be caused by disk
path malfunctions, such as cable failures, host bus adapter failures,
controller failures, or disk power supply interruptions.
Oracle ASM fast resync keeps track of pending changes to extents on an
OFFLINE disk during an outage. The
extents are resynced when the disk is brought back online.
By default, Oracle ASM drops a disk in 3.6 hours after
it is taken offline.
You can set the
DISK_REPAIR_TIME disk group attribute to
delay the drop operation by specifying a time interval to repair the disk and
bring it back online. The time can be specified in units of minutes (
m or
M)
or hours (
h or
H). If you omit the unit, then the
default unit is hours. The
DISK_REPAIR_TIME
disk group attribute can only be set with the
ALTER DISKGROUP
SQL statement.
If the attribute is not set explicitly, then the default value (
3.6h) applies to disks that have been
set to
OFFLINE mode without
an explicit
DROP AFTER clause. Disks taken offline due to
I/O errors do not have a
DROP
AFTER clause.
The default
DISK_REPAIR_TIME
attribute value is an estimate that should be adequate for most environments.
However, ensure that the attribute value is set to the amount of time that you
think is necessary in your environment to fix any transient disk error, and
that you are willing to tolerate reduced data redundancy.
The elapsed time (since the disk was set to
OFFLINE mode) is incremented only when the disk group
containing the offline disks is mounted. The
REPAIR_TIMER
column of
V$ASM_DISK shows
the amount of time left (in seconds) before an offline disk is dropped. After
the specified time has elapsed, Oracle ASM drops the disk. You can override
this attribute with the
ALTER
DISKGROUP OFFLINE DISK statement and the
DROP
AFTER clause.
Note:
If a disk is offlined by Oracle ASM because of an I/O
(write) error or is explicitly offlined using the ALTER DISKGROUP...
OFFLINE statement without the DROP
AFTER clause, then the value specified for the DISK_REPAIR_TIME
attribute for the disk group is used.
Altering the
DISK_REPAIR_TIME
attribute has no effect on offline disks. The new value is used for any disks
that go offline after the attribute is updated. You can confirm this behavior
by viewing the Oracle ASM alert log.
If an offline disk is taken offline for a second time, then the elapsed time
is reset and restarted. If another time is specified with the
DROP AFTER
clause for this disk, the first value is overridden and the new value applies.
A disk that is in
OFFLINE
mode cannot be dropped with an
ALTER
DISKGROUP DROP DISK
statement; an error is returned if attempted. If for some reason the disk must
be dropped (such as the disk cannot be repaired) before the repair time has
expired, a disk can be dropped immediately by issuing a second
OFFLINE statement with a
DROP AFTER
clause specifying
0h or
0m.
You can use
ALTER DISKGROUP to set the
DISK_REPAIR_TIME attribute to a
specified hour or minute value, such as 4.5 hours or 270 minutes. For example:
ALTER DISKGROUP data SET ATTRIBUTE 'disk_repair_time' = '4.5h'
ALTER DISKGROUP data SET ATTRIBUTE 'disk_repair_time' = '270m'
After you repair the disk, run the SQL statement
ALTER DISKGROUP
ONLINE DISK. This statement brings a repaired
disk group back online to enable writes so that no new writes are missed. This
statement also starts a procedure to copy of all of the extents that are marked
as stale on their redundant copies.
If a disk goes offline when the Oracle ASM instance is in rolling upgrade
mode, the disk remains offline until the rolling upgrade has ended and the
timer for dropping the disk is stopped until the Oracle ASM cluster is out of
rolling upgrade mode. See
"Using
Oracle ASM Rolling Upgrade". Examples of taking disks offline and
bringing them online follow.
The following example takes disk
DATA_001
offline and drops it after five minutes.
ALTER DISKGROUP data OFFLINE DISK DATA_001 DROP AFTER 5m;
The next example takes the disk
DATA_001
offline and drops it after the time period designated by
DISK_REPAIR_TIME elapses:
ALTER DISKGROUP data OFFLINE DISK DATA_001;
This example takes all of the disk in failure group
FG2 offline and drops them after the
time period designated by
DISK_REPAIR_TIME
elapses. IF you used a
DROP AFTER clause, then the disks would be
dropped after the specified time:
ALTER DISKGROUP data OFFLINE DISK IN FAILGROUP FG2;
The next example brings all of the disks in failure group
FG2 online:
ALTER DISKGROUP data ONLINE DISK IN FAILGROUP FG2;
This example brings only disk
DATA_001
online:
ALTER DISKGROUP data ONLINE DISK DATA_001;
This example brings all of the disks in disk group
DATA online:
ALTER DISKGROUP data ONLINE ALL;
Querying the
V$ASM_OPERATION
view while you run any of these types of
ALTER
DISKGROUP ...
ONLINE statements displays the name and
state of the current operation that you are performing. For example, the query:
SELECT GROUP_NUMBER, OPERATION, STATE FROM V$ASM_OPERATION;
Displays output similar to the following:
GROUP_NUMBER OPERA STAT
------------ ----- ----
1 ONLIN RUN
An
OFFLINE operation is
not displayed in a
V$ASM_OPERATION
view query.
IDP.BOUNDARY and IDP.TYPE
These attributes are intended for use with Oracle Exadata storage.
SECTOR_SIZE
This attribute can only be set when creating a disk group.
Specifying the Sector Size for Drives
You can use the optional
SECTOR_SIZE disk group attribute with
the
CREATE DISKGROUP SQL statement to specify disks
with the sector size set to the value of
SECTOR_SIZE
for the disk group. Oracle ASM provides support for 4 KB sector disk drives
without negatively affecting performance. The
SECTOR_SIZE disk group attribute can be set only during
disk group creation.
The values for
SECTOR_SIZE
can be set to 512, 4096, or 4K if the disks support those values. The default
value is platform dependent. The
COMPATIBLE.ASM
and
COMPATIBLE.RDBMS disk
group attributes must be set to 11.2 or higher to set the sector size to a
value other than the default value.
Note:
Oracle Automatic Storage Management Cluster File System
(Oracle ACFS) does not support 4 KB sector drives. There is a performance
penalty for Oracle ACFS when using 4 KB sector disk drives in 512 sector
emulation mode.
The following validations apply
to the sector size disk group attribute.
·
Oracle ASM prevents disks of different sector
sizes from being added to the same disk group. This validation occurs during CREATE DISKGROUP, ALTER
DISKGROUP ADD DISK,
and ALTER DISKGROUP MOUNT operations.
·
If the SECTOR_SIZE
attribute is explicitly specified when creating a disk group, then Oracle ASM
attempts to verify that all disks discovered through disk search strings have a
sector size equal to the specified value. If one or more disks were found to
have a sector size different from the specified value, or if Oracle ASM was not
able to verify a disk sector size, then the create operation fails.
Oracle ASM also attempts to verify disk sector size
during the mount operation and the operation fails if one or more disks have a
sector size different than the value of the SECTOR_SIZE
attribute.
·
If the SECTOR_SIZE
attribute is not specified when creating a disk group and Oracle ASM can verify
that all discovered disks have the same sector value, then that value is
assumed for the disk group sector size that is created. If the disks have
different sector sizes, the create operation fails.
·
When new disks are added to an existing disk
group using the ALTER DISKGROUP .. ADD DISK
SQL statement, you must ensure that the new disks to be added have the same
value as the SECTOR_SIZE
disk group attribute. If the new disks have different sector sizes, the alter
operation fails.
·
You can determine the sector size value that has
either been assumed or explicitly set for a successful disk group creation by
querying the V$ASM_ATTRIBUTE
view or run the ASMCMD lsattr
command. You can also query the SECTOR_SIZE
column in the V$ASM_DISKGROUP
view.
· SQL> SELECT name, value FROM V$ASM_ATTRIBUTE
· WHERE name = 'sector_size' AND group_number = 1;
· NAME VALUE
· --------------------------- -----------------------
· sector_size 512
·
· SQL> SELECT group_number, sector_size FROM V$ASM_DISKGROUP
· WHERE group_number = 1;
·
· GROUP_NUMBER SECTOR_SIZE
· ------------ -----------
· 1 512
·
Not all disks support all of the possible SECTOR_SIZE values. The sector size
attribute setting must be compatible with the physical hardware.
As shown in
Example
4-3, you can use the
SECTOR_SIZE
attribute with the
CREATE DISKGROUP SQL statement to specify the
sector size of the disk drive on which the Oracle ASM disk group is located.
Example 4-3
Creating a disk group of 4K sector size
CREATE DISKGROUP data NORMAL REDUNDANCY
FAILGROUP controller1 DISK
'/devices/diska1',
'/devices/diska2',
'/devices/diska3',
'/devices/diska4'
FAILGROUP controller2 DISK
'/devices/diskb1',
'/devices/diskb2',
'/devices/diskb3',
'/devices/diskb4'
ATTRIBUTE 'compatible.asm' = '11.2', 'compatible.rdbms' = '11.2',
'sector_size'='4096';
STORAGE.TYPE
The
STORAGE.TYPE disk
group attribute specifies the type of the disks in the disk group. The possible
values are
AXIOM,
ZFSSA, and
OTHER. If the attribute is set to
AXIOM or
ZFSSA, then all disks in the disk group must be of that
type. If the attribute is set to
OTHER,
then any types of disks can be in the disk group.
If the
STORAGE.TYPE disk
group attribute is set to
AXIOM
or
ZFSSA, then functionality
for Hybrid Columnar Compression (HCC) can be enabled for Pillar Axiom or ZFS
storage.