This section describes how to manage disk group templates under the following topics:
Templates are used to set attributes of files created in an Oracle ASM disk group. When a file is created, redundancy and striping attributes are set for that file based on an explicitly named template or the system template that is the default template for the file type.
When a disk group is created, Oracle ASM creates a set of default templates for that disk group. The set consists of one template for each file type (data file, control file, redo log file, and so on) that is supported by Oracle ASM. For example, a template named ONLINELOG
provides the default file redundancy and striping attributes for all redo log files written to Oracle ASM disks. Default template settings depend on the disk group type. The default template for data files for a normal redundancy disk group sets two-way mirroring, while the corresponding default template in a high redundancy disk group sets three-way mirroring. You can modify these default templates.
For example, default redundancy for the online redo log files (ONLINELOG
template) for a normal redundancy disk group is MIRROR
. In Example 4-1, this setting means that when one copy of a redo log file extent is written to a disk in failure group controller1
, a mirrored copy of the file extent is written to a disk in failure group controller2
. To support the default mirroring of a normal redundancy disk group, at least two failure groups must be defined.
Table 5-6 lists the default templates and the attributes that are associated to matching files. As the table shows, the initial redundancy value of each default template depends on the type of disk group that the template belongs to.
Using clauses of the ALTER DISKGROUP
statement, you can add new templates to a disk group, modify existing ones, or drop templates. The reason to add templates is to create the right combination of attributes to meet unique requirements. You can then reference a template name when creating a file, thereby assigning desired attributes based on an individual file rather than on the file type.
The V$ASM_TEMPLATE
view lists all of the templates known to the Oracle ASM instance. For an example of the information displayed in the V$ASM_TEMPLATE
view, see Example 6-10.