Veritas Storage Foundation Intelligent Storage Provisioning 5.
Legal Notices © Copyright 2008 Hewlett-Packard Development Company, L.P. Publication Date: 2008 Confidential computer software. Valid license from HP required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Contents Chapter 1 Understanding ISP The benefits of ISP ...............................................................................................16 Support for ISP in the vxassist command ................................................19 Summary of the benefits of using ISP ......................................................19 Limitations of ISP ........................................................................................20 Frequently asked questions about ISP .......................
6 Contents Creating a cache volume for space-optimized snapshots ..................... 47 Preparing a space-optimized snapshot .................................................... 47 Taking a space-optimized snapshot of an application volume ............ 47 Chapter 2 Storage pools Reserving and unreserving disks for use with ISP ......................................... 49 Organizing storage pools in a disk group ........................................................ 50 Listing storage pool sets ......
Contents Resizing volumes online .....................................................................................76 Determining the maximum size of a volume ...........................................77 Increasing the size of a volume to a specified length .............................77 Increasing the size of a volume by a specified amount ..........................77 Reducing the size of a volume to a specified length ...............................
8 Contents Removing a linked break-off snapshot volume .................................... 110 Adding a snapshot to a cascaded snapshot hierarchy ......................... 111 Refreshing an instant snapshot .............................................................. 111 Attaching plexes of an instant snapshot ............................................... 112 Reattaching a linked break-off snapshot volume ................................. 112 Restoring a volume from an instant snapshot ...............
Contents inherits ........................................................................................................142 provides .......................................................................................................143 requires ........................................................................................................143 Rules .....................................................................................................................144 Storage selection rules .
10 Contents value_expr ................................................................................................... 169 Storage pool ........................................................................................................ 170 Template set ....................................................................................................... 171 Storage pool set .................................................................................................. 171 st_pool_list ........
Contents DataMirroring ............................................................................................182 DataMirrorStripe .......................................................................................183 DataStripeMirror .......................................................................................183 DCOLogMirroring ......................................................................................183 DCOLogStriping .......................................................
12 Contents Raid5LogMirroring .................................................................................... 189 Raid5LogStriping ....................................................................................... 189 Snapshottable ............................................................................................. 189 Striping ........................................................................................................ 190 Storage pool ........................................
Contents Enabling ISP to work with SAL ........................................................................215 Configuring root as a SAL user ........................................................................
14 Contents
Chapter 1 Understanding ISP Intelligent Storage Provisioning (ISP) allows you to organize and manage your physical storage by creating virtual storage devices, application volumes. You can use such volumes in the same way as traditional volumes in VeritasTM Volume Manager (VxVM) by Symantec. ISP creates application volumes from available storage with the capabilities you specify.
16 Understanding ISP The benefits of ISP Note: Products and features such as dynamic multipathing (DMP), RAID-5, SAL, snapshots, and VAIL require licenses in addition to the base license. This book describes the command-line interface to ISP, and the language that is used for writing new rules, capabilities and templates.
Understanding ISP The benefits of ISP Figure 1-1 Traditional model for creating and administering volumes in Veritas Volume Manager Storage within a disk group User specifications for volume layout Attributes Knowledge of storage attributes in VxVM is limited to automatically discovered information such as enclosure membership, and path and controller connectivity. Beyond this, you must state explicitly which storage to use.
18 Understanding ISP The benefits of ISP available storage is potentially unlimited, and the set of rules that the allocation engine uses to choose storage is defined externally to commands such as vxassist and vxvoladm. Figure 1-2 How ISP enhances volume management Storage pool within a disk group Attributes, templates, capabilities and policies User-specified rules and capabilities VxVM’s knowledge of storage attributes is potentially unlimited.
Understanding ISP The benefits of ISP Support for ISP in the vxassist command In release 5.0 of VxVM, it is now possible to use the vxassist command to create and administer ISP volumes. The vxassist command now accepts the same specification of templates, capabilities and rules as the vxvoladm command, and a set of vxassist storage specification attributes are automatically translated into equivalent ISP rules.
20 Understanding ISP Frequently asked questions about ISP Limitations of ISP The following features of vxassist are not currently supported for ISP volumes: ■ The vxassist utility includes a number of hard-coded rules that it uses when selecting storage. For example, vxassist may configure objects on separate controllers without being instructed to do so. ISP requires that the selection of storage is made explicit through rules, capabilities and templates.
Understanding ISP Frequently asked questions about ISP The answer can be illustrated by an example. Suppose you create a storage pool using the mirrored_volumes pool definition. This installs volume templates that allow you to create mirrored volumes and volumes with similar characteristics in the pool. If you attempted to create a striped volume in the pool, the resulting volume is mirrored as well as striped. However, you are not constrained from creating volumes with other characteristics.
22 Understanding ISP Administration roles in ISP ■ When I create a volume, ISP uses space on the same disks unless I choose other disks from the storage pool manually. Why doesn’t ISP automatically spread the volumes across the other disks in the storage pool to enhance I/O performance? ISP is tuned to use as few disks as possible.
Understanding ISP Administration roles in ISP ■ What templates and user templates are available for use in creating volumes with the required capabilities. ■ What templates and user templates are associated with the disk groups in which you will create volumes. ■ How to use the VEA or the vxassist and vxvoladm commands to perform your tasks. As a system administrator, you can use either the VEA or the vxassist and vxvoladm utilities to perform your tasks.
24 Understanding ISP Administration roles in ISP The use of the vxassist or vxvoladm command to create application volumes is illustrated in Figure 1-3.
Understanding ISP Administration roles in ISP Advanced administration tasks Advanced administration tasks include administering storage pools and user templates, creating clone pools, and creating volumes with additionally specified rules. The system administrator’s role requires the following knowledge of ISP: ■ Knowledge of basic administration tasks. See “Basic administration tasks” on page 22.
26 Understanding ISP Administration roles in ISP Figure 1-5 illustrates that the vxpool command is used to create storage pools with associated policies, templates and capabilities. Figure 1-5 Creation of storage pools Templates and capabilities Required policies for storage pool vxpool Use the vxpool command to create a storage pool and to associate templates, capabilities and policies with it.
Understanding ISP Administration roles in ISP Expert administration tasks Expert administration tasks include creating new attributes to describe storage features, and designing and creating new templates and capabilities. The storage administrator’s role requires the following knowledge of ISP: ■ Knowledge of basic and advanced administration tasks. See “Basic administration tasks” on page 22. See “Advanced administration tasks” on page 25.
28 Understanding ISP Sample ISP deployments Advanced storage administration tasks are described in the following chapters: ■ “Administering volume templates and other configuration elements” on page 121 ■ “Using capabilities, templates and rules” on page 137 ■ “ISP language definition” on page 159 Sample ISP deployments This section contains high-level examples of how you can configure volume creation using ISP.
Understanding ISP Sample ISP deployments Figure 1-7 Effect of setting the value of the AutoGrow policy to pool Disk Group Policies: AutoGrow = pool Storage pool LUNs with snapshot capability Templates Application volumes LUNs outside the storage pool cannot be used If the AutoGrow policy level were to remain set to the default value of diskgroup, this would allow the ISP to aggregate LUNs from the disk group.
30 Understanding ISP Sample ISP deployments Figure 1-8 Effect of setting non-default storage pool policies Disk Group Policies: AutoGrow = diskgroup SelfSufficient = host Storage pool LUNs outside the storage pool can be used Templates Other templates in the disk group can be used Templates Templates outside the disk group can be used Templates Application volumes LUNs outside the disk group cannot be used Note: Setting the storage pool policies away from their default values may not be desirable
Understanding ISP Sample ISP deployments Arranging storage by volume usage The simplest way to arrange storage so that its use is restricted to certain applications is to divide it between storage pools as shown in Figure 1-9. This requires that each storage pool is configured in a separate disk group. Each storage pool can have its own set of policies and templates that are tailored to the requirements of the volumes that are created from its LUNs.
32 Understanding ISP Sample ISP deployments Arranging storage by attributes You can use storage attributes to control how ISP assigns storage to application volumes. For example, you can use confinement rules to restrict some volumes to a subset of LUNs which share common attributes, such as caching to enhance I/O performance, or hardware RAID to provide redundancy and/or enhance performance.
Understanding ISP About ISP concepts confinement rules to ensure that certain volumes are only configured from this storage, while the remaining storage is used for other volumes with less critical performance requirements. About ISP concepts Figure 1-11 illustrates the dependencies between the various ISP concepts.
34 Understanding ISP About ISP concepts These concepts are defined in the following sections (in order of increasing abstraction): ■ About disk groups ■ About LUNs ■ About attributes ■ About storage pools ■ About storage pool sets ■ About storage pool policies ■ About capabilities ■ About rules ■ About volume templates ■ About template sets ■ About user templates ■ About application volumes ■ About volume intent About disk groups A disk group is a named collection of disks that sh
Understanding ISP About ISP concepts About attributes A storage attribute allows the properties of a LUN to be defined in an arbitrary conceptual space.
36 Understanding ISP About ISP concepts About storage pools A storage pool is defined within a disk group in VxVM for use by ISP. A storage pool is a policy-based container for LUNs and volumes. This means that the templates, capabilities and policies that are associated with a storage pool define how storage is organized within the pool. Two types of storage pool are defined: data pools and clone pools.
Understanding ISP About ISP concepts A clone pool can be moved into another disk group, but an individual snapshot within it cannot. If you want to move a clone pool into a different disk group, you must ensure that the clone pool contains only those snapshots that you require. As an alternative, consider using linked break-off snapshots, as these can be created in a different disk group and storage pool from their parent volume.
38 Understanding ISP About ISP concepts The policy levels that are associated with a storage pool control how it manages its templates and LUNs: ■ The default level of the AutoGrow policy is diskgroup. This allows LUNs that are associated with the storage pool and its disk group to be used for allocating storage to volumes. ■ For storage pools that are created explicitly by using the vxpool command, the default level of the SelfSufficient policy is pool.
Understanding ISP About ISP concepts Figure 1-12 Scope levels for storage pool policies LUNs and templates in a disk group (level = diskgroup) LUNS and Templates In a storage pool (level = pool) Templates Default scope of AutoGrow policy for LUNs Default scope of SelfSufficient policy for templates Templates Templates All available templates (level = host) Note: LUNs in other storage pools or disk groups or outside any disk group are not immediately available for aggregating into another storage
40 Understanding ISP About ISP concepts About capabilities A capability is a feature that is provided by a volume. For example, a volume may exhibit capabilities such as performance and reliability to various degrees. Each type of capability is defined as a set of rules.
Understanding ISP About ISP concepts About reliability capabilities Reliability specifies the level of redundancy that is required from a volume as a capability. Very reliable volumes have a high degree of redundancy. For example, a very reliable volume could be configured as a software mirrored volume built upon underlying prefabricated RAID-5 capable LUNs that are configured in the enclosure hardware.
42 Understanding ISP About ISP concepts About storage layout rules Storage layout rules specify how storage is used to create volumes. The following are examples of storage layout rules: Rule Description log Specifies the type of log and its degree of redundancy. mirror Specifies how many mirrors a volume should have. parity Specifies whether redundancy is provided by using parity. stripe Specifies how many columns a volume should have. striped Specifies whether a volume is striped.
Understanding ISP About ISP concepts The following table shows some simple examples of templates and the capabilities that they might provide: Template Provides capabilities Adjustable parameters for the capability DataMirroring DataMirroring nmirs — number of mirrors (plexes) Raid5Volume Raid5Capability, ncols — minimum number of columns Raid5LogMirroring nlogs — number of log copies nmaxcols — maximum number of columns Striping Striping ncols — minimum number of columns nmaxcols — maximum numbe
44 Understanding ISP About ISP concepts The following table shows some examples of user templates that might be created: User template Description OracleTable Provides a reliable high-performance volume that is suitable for use by a database table. OracleIndex Provides an extremely high-performance volume that is suitable for a database index. As for templates, each user template can have a number of adjustable parameters that you can use for tuning the characteristics of the created volumes.
Understanding ISP Examples of using ISP from the command line Examples of using ISP from the command line This section provides examples of using ISP from the command line and provides pointers to where more information can be found. You can also find summaries of the usage of commonly used commands in “Command summary” on page 205. Further examples may be found in “Examples of using ISP” on page 209 and in the manual page for each command.
46 Understanding ISP Examples of using ISP from the command line See “Creating application volumes” on page 61. See “Creating instant snapshots” on page 101.
Understanding ISP Examples of using ISP from the command line Taking a full-sized snapshot of an application volume Having prepared an empty volume, you can take a snapshot of the application volume: # vxsnap -g mydg make source=stmrvol/snapvol=mysnpvol/syncing=on The following command starts a full synchronization of the snapshot volume, and blocks until this is complete: # vxsnap -g mydg syncwait mysnpvol See “Creating instant snapshots” on page 101.
48 Understanding ISP Examples of using ISP from the command line
Chapter 2 Storage pools Veritas Intelligent Storage Provisioning (ISP) allows you to group storage with similar characteristics for creating volumes. A storage pool is a named collection of volumes and the LUNs with which they are associated. The storage policies and rules that are associated with a storage pool determine its characteristics. Each storage pool represents a collection of volumes that are created according to these policies and rules.
50 Storage pools Organizing storage pools in a disk group Note: A disk that is to be reserved for ISP must not contain any existing VxVM subdisks. To remove the reservation flag from disks, select menu item 23 Turn off the allocator-reserved flag on a disk from the main menu of the vxdiskadm command.
Storage pools Organizing storage pools in a disk group For example, if you want your data volumes to be mirrored for redundancy, and your snapshot volumes to be striped for performance, you can choose a storage pool set definition where the data pool has associated templates that relate to mirroring, and the clone pool has associated templates that relate to striping. A suitable choice would be the mirrored_data_striped_clones storage pool set.
52 Storage pools Creating a storage pool Creating a storage pool As a alternative to the vxpool organize command, you can use the vxpool create command to define and create a storage pool, as shown here: # vxpool [-g diskgroup] create storage_pool [dm=dm1[,dm2...] \ [description="description"] \ [autogrow={1|pool}|{2|diskgroup}] \ [selfsufficient={1|pool}|{2|diskgroup}|{3|host}] \ [rules=rule [ rule ...
Storage pools Creating a storage pool Listing available storage pool definitions To list all the available storage pool definitions, use the following command: # vxpool listpooldefinition See “Storage pool” on page 191. See “Displaying storage pool definitions” on page 53. Displaying storage pool definitions To display the details of one or more storage pool definitions, use the following command: # vxpool printpooldefinition [storage_pool_definition] ...
54 Storage pools Using disk group split and join with storage pools Using disk group split and join with storage pools Storage pools form the smallest unit that can participate in disk group split and join operations (see the section “Reorganizing the Contents of Disk Groups” in the “Creating and Administering Disk Groups” chapter of the Veritas Volume Manager Administrator’s Guide for details).
Storage pools Adding disks to a storage pool Adding disks to a storage pool To add one or more initialized disks to the storage pool, use the following command: # vxpool [-g diskgroup] adddisk storage_pool \ dm=dm1[,dm2,...
56 Storage pools Associating template sets with a storage pool Note: If the value of the selfsufficient policy is diskgroup or host, ISP first looks for storage that complies with the templates that are associated with the storage pool, and if no suitable templates are found, it then examines templates outside the pool. See “Volume template” on page 182.
Storage pools Displaying information about storage pools Displaying information about storage pools To display information about one or more storage pools, use the following command: # vxpool [-g diskgroup] print storage_pool \ [storage_pool ...
58 Storage pools Listing storage pools within a disk group In the following example, the policies on the storage pool, mypool, are changed to disallow the use of storage resources from outside the storage pool, and to allow all available templates to be considered for use when creating volumes: # vxpool -g mydg setpolicy mypool autogrow=pool \ selfsufficient=host Listing storage pools within a disk group To display a list of all storage pools within a disk group, use the vxpool list command as shown here:
Storage pools Deleting a storage pool Deleting a storage pool To delete a storage pool, use the following command: # vxpool [-g diskgroup] [-r] delete storage_pool The -r option must be specified to dissociate all disks from the storage pool and then delete the storage pool as shown in this example: # vxpool -g mydg -r delete ReliablePool Note: If any volumes are present in the storage pool, you must delete these before the storage pool can be deleted.
60 Storage pools Deleting a storage pool
Chapter 3 Creating application volumes Volumes created by Veritas Intelligent Storage Provisioning (ISP) are similar to traditional non-ISP volumes that you create using the vxassist utility, but have the advantage that their intent is preserved and cannot accidentally be degraded. Volumes that are created by ISP can be managed by using commands such as vxassist or vxvoladm, or by using the VEA client graphical user interface. For information on using VEA to create volumes, refer to the VEA online help.
62 Creating application volumes Overview of the command line interface The keyword denotes the action that vxassist is to perform on the named volume. The storage specification defines the storage that can or cannot be used with an operation. This consists of a comma-separated list of disk media names and other storage attributes, such as Controller:controller_name to indicate all disks on a controller. Excluded storage is indicated by a ! prefix.
Creating application volumes Determining the maximum volume size hot-relocation or volume transformation taking place if disks with the same product ID are not available. For a single invocation of the vxassist command, you can override the default values of attributes that are defined in the /etc/default/allocator file, or that are built into vxassist, by specifying them as comma-separated arguments to the -o option.
64 Creating application volumes Creating volumes Creating volumes To create a volume with a specified length, specify the make keyword to vxassist as shown here: # vxassist [options] make volume length \ [storage_specification] [attribute=value ...] It is possible to specify a combination of capabilities, templates and rules to this command. Recall that: ■ A rule specifies a criterion for choosing and allocating storage. ■ A template is a meaningful collection of rules that define a capability.
Creating application volumes Creating volumes Creating volumes by using vxassist specification attributes In release 5.0 of VxVM, it is possible to use the vxassist command to create ISP volumes (for which intent is preserved) in addition to non-ISP volumes (for which intent has no meaning).
66 Creating application volumes Creating volumes Creating a striped volume The following command creates a 2-gigabyte striped volume with 10 columns: # vxassist -g mydg -P mypool make strpvol 2g layout=stripe \ ncols=10 Creating a mirrored-stripe volume with mirrors on separate controllers The following command creates a 2-gigabyte mirrored-stripe volume with 8 columns, and with the mirrors located on separate controllers: # vxassist -g mydg -P mypool make strpvol 2g \ layout=mirror-stripe ncols=8 mirror=
Creating application volumes Creating volumes Creating a mirrored volume with mirrors on separate enclosures The following command creates a 2-gigabyte mirrored volume with 2 mirrors, and with the mirrors located on separate enclosures: # vxassist -g mydg -P mypool make strpvol 2g \ capability=’DataMirroring,MirrorsOnSeparateComponents’ Such a volume tolerates the failure of one enclosure and provides greater reliability.
68 Creating application volumes Creating volumes Creating volumes by specifying capabilities and rules You can specify storage selection and layout rules in addition to capabilities when creating volumes. This allows you to select explicitly which storage can and cannot be used for certain volumes. For example, you might do this to ensure that volumes are created on storage with certain performance or reliability that is implemented in an array’s hardware.
Creating application volumes Creating volumes Creating volumes by specifying templates Volumes can be created by specifying templates instead of capabilities.
70 Creating application volumes Creating volumes The apply rule in the listing shows that the PrefabricatedRaid5 template depends on the ArrayProductId template.
Creating application volumes Creating volumes with associated tags Creating volumes with associated tags Volume tags are used to implement the Dynamical Storage Tiering (DST) feature of the Storage Foundation software. For more information about this feature, see the Veritas File System Administrator’s Guide.
72 Creating application volumes Creating multiple volumes as a volume group } volume "mirvol1" 10g { capability ’DataMirroring(nmirs=2)’ } volume "mirvol2" 10g { capability ’DataMirroring(nmirs=2)’ } volume "mirvol3" 10g { capability ’DataMirroring(nmirs=2)’ } }; This specifies three 10-gigabyte mirrored volumes in the disk group, mydg, with the data mirrors placed on separate enclosures, but excluding enclosure, ENC1.
Creating application volumes Creating a volume for use with snapshots and DRL } }; This creates three volumes named mirvol1, mirvol2 and mirvol3. If volumes with the same name prefix and numeric suffix already exist, the numbering of the new volumes continues from the highest number found plus 1.
74 Creating application volumes Creating a volume for use with snapshots and DRL
Chapter 4 Administering application volumes This chapter describes how to perform maintenance tasks on volumes that you have created using Veritas Intelligent Storage Provisioning (ISP). This includes resizing and changing the capabilities of volumes without taking them offline. The operations in this chapter use the vxassist and vxvoladm commands. For full details, see the vxassist(1M) and vxvoladm(1M) manual pages.
76 Administering application volumes Resizing volumes online Resizing volumes online Increasing or decreasing the size of a volume is an operation that can be performed while a volume is online. The following vxassist operations are available for resizing a volume: ■ growto — Increase volume size to a specified length. ■ growby — Increase volume size by a specified length. ■ shrinkto — Reduce volume size to a specified length. ■ shrinkby — Reduce volume size by a specified length.
Administering application volumes Resizing volumes online Determining the maximum size of a volume You can use the following command to determine by how much you can grow a volume using the available storage: # vxassist [-g diskgroup] maxgrow volume [attributes...] You can use storage specification attributes with this command to restrict the storage that is taken into consideration by the calculation.
78 Administering application volumes Resizing volumes online Reducing the size of a volume to a specified length The following command reduces the length of a volume: # vxassist [-g diskgroup] [-f] shrinkto volume length \ [attributes...] For example, the following command shrinks the volume vol1 to 5 gigabytes: # vxassist -g mydg shrinkto vol1 5g This operation fails if the new length specified is larger that the current size of the volume.
Administering application volumes Setting tags on volumes Setting tags on volumes Volume tags are used to implement the Dynamic Storage Tiering feature of the Storage Foundation software. For more information about this feature, see the Veritas File System Administrator’s Guide.
80 Administering application volumes Preparing a volume for DRL and snapshot operations Preparing a volume for DRL and snapshot operations To prepare an application volume for dirty region logging (DRL) and instant snapshot operations, a data change object (DCO) and DCO volume must be associated with the volume.
Administering application volumes Evacuating a volume Removing support for DRL and snapshots from a volume To remove support for DCO-based DRL and instant snapshots from a volume, use the following command to remove the DCO and DCO volume that are associated with the volume: # vxassist [-g diskgroup] [-P storage_pool] removeall log \ volume logtype=dco Note: This command fails if the volume is part of a snapshot hierarchy.
82 Administering application volumes Removing a volume The next example evacuates any disks in columns 0 or 1 that lie on controller c2: # vxassist -g mydg evacuate column vol01 column=0,1 \ evac_storage=’"Controller"="c1"’ This command specifies that both columns 0 and 1 are to be evacuated to disks on controller c2: # vxassist -g mydg evacuate column vol01 column=0,1 \ use_storage=’"Controller"="c2"’ In the final example, volume data is evacuated from subdisks that are connected to controller c1 to dis
Administering application volumes Transforming the capabilities of a volume online discussed in the following section. Subsequent sections describe how to add or remove mirrors, columns or logs to or from a volume, how to stop and reverse transformation and relayout operations, and how to verify that the intent of a volume has been preserved.
84 Administering application volumes Adding columns to a volume storage to be removed. For example, the following example removes the mirror on the disk mydg01, from the volume mirvol1: # vxassist -g mydg remove mirror mirvol1 \ remove_storage=’"DM"="mydg01"’ Note: If you use the vxassist command to remove mirrors, you must specify the -f (force) option to the command if the operation would violate any rules.
Administering application volumes Removing columns from a volume Removing columns from a volume To remove columns from a striped or RAID-5 volume, use the following command: # vxassist [-g diskgroup] [-b] [-f] remove column volume \ [ncols=number] [tmplen=length] The ncols attribute specifies the number of columns to remove. If specified, the -b option removes the columns in the background.
86 Administering application volumes Changing the stripe unit size of volumes Changing the stripe unit size of volumes To change the stripe unit size of a striped or RAID-5 volume, use the following command: # vxassist [-g diskgroup] [-b] setstwidth volume \ stripeunit=size [tmplen=length] [attributes...] If specified, the -b option changes the stripe width in the background.
Administering application volumes Removing logs from a volume You can use storage attributes to specify the storage to be used for the logs. For example, the following command adds a DCO plex to the volume, mirvol1, using disk enc1_7: # vxassist -g mydg -b addlog mirvol1 logtype=dco \ use_storage=’"DeviceName"="enc1_7"’ Removing logs from a volume To remove logs from a volume, use the following command: # vxassist [-g diskgroup] [-f] remove log volume \ [nlogs=number] logtype=type [attributes...
88 Administering application volumes Reversing volume transformations VxVM takes over control of I/O, and it begins to initialize the volume by synchronizing its plexes. To view the progress of this synchronization, you would use the vxtask monitor command. See the “Monitoring and Controlling Tasks” section in the “Administering Volumes” chapter of the Veritas Volume Manager Administrator’s Guide. See the vxtask(1M) manual page.
Administering application volumes Finding volumes that use specified capabilities or templates Finding volumes that use specified capabilities or templates To list the volumes that were created using certain capabilities or templates, use the following command: # vxassist [-g diskgroup] [-P storage_pool] list \ [capability=c1[,c2...]] [template=t1[,t2...
90 Administering application volumes Migrating non-ISP volumes to ISP volumes Note: New volumes that are created using the output from running the vxassist printrules command on an existing volume are allocated storage in exactly the same way as for that volume. If you use the output from the vxassist printintent command to create new volumes, the rule set is regenerated from the capabilities and templates.
Administering application volumes Migrating ISP volumes to non-ISP volumes migrated, their intent is preserved by ISP as for volumes that are created directly using the vxassist or vxvoladm commands. Rules specified on the command line are applied to all the specified volumes. Using a definitions file allows you to apply different rules to each volume. Volumes that are specified on the command line are also associated with the same storage pool.
92 Administering application volumes Migrating ISP volumes to non-ISP volumes # vxassist [-g diskgroup] reversemigrate volume ... Note: The volumes that are specified on the command line must not share any disks with any volumes that are not listed on the command ine.
Chapter 5 Administering instant snapshots Veritas Volume Manager (VxVM) provides the capability for taking an image of a volume at a given point in time. Such an image is referred to as a volume snapshot. Instant volume snapshots allow you to make backup copies of your volumes online with minimal interruption to users.
94 Administering instant snapshots Limitations of volume snapshots See “Creating instant snapshots” on page 101. For details of how to use volume snapshots to implement off-host online backup, see the Veritas Storage Foundation Intelligent Storage Provisioning Solutions Guide. For more information about instant volume snapshot features, see the chapter “Understanding Veritas Volume Manager” in the Veritas Volume Manager Administrator’s Guide.
Administering instant snapshots Preparing storage pools for full-sized instant snapshots Preparing storage pools for full-sized instant snapshots Assuming that you have already set up a data storage pool in a disk group, you can create one or more clone storage pools in the same disk group by using the same procedure. You may choose to use different types of disks or templates with a clone storage pool than you set up for the data storage pool.
96 Administering instant snapshots Creating a volume for use as a full-sized instant or linked break-off snapshot Creating a volume for use as a full-sized instant or linked break-off snapshot If you want to create a full-sized instant or linked break-off snapshot for an original volume, you can use an empty volume with the required capability, and with the same length and region size as the original volume.
Administering instant snapshots Creating a shared cache volume and preparing space-optimized snapshots Creating a shared cache volume and preparing space-optimized snapshots Note: If you intend to create space-optimized instant snapshots that share a cache volume, the region size that you specify for the volume must be greater than or equal to any region size that you specify for the cache volume.
98 Administering instant snapshots Creating a shared cache volume and preparing space-optimized snapshots must be a power of 2, and be greater than or equal to 16KB. A smaller value requires more disk space for the change maps, but the finer granularity provides faster resynchronization. The default region size is 64k (64KB).
Administering instant snapshots Creating a shared cache volume and preparing space-optimized snapshots . . }; !! Note: Because of its complexity, it is recommended that you run this command as a script.
100 Administering instant snapshots Creating a shared cache volume and preparing space-optimized snapshots Note: The vxcached daemon does not remove snapshots that are currently open, and it does not remove the last or only snapshot in the cache. If the cache space becomes exhausted, the snapshot is detached and marked as invalid. If this happens, the snapshot is unrecoverable and must be removed. Enabling the autogrow feature on the cache helps to avoid this situation occurring.
Administering instant snapshots Creating instant snapshots Removing a cache To remove a cache completely, including the cache object, its cache volume and all space-optimized snapshots that use the cache 1 Run the following command to find out the names of the top-level snapshot volumes that are configured on the cache object: # vxprint -g diskgroup -vne \ "v_plex.pl_subdisk.sd_dm_name ~ /cache_object/" where cache_object is the name of the cache object.
102 Administering instant snapshots Creating instant snapshots A plex in a full-sized instant snapshot requires as much space as the original volume. If you instead make a space-optimized instant snapshot of a volume, this only requires enough storage to record the original contents of the parent volume as they are changed during the life of the snapshot. The recommended approach to performing volume backup from the command line, or from a script, is to use the vxsnap command.
Administering instant snapshots Creating instant snapshots Preparing to create instant and break-off snapshots To prepare a volume for the creation of instant and break-off snapshots 1 Use the following commands to see if the volume is associated with a version 20 data change object (DCO) and DCO volume that allow instant snapshots and Persistent FastResync to be used with the volume, and to check that FastResync is enabled on the volume: # vxprint -g volumedg -F%instant volume # vxprint -g volumedg -F%fa
104 Administering instant snapshots Creating instant snapshots Note: If you intend to split the clone pool that contains snapshots into separate disk groups (for example, to perform off-host processing), the clone pool must only contain fully synchronized full-sized instant snapshots (which do not require a cache volume). You cannot split off a clone pool that contains either a cache volume or space-optimized instant snapshots.
Administering instant snapshots Creating instant snapshots To create and manage a space-optimized instant snapshot 1 To create a space-optimized instant snapshot, snapvol, use the following forms of the vxsnap make command: # vxsnap [-g diskgroup] make source=vol/snapvol=snapvol For example, to create the space-optimized instant snapshot of the volume, myvol, in the disk group, mydg, and the prepared snapshot, snap3myvol, enter the following command: # vxsnap -g mydg make source=myvol/snapvol=snap3myvol
106 Administering instant snapshots Creating instant snapshots Creating and managing full-sized instant snapshots Full-sized instant snapshots are not suitable for write-intensive volumes (such as for database redo logs) because the copy-on-write mechanism may degrade the performance of the volume. If you intend to split the volume and snapshot into separate disk groups (for example, to perform off-host processing), you must use a fully synchronized linked break-off snapshot.
Administering instant snapshots Creating instant snapshots If you want to turn a snapshot into an independent volume, you must wait for its contents to be synchronized with those of its parent volume.
108 Administering instant snapshots Creating instant snapshots ■ If the snapshot is part of a snapshot hierarchy, you can also choose to split this hierarchy from its parent volumes. See “Splitting an instant snapshot hierarchy” on page 115.
Administering instant snapshots Creating instant snapshots 2 To create a linked break-off snapshot, use the following form of the vxsnap make command. # vxsnap [-g diskgroup] make source=volume/snapvol=snapvol\ [/snapdg=snapdiskgroup] The snapdg attribute must be used to specify the snapshot volume’s disk group if this is different from that of the data volume.
110 Administering instant snapshots Creating instant snapshots Creating multiple instant snapshots Note: In these examples, all snapshot volumes and any cache volumes must be prepared in advance. See “Creating a volume for use as a full-sized instant or linked break-off snapshot” on page 96. See “Creating a shared cache volume and preparing space-optimized snapshots” on page 97.
Administering instant snapshots Creating instant snapshots Adding a snapshot to a cascaded snapshot hierarchy To create a snapshot and push it onto a snapshot hierarchy between the original volume and an existing snapshot volume, specify the name of the existing snapshot volume as the value of the infrontof attribute to the vxsnap make command.
112 Administering instant snapshots Creating instant snapshots Attaching plexes of an instant snapshot Note: Although this operation is named reattach, the plexes of an ISP snapshot volume could never have belonged to the parent volume. For this reason, the description below refers to the attachment, rather than the reattachment, of snapshot plexes. This operation is not supported for space-optimized instant snapshots. See “Reattaching a linked break-off snapshot volume” on page 112.
Administering instant snapshots Creating instant snapshots To reattach a linked break-off snapshot volume, use the following form of the vxsnap reattach command: # vxsnap [-g snapdiskgroup] reattach snapvolume|snapvolume_set \ source=volume|volume_set [sourcedg=diskgroup] The sourcedg attribute must be used to specify the data volume’s disk group if this is different from the snapshot volume’s disk group, snapdiskgroup. Note: The snapshot being reattached must not be open to any application.
114 Administering instant snapshots Creating instant snapshots Note: For this operation to succeed, the volume that is being restored and the snapshot volume must not be open to any application. For example, any file systems that are configured on either volume must first be unmounted. It is not possible to restore a volume from an unrelated volume. The destroy and nmirror attributes are not supported for space-optimized instant snapshots.
Administering instant snapshots Creating instant snapshots Note: When applied to a volume set or to a component volume of a volume set, this operation can result in inconsistencies in the snapshot hierarchy in the case of a system crash or hardware failure. If the operation is applied to a volume set, the -f (force) option must be specified.
116 Administering instant snapshots Creating instant snapshots Displaying instant snapshot information The vxsnap print command may be used to display information about the snapshots that are associated with a volume. # vxsnap [-g diskgroup] print [vol] This command shows the percentage progress of the synchronization of a snapshot or volume. If no volume is specified, information about the snapshots for all the volumes in a disk group is displayed.
Administering instant snapshots Creating instant snapshots The following output is an example of using this command on the disk group dg1: # vxsnap -g dg -vx list NAME vol svol1 svol2 svol3 svol21 vol-02 mvol vset1 v1 v2 svset1 sv1 sv2 vol-03 mvol2 DG dg1 dg2 dg1 dg2 dg1 dg1 dg2 dg1 dg1 dg1 dg1 dg1 dg1 dg1 dg2 OBJTYPE vol vol vol vol vol plex vol vset compvol compvol vset compvol compvol plex vol SNAPTYPE fullinst mirbrk volbrk spaceopt snapmir mirvol mirbrk mirbrk mirbrk detmir detvol PARENT vol vol v
118 Administering instant snapshots Creating instant snapshots Controlling instant snapshot synchronization Note: Synchronization of the contents of a snapshot with its original volume is not possible for space-optimized instant snapshots. The commands in this section cannot be used to control the synchronization of linked break-off snapshots. By default, synchronization is enabled for the vxsnap refresh and restore operation on instant snapshots.
Administering instant snapshots Creating instant snapshots Improving the performance of snapshot synchronization Two optional arguments to the -o option are provided to help optimize the performance of synchronization when using the make, refresh, restore and syncstart operations: iosize=size Specifies the size of each I/O request that is used when synchronizing the regions of a volume.
120 Administering instant snapshots Creating instant snapshots
Chapter 6 Administering volume templates and other configuration elements The Veritas Intelligent Storage Provisioning (ISP) feature creates volumes with a set of rules or capabilities. A volume template (or template for short) is a collection of rules that provide capabilities. ISP refers to templates when creating a volume, and selects an appropriate set of templates to use based on the requested capabilities. ISP follows certain rules when selecting templates to match a requested set of capabilities.
122 Administering volume templates and other configuration elements Installing configuration elements in storage pools and disk groups To install additional elements that are defined in a file, use the following command: # vxtemplate -C -d element_defs_file install You can select only to install selected elements from a file by naming them explicitly as shown here: # vxtemplate -r -C -d my_templates install template=Reliability The -r (recursive) option ensures that all capabilities and templates that ar
Administering volume templates and other configuration elements Listing and printing configuration elements Listing and printing configuration elements Use the following command to list the templates and capabilities that are associated with a specified disk group and/or storage pool. # vxtemplate [-g diskgroup] [-P pool] list This command displays results similar to the following.
124 Administering volume templates and other configuration elements Deactivating and reactivating templates Here the types ts, pd and ps indicate template set, storage pool and storage pool set definitions respectively. To print the details of elements in the Configuration Database, use this command: # vxtemplate -C print [template=t1[,t2...]] \ [capability=c1[,c2...]] [template_set=ts1[,ts2...]] \ [storage_pool_set=ps1[,ps2...]] \ [pool_definition=pd1[,pd2...
Administering volume templates and other configuration elements Renaming a template Renaming a template To change the name of a template, use the following command: # vxtemplate [-C | -g diskgroup] renametemplate \ oldname newname For example, you may want to change the name if you have modified a template for a particular disk group.
126 Administering volume templates and other configuration elements Listing template dependencies Figure 6-13 Example template dependencies T0 T1 T2 T3 T4 The following command examples show the output that would be returned for this hierarchy: # vxtemplate T0 # vxtemplate T0 T1 T2 # vxtemplate T0 T1 T2 T3 # vxtemplate T2 T3 T4 # vxtemplate T0 T1 T2 T3 T4 -g mydg -w listtemplate T0 -g mydg -w listtemplate T2 -g mydg -w listtemplate T3 -g mydg -r listtemplate T1 -g mydg -w -r listtemplate T2 Not
Administering volume templates and other configuration elements Listing capability dependencies Listing capability dependencies Capability definitions can extend or apply other capability definitions. To list the capabilities that depend on one or more given capabilities, use the following command: # vxtemplate [-C | -g diskgroup] -w listcapability \ capability1 [capability2 ...
128 Administering volume templates and other configuration elements Listing template sets C3 # vxtemplate -g mydg -w -r listcapability C1 C0 C1 C2 C3 Note: A capability is always shown as depending on itself as it is required to make itself “whole.
Administering volume templates and other configuration elements Listing templates included by template sets Listing templates included by template sets To list the templates that are included in certain template sets in the ISP Configuration Database, use the following command: # vxtemplate -C listtemplate [template_set=ts1[,ts2...
130 Administering volume templates and other configuration elements Listing templates included by storage pool definitions Listing templates included by storage pool definitions To list the templates that are included in certain storage pool definitions in the ISP Configuration Database, use the following command: # vxtemplate -C listtemplate [pooldefn=pd1[,pd2...
Chapter 7 Creating and modifying user templates When using Veritas Intelligent Storage Provisioning (ISP) to create an application volume with a specified set of capabilities, you can usually enter values for the parameters that modify these capabilities. For example, you can select the degree of redundancy, fault tolerance, or performance that you require from the volume. For convenience in creating volumes, you can set up user templates to store commonly used sets of capabilities and parameter values.
132 Creating and modifying user templates Format of user templates rule2 ... } }; This definition has the following important components: usertmplt_name Defines the name of the user template, for example, MyReliableReplication, and MySWSnapshot. description Describes a user 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.
Creating 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 } rul
134 Creating and modifying user templates Using a user template to create an application volume This command adds the user template to the global usertemplates file that is maintained by ISP.
Creating and modifying user templates Listing currently defined user templates Listing currently defined user templates Use the following command to list all the user templates that are currently defined in the global usertemplates file: # vxusertemplate list Printing user template definitions Use the following command to print detailed information about one or more user templates that are currently defined in the global usertemplates file: # vxusertemplate print usertemplate1 [usertemplate2 ...
136 Creating and modifying user templates Deleting user templates
Chapter 8 Using capabilities, templates and rules Veritas Intelligent Storage Provisioning (ISP) provides a structured and flexible rule-based declarative language for expressing how an application volume with a given set of characteristics is to be configured from the available storage. The language can be used to specify rules for allocating storage to the individual parts of a volume, such as mirrors, columns, logs and snapshots, as well as to an entire volume.
138 Using capabilities, templates and rules Capabilities Capabilities A capability, as expressed in the ISP language, is a description of what a volume is capable of doing. Each template is associated with one or more capabilities so that ISP can choose those templates that are suitable for use in allocating storage to volumes. A capability is interpreted by ISP as a tag. The format of a typical capability definition is shown here: capability cap_name { extends capname1,capname2, ...
Using capabilities, templates and rules Capabilities var Defines a variable that may be specified as a parameter and its value to a capability. A template can use the variables in its rules section to provide the requested capability. Permitted variable types are int or string. defaultvalue Defines the default value of a capability’s parameter if no value is specified. See “Capabilities” on page 138.
140 Using capabilities, templates and rules Volume templates extends DataMirroring, Striping }; DataMirrorStripe also inherits the variables nmirs and ncols from the two capabilities that it extends. 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.
Using capabilities, templates and rules Volume templates capabilities. See “requires” on page 143. 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. 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.
142 Using capabilities, templates and rules Volume templates ■ Can use variables of all the capabilities that BaseTemplate provides. 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.
Using capabilities, templates and rules Volume templates provides A template provides one or more capabilities as defined by its rules, or by requiring capabilities. See “requires” on page 143. Any variables that are defined for the capability can be used by the template’s rules.
144 Using capabilities, templates and rules Rules 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.
Using capabilities, templates and rules Storage selection rules mirror 2 { desired 10 confineto "enclosure" desired 15 stripe 15 } Storage selection rules The following sections describe storage selection rules: ■ affinity ■ confineto ■ exclude ■ multipath ■ select ■ separateby ■ strong separateby You can limit the scope of interpretation of rules to the components of an application volume, such as its plexes, columns and logs. See “Compound rules” on page 154.
146 Using capabilities, templates and rules Storage selection rules affinity An affinity rule expresses attraction between VxVM objects. Objects that conform to this rule share as many attribute values as possible. Note: The affinity rule does not take any rule operators.
Using capabilities, templates and rules Storage selection rules ■ Use only EMC LUNs that have their Room attribute set to the value Room1: confineto eachof("VendorName"="EMC", "Room"="Room1") ■ Use only storage with VendorName set to the value of the variable VENDOR_NAME, and with Room set to the value of the variable ROOM_NAME: confineto eachof("VendorName"=VENDOR_NAME, "Room"=ROOM_NAME) Note: VENDOR_NAME and ROOM_NAME are variables that are defined in a capability.
148 Using capabilities, templates and rules Storage selection rules ■ Allocate storage from LUNs in Room1 and Room2: confineto allof("Room"="Room1", "Room"="Room2") Note: In the absence of a specified operator, the eachof operator is assumed.
Using capabilities, templates and rules Storage selection rules multipath A multipath rule specifies how tolerant a VxVM object is to the failure of a number of specified components. The rule defines how many paths a VxVM object should have available through each component. Note: The multipath rule does not take any rule operators.
150 Using capabilities, templates and rules Storage selection rules ■ Use the specified LUNs from an enclosure: select "DeviceName"="Enclr1_1","DeviceName"="Enclr1_2" separateby A separateby rule is used to describe separation between VxVM objects. This is typically used to define failure domains to provide greater reliability by avoiding a single point of failure. For example, a separateby rule can be used to define that the mirrors of a volume should not share a controller.
Using capabilities, templates and rules Storage selection rule operators Storage selection rule operators The following table lists the operators that are provided for combining the confineto, exclude and select storage selection rules: Operator Description allof Select available storage that matches the union of all the operands. anyof Select available storage that matches any of the operands in the order that they are listed. The first match is chosen.
152 Using capabilities, templates and rules Storage layout rules The following examples demonstrate the application of the apply rule: ■ Apply the rules but not the capabilities from the template ArrayProductId to a compound rule within the template PrefabricatedDataMirroring: volume_template PrefabricatedDataMirroring { provides PrefabricatedDataMirroring rules { apply ArrayProductId confineto eachof ( "Redundancy" =nmirs , "Parity" ="0" } }; ) volume_template ArrayProductId { provides ArrayProductId r
Using capabilities, templates and rules Storage layout rules parity The parity rule defines whether redundancy should be parity based (that is, RAID-5) as implemented in either hardware or software. The value can be true or false.
154 Using capabilities, templates and rules Compound rules Compound rules Whether a rule applies to a volume, mirror, column or log depends on the scope in which the rule is applied. Compound rules are composed of several other rules, and are used to specify the scope of rules at a level below that of an entire volume. A compound rule can apply to one or more mirrors, columns or logs of a volume. It can also define how redundancy and separation are to be implemented for a volume.
Using capabilities, templates and rules Compound rules ■ Use confineto rules to force one mirror to be created on each of four separate enclosures: mirror 1 { confineto } mirror 1 { confineto } mirror 1 { confineto } mirror 1 { confineto } "Enclosure"="enclr1" "Enclosure"="enclr2" "Enclosure"="enclr3" "Enclosure"="enclr4" mirror_group The mirror_group rule groups together different mirrors of a volume.
156 Using capabilities, templates and rules Compound rules stripe The stripe rule describes one or more columns of a volume. All basic rules and some restricted form-related or mirror-related rules can be specified within a stripe rule. ISP merges multiple stripe rules to form a single stripe rule whose rules are the union of the separate stripe rules.
Using capabilities, templates and rules Attribute aliases ■ Create a mirrored new-style DCO log, with each plex configured on a separate controller.
158 Using capabilities, templates and rules Simplified syntax for rules on the command line Simplified syntax for rules on the command line For convenience, rules may be expressed in the following simplified form on the command line for the vxassist and vxvoladm commands: rule_name=attribute_name[=value][,...
Appendix A ISP language definition You can define the following objects using the Veritas Intelligent Storage Provisioning (ISP) specification language: ■ Capability ■ Volume template ■ User template ■ Storage pool ■ Template set ■ Storage pool set ■ Volume group Note the following points with regard to the syntax of the language: ■ Each object category, such as capability, template, user template and storage pool and capability has its own name space.
160 ISP language definition Syntax conventions Syntax conventions The following typographic conventions are used in the syntax description: Typeface Usage Examples monospace (bold) Indicates a keyword. capability monospace (italic) Indicates an irreducible term such as an identifier, and its type. A value is expected if only a type is specified. c_name:string monospace Indicates a reducible term. capability_list Symbol Usage Examples [] Indicates an optional syntax component.
ISP language definition Reserved keywords Reserved keywords The following keywords are reserved. They may not be used as identifiers for names of capabilities, templates and so on.
162 ISP language definition Capability [ variable_list ] } ] ; See “Rules” on page 144.
ISP language definition Volume template Volume template volume_template vt_name:string { [ provides string_list ] [ requires string_list ] [ inherits string_list ] [ extends string_list ] [ description quoted_string ] [ descriptionid msgcat_id:quoted_string, msg_id:int ] [ rules [ { template_rules } ] ] } ; See “Volume templates” on page 140.
164 ISP language definition Volume template [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ } ] } ] ] desired [ desired [ desired [ desired [ desired [ desired [ [ desired [ desired [ desired [ desired [ desired [ desired ] | pref_order ] pref_order ] pref_order ] pref_order ] pref_order ] pref_order ] [ pref_order [ pref_order [ pref_order [ pref_order [ pref_order [ pref_order ] ] ] ] ] ] ] ] ] ] ] ] separateby string_list ] strong separateby string_list ] affinity string_list ] multipath multipath_expr ] strip
ISP language definition Volume template [ [ [ [ [ [ [ } ] } ] ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] | desired desired desired desired desired desired desired [ [ [ [ [ [ [ pref_order pref_order pref_order pref_order pref_order pref_order pref_order ] ] ] ] ] ] ] ] ] ] ] ] ] ] confineto confineto_expr ] exclude exclude_expr ] select select_expr ] separateby string_list ] strong separateby string_list ] affinity string_list ] multipath multipath_expr ] desired [ pref_order ] ] mirror_group mg_name:st
166 ISP language definition Volume template [ [ desired [ pref_order ] ] strong separateby string_list ] } } ] [ [ [ [ [ [ [ [ [ } ] [ [ desired [ pref_order ] ] affinity string_list ] } ] ] ] ] ] | desired [ pref_order ] ] stripe all [ { [ desired [ pref_order ] ] confineto confineto_expr ] [ desired [ pref_order ] ] exclude exclude_expr ] [ desired [ pref_order ] ] select select_expr ] [ desired [ pref_order ] ] separateby string_list ] [ desired [ pref_order ] ] strong separateby string_list ] [ desir
ISP language definition Volume template [ [ desired [ pref_order ] ] affinity string_list ] [ [ desired [ pref_order ] ] multipath multipath_expr ] } ] ] [ [ desired [ pref_order ] ] stripe all [ { [ [ desired [ pref_order ] ] confineto confineto_expr ] [ [ desired [ pref_order ] ] exclude exclude_expr ] [ [ desired [ pref_order ] ] select select_expr ] [ [ desired [ pref_order ] ] separateby string_list ] [ [ desired [ pref_order ] ] strong separateby string_list ] [ [ desired [ pref_order ] ] affinity st
168 ISP language definition Volume template pref_order int
ISP language definition User template User template user_template ut_name:string [ { [ description quoted_string ] [ descriptionid descriptionid ] [ capability capabilities_expr ] [ rules [ { [ rules ] } ] ] } ] ; See “Format of user templates” on page 131.
170 ISP language definition Storage pool Storage pool storage_pool sp_name:string [ { [ volume_templates vt_name_list ] [ description quoted_string ] [ descriptionid descriptionid ] [ autogrow boolean ] [ selfsufficient boolean ] } ] ;
ISP language definition Template set Template set template_set sp_name:string [ { [ volume_templates vt_name_list ] [ description quoted_string ] [ descriptionid descriptionid ] } ] ; Storage pool set storage_pool_set sp_name:string [ { [ storage_pools st_pool_list ] [ description quoted_string ] [ descriptionid descriptionid ] } ] ; st_pool_list sp_name:string | st_pool_list, st_pool_list Volume group vg_rules [ vg_rule ] | vg_rules vg_rule vg_rule [[ [[ [[ [[ [[ [[ [[ desired desired desired desired
172 ISP language definition Volume group exclude_expr name:quoted_string operator value:quoted_string | allof(exclude_expr) | eachof(exclude_expr) | exclude_expr, exclude_expr select_expr quoted_string | name:quoted_string operator value:quoted_string | eachof(select_expr) | allof(select_expr) | noneof(select_expr) | anyof(select_expr) | oneof(select_expr) | select_expr, select_expr multipath_expr from:int [ - to: int ] name:quoted_string | from:int [ - to: int ] name:string | multipath_expr, multipath_e
Appendix B Changing the allocation behavior of ISP The behavior that ISP exhibits when allocating storage can be controlled by setting the value of the allocation_priority_order attribute. For example, this attribute determines if growing the storage pool is preferred to dropping the desired rules when there is insufficient storage to create a volume.
174 Changing the allocation behavior of ISP Value Precedence order 1 S
Changing the allocation behavior of ISP For example, the default behavior of ISP (equivalent to setting allocation_policy_order=7), A < S < T < D, means: T < D First, drop desired rules in preference to using a different template combination. S < T Secondly, use a different template combination in preference to adding more templates to the storage pool. A < S Finally, add more templates to the storage pool in preference to growing the storage pool.
176 Changing the allocation behavior of ISP
Appendix C ISP configuration elements This appendix lists and describes the following types of pre-defined elements that are available for use with Veritas Intelligent Storage Provisioning (ISP): ■ Template set ■ Volume template ■ Capability ■ Storage pool ■ Storage pool set These elements are defined in the configuration_database.txt file in the /etc/vx/alloc directory. Before modifying this file, make a backup copy so that you can reverse any changes that you make.
178 ISP configuration elements Template set Template set ConfineVolume Ensures that a volume is confined to specified storage. Provides capabilities: ConfineToSimilarStorage, ConfineToSpecificStorage. Uses templates: ConfineToSimilarStorage, ConfineToSpecificStorage. DataMirroring Ensures that a volume has multiple copies of its data.
ISP configuration elements Template set Uses templates: ArrayProductId, ConfineLogsToSimilarStorage, ConfineMirrorsToSimilarStorage, DataMirroring, DCOLogMirroring, DCOLogStriping, InstantSnapshottable, LogsOnSeparateComponents, MirrorsOnSeparateComponents, PrefabricatedStriping. DataMirrorStripe Ensures that I/O from and to a volume is spread across multiple columns within mirrors.
180 ISP configuration elements Template set Uses templates: ConfineLogsToSimilarStorage, DCOLogMirroring, DCOLogStriping, InstantSnapshottable, LogsOnSeparateComponents. MultipathingThroughMirroring Ensures that a volume can withstand the failure of a number of paths. The I/O from and to a volume can potentially be spread across all the paths. Provides capability: DataMirroring, Multipathing. Uses template: MultipathingThroughMirroring.
ISP configuration elements Template set Provides capabilities: ArrayProductId, ColumnsOnSeparateComponents, ConfineColumnsToSimilarStorage, ConfineLogsToSimilarStorage, LogsOnSeparateComponents, Raid5Capability, Raid5LogMirroring, Raid5LogStriping. Uses templates: ArrayProductId, ColumnsOnSeparateComponents, ConfineColumnsToSimilarStorage, ConfineLogsToSimilarStorage, LogsOnSeparateComponents, Raid5LogStriping, Raid5Volume. Striping Ensures that I/O from and to a volume is spread across multiple columns.
182 ISP configuration elements Volume template Volume template ArrayProductId Provides capability: ArrayProductId. ColumnsOnSeparateComponents Provides capability: ColumnsOnSeparateComponents. ConcatVolumes Provides capability: ConcatVolumes. ConfineColumnsToSimilarStorage Provides capability: ConfineColumnsToSimilarStorage. ConfineLogsToSimilarStorage Provides capability: ConfineLogsToSimilarStorage. ConfineMirrorsToSimilarStorage Provides capability: ConfineMirrorsToSimilarStorage.
ISP configuration elements Volume template DataMirrorStripe Provides capability: DataMirrorStripe. Variables: ncols Minimum number of columns. nmaxcols Maximum number of columns. nmirs Number of mirrors. DataStripeMirror Provides capability: DataStripeMirror. Variables: ncols Minimum number of columns. nmaxcols Maximum number of columns. nmirs Number of mirrors. DCOLogMirroring Provides capability: DCOLogMirroring. DCOLogStriping Provides capability: DCOLogStriping.
184 ISP configuration elements Volume template MultipathingThroughMultiplePaths Provides capability: MultipathingThroughMultiplePaths. PrefabricatedDataMirroring Provides capability: PrefabricatedDataMirroring. PrefabricatedRaid5 Provides capability: PrefabricatedRaid5. PrefabricatedStriping Provides capability: PrefabricatedStriping. Raid5LogStriping Provides capability: Raid5LogStriping. Raid5Volume Provides capabilities: Raid5Capability, Raid5LogMirroring.
ISP configuration elements Capability Capability ArrayProductId A volume uses storage of the same type (productid). Provided by volume template: ArrayProductId. ColumnsOnSeparateComponents The columns of a volume are separated at the specified component level, such as "Controller" or "Enclosure". Provided by volume template: ColumnsOnSeparateComponents. Variable: component Name of component (default is "Controller"). ConcatVolumes The volume is concatenated. Provided by volume template: ConcatVolumes.
186 ISP configuration elements Capability ConfineToSimilarStorage A volume uses only storage that has the same value for a specified attribute. Provided by volume template: ConfineToSimilarStorage. Variable: name Name of storage attribute (default is VendorName). ConfineToSpecificStorage A volume uses only storage that has the specified value for a specified attribute name. Provided by volume template: ConfineToSpecificStorage. Variables: name Name of storage attribute (no default).
ISP configuration elements Capability DataStripeMirror A striped-mirror volume distributes I/O across multiple columns, where each column has multiple copies of data. This capability extends the DataMirroring and Striping capabilities. Provided by volume template: DataStripeMirror. Variables: ncols Minimum number of columns (default is 8). nmaxcols Maximum number of columns (default is 20). nmirs Number of mirrors (default is 2).
188 ISP configuration elements Capability LogsOnSeparateComponents The logs of a volume are separated at the specified component level, such as "Controller" or "Enclosure". Provided by volume template: LogsOnSeparateComponents. Variable: Name of component (default is "Enclosure"). component MirrorsOnSeparateComponents The mirrors of a volume are separated at the specified component level, such as "Controller" or "Enclosure". Provided by volume template: MirrorsOnSeparateComponents.
ISP configuration elements Capability PrefabricatedRaid5 A volume uses prefabricated RAID-5 disks that are exported by an array. This capability extends the PrefabricatedDataRedundancy capability. Provided by volume template: PrefabricatedRaid5. PrefabricatedStriping A volume uses prefabricated striped disks that are exported by an array. Provided by volume template: PrefabricatedStriping. Raid5Capability A RAID-5 volume uses parity to implement data redundancy.
190 ISP configuration elements Capability Striping A striped volume distributes I/O across multiple columns. Provided by volume template: Striping. Variables: ncols Minimum number of columns (default is 8). nmaxcols Maximum number of columns (default is 20).
ISP configuration elements Storage pool Storage pool any_volume_type Supports volumes using any template from the configuration database. Default policies: autogrow=diskgroup selfsufficient=host Associates volume templates: none. mirror_stripe_volumes Supports distribution of I/O from and to volumes across multiple columns within mirrors.
192 ISP configuration elements Storage pool mirrored_prefab_striped_volumes Supports use by volumes of multiple copies of data configured on prefabricated striped disks that are exported by an array.
ISP configuration elements Storage pool prefab_raid5_volumes Supports use by volumes of prefabricated RAID-5 disks that are exported by an array. Default policies: autogrow=diskgroup selfsufficient=host Associates volume templates: ArrayProductId, ConfineToSimilarStorage, ConfineToSpecificStorage, DCOLogStriping, ExcludeSpecificStorage, InstantSnapshottable, MultipathingThroughMultiplePaths, PrefabricatedRaid5.
194 ISP configuration elements Storage pool ConfineLogsToSimilarStorage, ConfineMirrorsToSimilarStorage, ConfineToSimilarStorage, ConfineToSpecificStorage, DataStripeMirror, DCOLogMirroring, DCOLogStriping, ExcludeSpecificStorage, InstantSnapshottable, LogsOnSeparateComponents, MirrorsOnSeparateComponents, MultipathingThroughMultiplePaths.
ISP configuration elements Storage pool set Storage pool set mirrored_data_striped_clones Supports data volumes with multiple copies of data, and snapshot volumes with I/O distributed across multiple columns. Data storage pool type: mirrored_volumes. Clone storage pool type: striped_volumes. mirrored_prefab_raid5_data_mirrored_clones Supports data volumes with multiple copies of data created from RAID-5 storage, and snapshot volumes with multiple copies of data.
196 ISP configuration elements Storage pool set striped_prefab_mirrored_data_striped_clones Supports I/O from and to data volumes distributed across multiple columns constructed from mirrored storage, and snapshot volumes with I/O distributed across multiple columns. Data storage pool type: striped_prefab_mirrored_volumes. Clone storage pool type: striped_volumes.
Appendix D Volume group definition syntax This appendix describes the syntax of a volumegroup definition that may be used as input to the vxassist and vxvoladm commands. Volume groups are generally used to create several volumes at the same time within a storage pool and are given equal weighting by Veritas Intelligent Storage Provisioning (ISP) when allocating storage resources.
198 Volume group definition syntax [raid5_stripeunit width] [raid5loglen length] [regionsize size] [rules { volume-rules } ] [spare yes|no|only] [stripe_stripeunit width] [tag "volume_tag"] [tasktag "tag"] [type data|snapshot|cachevolume] [user "user"] [user_template "ut1"[,"ut2"...]] [usetype "volume-usage-type"] [volume_template "vt1"[,"vt2"...]] [vxvmtaskid taskid] } [volume "name" length { ...
Volume group definition syntax excl on|off|true|false|yes|no Whether a volume in a clustershareable disk group can be opened by only one node at a time. fmr on|off|true|false|yes|no Whether FastResync is enabled on a volume. fstype type Specifies the file system type for a volume. group "group" The group ownership of a volume. init active|none|zero The type of initialization to perform on a volume.
200 Volume group definition syntax raid5_stripeunit width The stripe unit width for a RAID-5 column. raid5loglen length The size of a RAID-5 log whose creation is implied by the specified capabilities or templates. regionsize size The size of each region that is tracked by a bit in the maps within a version 20 DCO volume. The value of size must be a power of 2 and be greater than or equal to 16k (16KB). The default value is 64k (64KB).
Appendix E Equivalences between vxassist attributes and ISP rules The following table shows the equivalent ISP rules for attributes in vxassist that specify volume configuration. vxassist attribute ISP rules Description layout=mirror-stripe mirror nmir { stripe max_ncolumnmin_ncolumn } Mirrored-stripe volume. layout=stripe-mirror stripe max_ncolumnmin_ncolumn { mirror nmir } Striped-mirror volume. layout=mirror,stripe mirror nmir stripe max_ncolumnmin_ncolumn Mirrored-stripe volume.
202 Equivalences between vxassist attributes and ISP rules vxassist attribute ISP rules Description layout=mirror-concat mirror nmir Mirrored volume. layout=concat-mirror mirror nmir Concatenated-mirror volume. layout=log log nlog { type dco } DCO volume. layout=raid5log log nlog { type raid5 } RAID-5 log volume layout=regionlog log nlog { type drl } DRL log plex. mirror=2 mirror 2 Number of mirrors. mirror=enclosure mirror nmir { separateby "enclosure" } Mirror across enclosures.
Equivalences between vxassist attributes and ISP rules vxassist attribute ISP rules Description nraid5stripe=10 stripe 10 parity true log 1 { type raid5 } RAID-5 volume with 10 columns. nregionlog=2 log 2 { type drl } Two DRL log plexes. Nstripe=10 stripe 10 10 stripes. wantalloc=enclosure desired confineto "enclosure" Preferred storage allocation is confined to one enclosure.
204 Equivalences between vxassist attributes and ISP rules
Appendix F Command summary This appendix summarizes the usage and purpose of important commands for the Veritas Intelligent Storage Provisioning (ISP) feature of Veritas Volume Manager (VxVM). References are included to longer descriptions in the remainder of this book. For detailed information about an individual command, refer to the appropriate manual page in the 1M section. See “Examples of using ISP” on page 209.
206 Command summary Table F-1 Creating and administering storage pools Command Description vxpool [-g diskgroup] \ assoctemplateset\ storage_pool \ ts1[,ts2,...] Associates one or more template sets with a storage pool. See “Associating template sets with a storage pool” on page 56. vxpool [-g diskgroup] \ distemplate storage_pool \ t1[,t2,...] Dissociates one or more templates from a storage pool. See “Dissociating templates from a storage pool” on page 56.
Command summary Table F-2 Creating and administering application volumes Command Description vxassist [-g diskgroup] [-b] \ maxsize [storage_specification] \ [attribute=value ...] Determines the maximum volume size. See “Determining the maximum volume size” on page 63. vxassist [-g diskgroup] \ [-P storage_pool] [-b] \ make volume length \ [storage_specification] \ [attribute=value ...] Creates a volume. See “Creating volumes” on page 64.
208 Command summary Table F-2 Creating and administering application volumes Command Description vxassist [-g diskgroup] \ {shrinkby | shrinkto}\ volume length \ [storage_specification]\ [attribute=value ...] Shrinks a volume. See “Reducing the size of a volume to a specified length” on page 78. See “Reducing the size of a volume by a specified amount” on page 78. vxassist [-g diskgroup] \ evacuate disk volume length \ !dm:dmname ... Evacuates a volume from one or more specified disks.
Appendix G Examples of using ISP This appendix lists examples of using the vxassist and other commands to administer the Veritas Intelligent Storage Provisioning (ISP) feature. ■ Creating volumes ■ Resizing a volume ■ Adding or removing mirrors ■ Adding or removing columns ■ Adding or removing logs ■ Evacuating data from a volume ■ Segregating database components See “Examples of using ISP from the command line” on page 45. See the vaxassist(1M) manual page.
210 Examples of using ISP Creating volumes Create a 2-way mirrored volume that is enabled for the creation of instant snapshots: # vxassist -g exdg -P expool make vol1 10g \ capability='DataMirroring(nmirs=2), InstantSnapshottable' Create a volume using only disks from enclosure e1: # vxassist -g exdg -P expool vol1 10g \ rules='confineto "Enclosure"="e1"' or alternatively: # vxassist -g exdg -P expool make vol1 10g \ capability='ConfineToSpecificStorage(name="Enclosure",\ value="e1")' Create a volume u
Examples of using ISP Resizing a volume Resizing a volume Note: The following examples show how to resize volumes that do not contain file systems (volume type gen). If an application is using the volume to store data, use the appropriate utility to reduce the size of the data object before reducing the size of the volume, or to increase the size of the data object after increasing the size of the volume.
212 Examples of using ISP Adding or removing columns Adding or removing columns Add a column to a volume, and grow the volume while doing this: # vaxassist -g exdg add column vol1 layout=grow Add 4 columns to a volume, and grow the volume while doing this: # vaxassist -g exdg add column vol1 ncols=4 layout=grow Add a column, but do not grow the volume: # vaxassist -g exdg add column vol1 layout=nogrow Remove a column, and shrink the volume while doing this: # vaxassist -g exdg remove column vol1 layout=
Examples of using ISP Segregating database components Segregating database components To achieve best performance, it is usual to place the components of a database, such as the redo log, table spaces and indexes, on different disks. This can be accomplished by using the disk tagging feature, which allows you to define new characteristics and then assign these to your disks.
214 Examples of using ISP Segregating database components
Appendix H Configuring ISP to work with SAL The SAN Access Layer (SAL) provides information about storage, hosts, and connectivity between hosts, and storage, HBAs, volumes and file systems. You can configure ISP to understand and consume information that is provided by SAL. The storage attributes provided by SAL can then be used with ISP rules. This appendix describes how to configure ISP and the SAN Access Layer (SAL) so that they can work together.
216 Configuring ISP to work with SAL Configuring root as a SAL user the account under which the VEA service is running, usually root. Use the vxsalcmd command to add this user account with SAL administrator privileges, and set an appropriate password for it. To allow ISP to have transparent access to SAL, also use the vxsalcmd command to store the password on the local machine in encrypted form. See “Configuring root as a SAL user” on page 216. .
Configuring ISP to work with SAL Configuring root as a SAL user 4 Use the following command to create the local SAL account file: # vxsalcmd private.cosmos.com:2802 -f /tmp/maintain_user To confirm that the password has been set up correctly, enter the following command: # vxsalcmd private.cosmos.com:2802 user list This command should now list all the configured users without prompting for the SAL administrator’s password.
218 Configuring ISP to work with SAL Configuring root as a SAL user
Index Symbols /etc/default/allocator file 62, 173 /etc/default/allocator_readme file 62 /etc/default/vxassist file 215 /etc/default/vxassist_sal_info file 215 /etc/vx/alloc/configuration_database.
220 Index snapvol 109 source 109 storage 35 syncing 102 autogrow attributes tuning for space-optimized snapshot cache 99 autogrow feature 99 AutoGrow policy 37 autogrowby attribute 99 B behavior changing for ISP 173 benefits summarized for ISP 19 C cache daemon 99 cache volumes example of creating 47 caches changing size of 100 deleting 101 finding out snapshots configured on 101 preparing for space-optimized snapshots 97 removing 101 stopping 101 tuning autogrow attributes for 99 cachevolume field 198 c
Index configuration elements 121 installing into ISP Configuration Database 121 installing into storage pools and disk groups 122 listing 123 printing 123 provided in database 177 ConfineColumnsToSimilarStorage capability 185 ConfineColumnsToSimilarStorage volume template 182 ConfineLogsToSimilarStorage capability 185 ConfineLogsToSimilarStorage volume template 182 ConfineMirrorsToSimilarStorage capability 185 ConfineMirrorsToSimilarStorage volume template 182 confineto rule 68, 146 ConfineToSimilarStorage
222 Index highwatermark attribute 99 host level policy 37 intent displaying rules for volumes 89 preservation 82 purpose of application volume 44 verifying for volumes 89 iodelay field 199 iosize field 199 ISP 121 administration roles 22 benefits over non-ISP 16 changing behavior of 173 concepts 33 configuring to work with SAL 215 examples of command-line usage 45 frequently asked questions 20 high-level examples of using 28 language definition 159 limitations 20 ISP tasks 87 I L fstype field 199 fulli
Index mirror_stripe_volumes storage pool 191 mirrored volume example of creating on separate enclosures 65, 67, 68 mirrored volumes example of creating 65, 66 mirrored_data_striped_clones storage pool set 195 mirrored_prefab_raid5_data_mirrored_clones storage pool set 195 mirrored_prefab_raid5_volumes storage pool 191 mirrored_prefab_stripe_data_striped_clones storage pool set 195 mirrored_prefab_striped_volumes storage pool 192 mirrored_volumes storage pool 192 mirrored-stripe volumes example of creating
224 Index raid5loglen field 200 Raid5LogMirroring capability 67, 189 Raid5LogStriping capability 189 Raid5LogStriping volume template 184 Raid5Templates template set 180 Raid5Volume volume template 184 regionsize attribute 103 regionsize field 200 relayout 82 reliability capabilities 41 requires keyword 143 rules collected to form templates 42 compound 154 default_rules 62 displaying for volumes 89 equivalent vxassist atttributes 201 for storage layout 151 for storage selection 145 format of 144 in ISP 41
Index using vxassist 16, 17 storage attributes 35 storage caches example of creating 47 storage layout rules 42, 151 storage pool definitions displaying definitions 53 listing available 53 storage pool sets bundled definitions 37 displaying definition of 51 finding 58 listing available 51 mirrored_data_striped_clones 195 mirrored_prefab_raid5_data_mirrored_clones 195 mirrored_prefab_stripe_data_striped_clones 1 95 prefab_mirrored_data_prefab_striped_clones 195 stripe_mirrored_data_striped_clones 195 stripe
226 Index improving performance of 119 syncing attribute 102 T tag attribute 71 tag field 200 tags creating volumes with 71 removing from volumes 79 renaming 79 setting on volumes 79 tasks controlling 87 monitoring 87 tasktag field 200 template rules syntax of 163 template sets associating with storage pools 56 collections of capabilities and templates 43 ConfineVolume 178 DataMirroring 178 DataMirroringPrefabricatedRaid5 178 DataMirroringPrefabricatedStriping 178 DataMirrorStripe 179 DataStripeMirror 179
Index usetype field 200 V V-61-49872-28 69 volbrk snapshot type 117 volume field 198 volume groups syntax of 171, 197 used to create multiple volumes 71 volume sets support for snapshot operations with 101 volume template sets syntax of 171 volume templates ArrayProductId 182 associating with storage pools 55 collections of rules 42 ColumnsOnSeparateComponents 182 ConcatVolumes 182 ConfineColumnsToSimilarStorage 182 ConfineLogsToSimilarStorage 182 ConfineMirrorsToSimilarStorage 182 ConfineToSimilarStorage
228 Index implementing capabilities 89 in ISP 44 increasing size of 77 intent 44 migrating from ISP 91 migrating from non-ISP 90 moving data 81 preparing for use with snapshots and DRL 80 reducing size of 78 removing 82 removing a data change object from 81 removing a DCO from 81 removing columns from 85, 87 removing linked break-off snapshots from 110 removing mirrors from 83 resizing 76 using templates 89 verifying intent of 89 vxassist adding a DCO to a volume 80 adding columns to volumes 84 adding logs
Index listing storage pools within disk groups 58 organizing storage pools 50 removing disks from storage pools 55 renaming storage pools 58 setting up data and clone pools 95 used to associate templates with storage pools 55 vxprint displaying snapshots configured on a cache 101 verifying if a disk is reserved for ISP 50 verifying if volumes are prepared for instant snapshots 103 vxrelayout reversing relayout operations 88 vxsnap adding a snapshot to a snapshot hierarchy 111 attaching plexes to snapshots
230 Index