 |
|
Oracle Managing
ASM Disk Groups
Oracle Tips by Burleson Consulting |
This
is an excerpt from "Oracle 10g New Features for Administrators" by
Ahmed Baraka.
ASM Striping
For performance reasons, you must use disks of the
same type and performance capacity in a disk group.
ASM provides two types of data striping, depending
on the database file type:
Coarse striping: The stripe size is a relatively
large 1MB chunk of file space. You may use coarse striping for all
files in an Oracle database, except the control files, online redo
log files, and flashback files.
Fine striping To reduce file latency, ASM
provides a fine striping scheme, where the striping is in smaller
chunk sizes of 128KB. You may want to use fine striping for control
files, online redo log files, and flashback files.
ASM Mirroring
Disk mirroring provides data redundancy. If you lose
a disk, you can use its mirror disk to continue operations without
missing a beat. ASM mirrors extents.
Failure Groups
Failure groups define disks that share components,
such that if one fails then other disks sharing the component might
also fail.
Types of ASM Mirroring
External redundancy You choose this level
of mirroring when you are using operating system storage array
protection. Disk groups under this redundancy level dont have any
failure groups.
Normal redundancy This type provides
two-way mirroring. Thus, to support a normal redundancy level, you
must create at least two failure groups.
High redundancy This type provides
three-way mirroring. You must create at least three failure
groups.
Creating a Disk Group
SQL> STARTUP
NOMOUNT
SQL> CREATE DISKGROUP dgroup1 NORMAL REDUNDANCY
FAILGROUP controller1 DISK
'/devices/diska1' name testdisk size 100G,
'/devices/diska2',
'/devices/diska3'
FAILGROUP controller2 DISK
'/devices/diskb1',
'/devices/diskb2',
'/devices/diskb3'
You can force a disk that is already a member of
another disk group to become a member of the disk group you are
creating by specifying the FORCE
Note: The CREATE DISKGROUP statement mounts the
disk group for the first time, and adds the disk group name to the
ASM_DISKGROUPS initialization parameter if a spfile is being used.
If a pfile is being used and you want the disk group to be
automatically mounted at instance startup, then you must add the
disk group name to the ASM_DISKGROUPS initialization parameter
before the next time that you shut down and restart the ASM
instance.
Adding Disks to a Disk Group
ALTER DISKGROUP
dgroup1 ADD DISK
'/devices/diska5' NAME diska5,
'/devices/diska6' NAME diska6;
ALTER DISKGROUP dgroup1 ADD DISK
'/devices/diska*';
When a disk is added, it is formatted and then
rebalanced.
When you dont specify a FAILGROUP clause, the
disk is in its own failure group.
If you don't specify the NAME clause, Oracle
assigns its own system-generated names.
If the disk already belongs to a disk group, the
statement will fail.
Use the FORCE clause to add a disk that is a
current member of disk group.
Dropping Disks and Disk Groups
ALTER DISKGROUP
dgroup1 DROP DISK diska5;
DROP DISKGROUP test_groupa INCLUDING CONTENTS;
DROP DISKGROUP statements requires the instance to
be in MOUNT state.
When a disk is dropped, the disk group is
rebalanced by moving all of the file extents from the dropped disk
to other disks in the disk group. The header on the dropped disk is
then cleared.
If you specify the FORCE clause for the drop
operation, the disk is dropped even if Automatic Storage
Management cannot read or write to the disk.
You can also drop all of the disks in specified
failure groups using the DROP DISKS IN FAILGROUP clause.
Undropping Disks in Disk Groups
ALTER DISKGROUP
dgroup1 UNDROP DISKS;
This statement enables you to cancel all pending
drops of disks within disk groups.
Rebalancing Disk Groups
You can increase the speed of a rebalancing
operation by doing any of the following things:
o raising the value of the ASM_POWER_LIMIT
initialization parameter
o using a high value for the POWER clause in a disk rebalance
operation
ALTER DISKGROUP dgroup1 REBALANCE POWER 5