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

133Creating and modifying user templates
Creating user templates
Rules can also be specified to user templates, as shown in these examples that
could be used for creating application volumes for database tables and indexes:
user_template DB_Table {
description "Makes mirrored volume for a database table"
capability DataMirroring {
NMIRS = 2
}
rules {
confineto "VendorName"="EMC"
}
};
user_template DB_Index {
description "Makes high performance volume for a database
index"
capability Striping {
NCOLS = 8
}
rules {
confineto "VendorName"="EMC"
}
};
The user template, DB_Table, can be used to create a mirrored volume with two
plexes, but is restricted to using only EMC disks. Similarly, the user template,
DB_Index, can be used to create a striped volume with eight columns, and is
also restricted to using only EMC disks.
Creating user templates
You can either create a user template by defining it directly from the command
line, or by defining it in a configuration file. The first method is only suitable for
very simple user templates. It is usually preferable to define your templates in a
configuration file.
To create a user template directly from the command line, use the
vxusertemplate create command as shown here:
# vxusertemplate create
usertemplate_name
\
[description="
string
"] \
[rules=
rule1
[
rule2
]...] \
[capability=
capability1
[(
var1
=
value1
[,
var2
=
value2
]...)]\
[,
capability2
[(
var1
=
value1
[,
var2
=
value2
]...)]]...]
For example, the following command creates a user template named
RP_DB_Table that has both Reliable and HighPerformance capabilities:
# vxusertemplate create RP_DB_Table \
description="Makes reliable high performance volume \
for database table"rules=confineto "VendorName"="EMC" \
capability=’DataMirroring(NMIRS=2),Striping(NCOLS=8)’