Datasheet

Working with the ASM Instance
15
Default ASM Template Redundancy Settings
So, if you create a disk group with normal redundancy using the default template and
you put datales on it, the datale template would be used by default. In this case, a
datale would use two-way mirroring and coarse striping (see the section “Striping”).
This means you would have to allocate at least two disks to an ASM disk group when
it was created, one assigned to a different failure group. We will discuss failure groups
later in this chapter.
Dealing with ASM Disk Loss
If you lose an ASM disk, then one of two situations will occur. First, ASM will take the
lost/damaged disk ofine and then automatically drop it. ASM will attempt a rebalance
operation to maintain redundancy, using the mirror copies as required. The disk group and
its associated data will remain available during this time.
If the disk group cannot be rebalanced, then ASM will take the whole disk group offline
and the data in that disk group will not be available until the damaged disk is restored and
the disks can be rebalanced.
Striping
Table 1.2 includes a striping column. There are two values there, fine and coarse. This
refers to the stripe size that ASM applies to the disks that the disk groups are assigned to.
If fine striping is selected, the ASM will use a 128KB stripe size. If coarse is selected, then
Oracle uses the AU size of the disk group for the stripe size.
Templates
When you create an ASM disk group, Oracle will assign a default template to that disk
group (see Table 1.2). A template is simply a named collection of attributes. For example,
if you create a disk group using the default template and then create datales in that disk
group, the datale template will define the redundancy and striping for that data.
There may be cases where you want to dene your own template for a disk group. You
will need to first create the disk group and then alter it using the
add template parameter
of the
alter diskgroup commands, as shown in this example:
CREATE DISKGROUP sp_dgroup2 NORMAL REDUNDANCY
failgroup diskcontrol1 DISK ‘c:\oracle\asm_disk\_file_disk3’ NAME file_diska1
failgroup diskcontrol2 DISK ‘c:\oracle\asm_disk\_file_disk4’ NAME file_diskb1;
ALTER DISKGROUP sp_dgroup2 ADD TEMPLATE new_template ATTRIBUTES (mirror);
After the mirror template has been added, you can create files in that disk group using
the new template. When you add a template to a disk group, the template cannot be retro-
actively applied to files already in that disk group. As a result, you will need to use RMAN
to back up and then restore files that already exist in the disk group in order for them to
take on the attributes of the new template.
95134c01.indd 15 1/28/09 9:43:42 AM