Veritas Storage Foundation Intelligent Storage Provisioning 5.0 AdministratorÆs Guide, HP-UX 11i v3, First Edition, May 2008

69Creating application volumes
Creating volumes
Creating volumes by specifying templates
Volumes can be created by specifying templates instead of capabilities. The
following example demonstrates how to create a mirrored volume using a
template:
# vxassist -g mydg -P mypool make mirvol 1g \
volume_template=DataMirroring
Note: If you specify templates when creating a volume, you must ensure that
these templates are self-sufficient, and that they do not depend on templates
that are not specified on the command line. This applies to all cases where
templates are named by themselves, or in combination with a mixture of
capabilities and rules.
A template can refer to other templates in the following ways:
It can be an extension of another template.
It can apply another template.
It can require or inherit a capability that is provided by another template.
If one or more of these conditions apply, ISP may not be able to use the given
templates and volume creation may fail. To view the details of a template, use
the following command:
# vxtemplate [-g
diskgroup
] print
template_name
Examine the definitions of the extends, inherits, requires and apply fields to
see the other templates on which the specified template depends.
See “Volume templates” on page 140.
For example, the following command fails because of a template dependency:
# vxassist -g mydg -P mypool make myvol 1g \
volume_template=PrefabricatedRaid5
VxVM vxassist ERROR V-61-49872-28 Template PrefabricatedRaid5 is
not valid for the operation. Either the template itself is
invalid or one or more of the related templates/capabilities are
not in the scope.
The vxtemplate print command is then run to examine the definition of the
PrefabricatedRaid5 volume template:
# vxtemplate -g mydg print PrefabricatedRaid5
volume_template PrefabricatedRaid5 {
provides PrefabricatedRaid5
rules {
apply ArrayProductId
confineto "Parity" ="1"
}
};