Previous  |  Next  >  
Product: Storage Foundation Guides   
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide   

Volume Templates

A volume template (or template for short) is a meaningful collection of rules that provides capabilities for volumes as defined by those rules, or by reference to other capabilities. ISP refers to templates when creating an application volume. It chooses an appropriate template to use based on the capabilities that you request for the volume, and allocates storage by following the rules that the template contains.

The format of a typical template specification is shown here:


volume_template template_name {
  extends template1template2, ...
  inherits capability5capability6, ...
  provides capability1capability2, ...
  requires capability3capability4, ...
  description text
  descriptionid id
  group name
  rules {
   rule1
   rule2
   ...
  }
};

This definition has the following important components:

template_name Indicates the nature of the volume that can be created by the template, for example, DataMirroring, Raid5Volume and InstantSnapshottable.

extends Indicates that the template includes all the capabilities, rules and variables from the named templates. See extends for more information.

inherits Indicates that the template can inherit capabilities when required from those listed. See inherits for more information.

provides Indicates the capabilities that are provided by volumes created from the template. See provides for more information.

requires Indicates that the template can acquire rules when required from other templates that provide the specified capabilities. See requires for more information.

description Describes a template in English.

descriptionid References the message catalog where localized versions of the description may be found, and provides an index number for the description in the catalog.

group Indicates the name of the group to which application volumes created from this template belong.

rules Specifies the start of the section that contains the rules for selecting and laying out storage, and which implement the capabilities that the template provides. The rules usually operate on the values that were specified for the arguments of the requested capabilities. See Rules and Compound Rules for more information.

The following sections describe the keywords in detail:

For a formal definition of volume_template in the ISP language, see Volume Template.

extends

A template can derive some of its properties by extending one or more base templates as shown in this example:


volume_template DerivedTemplate {
  extends BaseTemplate
  rules {
   ...
  }
};

By extending template BaseTemplate, the template DerivedTemplate:

  • Provides all capabilities that BaseTemplate provides (see provides).
  • Requires all capabilities that BaseTemplate requires (see requires).
  • Inherits all capabilities that BaseTemplate inherits (see inherits).
  • Obtains and applies all the rules of BaseTemplate.
  • Can use variables of all the capabilities that BaseTemplate provides.

  • Note   Note    BaseTemplate and DerivedTemplate cannot use different capabilities that have variables with the same name.

The derived template has an "is a" relationship with its base templates. The derived template can be used instead of any of its base templates.

The following example demonstrates the application of the extends keyword:

  • Extend ReliablePerformant into the template MyReliablePerformant:

  • volume_template MyReliablePerformant {
      extends ReliablePerformant
      rules {
       ...
      }
    };

group

This keyword specifies that all volumes allocated using this template are in the specified group. Rules in the storage pool apply to all groups, and specify relationships between groups. For example, a storage pool rule might specify that all groups are to be separated by enclosures. This would mean that all templates with different group tags must be placed in separate non-overlapping sets of enclosures. This keyword can also appear within a log clause. In this case, the specified group overrides any group specified in the template.

inherits

If a template specifies that it can inherit a capability, it provides that capability when required. Inheriting a capability is equivalent to the combination of requiring and providing a capability (see requires and provides).

The following example demonstrates the application of the inherits keyword:

  • The following template definition:

  • volume_template ReliableSnapshot {
      requires Reliable
      provides Reliable, Snapshot
      rules {
       ...
      }
    };
    can be rewritten as:

    volume_template ReliableSnapshot {
      inherits Reliable
      provides Snapshot
      rules {
       ...
      }
    };

provides

A template provides one or more capabilities as defined by its rules, or by requiring capabilities (see requires). Any variables that are defined for the capability can be used by the template's rules.

The following example demonstrates the application of the provides keyword:

  • Define a template, ReliableT, that provides the Reliable capability, and which uses the NMIRS variable of the capability to set the number of mirrors:

  • volume_template ReliableT {
      provides Reliable
      rules {
       mirror NMIRS {
        ...
       }
      }
    };

requires

If a template requires one or more capabilities, it can take the appropriate rules from any templates that provide those capabilities.

The requires keyword does not imply provides (see provides). Whenever, a template provides a capability by specifying that it requires it, it should be explicitly listed in a provides or inherits clause (see inherits).

The following example demonstrates the application of the requires keyword:

  • Define a template, MySnapshot, that provides the SnapShot capability, and requires, but does not provide, the Reliable capability:

  • volume_template MySnapshot {
      requires Reliable
      provides Snapshot
      rules {
       ...
      }
    };
    This template picks up any templates that provide the Reliable capability, and merges their rules with its own rules. If the template were also required to provide the Reliable capability, the inherits keyword should be used as shown here:

    volume_template MyReliableSnapshot {
      inherits Reliable
      provides Snapshot
      rules {
       ...
      }
    };
    This template provides the Snapshot capability through its own rules, and also provides the Reliable capability by using rules from other templates.

    Note   Note    By allowing ISP to choose any template that provides the required capability, the requires keyword gives ISP more flexibility when allocating storage. This behavior is known as dynamic inheritance.

    When choosing a template with a required capability, ISP gives preference to templates that provide only that capability. This behavior avoids giving unrelated capabilities to a volume.

    When searching for a template with a required capability, ISP chooses only those templates that inherit or provide that capability.

    When searching for a template with a required capability, ISP recursively chooses templates that provide all the required capabilities.

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation Guides  
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide  
VERITAS Software Corporation
www.veritas.com