< Previous | Next > | |
Product: Storage Foundation Guides | |
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide |
Creating VolumesTo create a volume with a specified length, specify the make keyword to vxvoladm as shown here: # vxvoladm [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:
The properties of the volume that is created are further determined by any parameters and other attributes that you specify. Rules, capabilities and templates may be combined as follows:
Note Refer to Using Capabilities, Templates and Rules for more information. Finally, you can create volumes by specifying user templates that you have set up with the required redundancy, fault tolerance, or performance capabilities for the applications that you run at your site. See Creating and Modifying User Templates for more information. Creating Volumes by Specifying CapabilitiesA capability is a high-level description of a volume, for example, DataMirroring, Striping or PrefabricatedRaid5. ISP automatically selects a suitable template from those that provide the desired capability. As such, this is the most abstract way of creating volumes using vxvoladm as it requires the least specification by you. You can customize a capability by specifying values for any variable parameters that it defines. For a list of predefined capabilities that are supported, see Capabilities. The following sections provide some examples of creating volumes with these capabilities. Creating a Mirrored VolumeThe following command creates a 1-gigabyte volume with the default number of 2 mirrors: # vxvoladm -g mydg make mir2vol 1g capability='DataMirroring' \ init=active The init=active attribute makes the volume immediately available for use without attempting to synchronize its empty plexes. The following command creates a 1-gigabyte volume with 3 mirrors: # vxvoladm -g mydg make mir3vol 1g \ capability='DataMirroring(nmirs=3)' init=active Creating a Mirrored Volume with Mirrors on Separate EnclosuresThe following command creates a 2-gigabyte mirrored volume with 2 mirrors, and with the mirrors located on separate enclosures: # vxvoladm -g mydg make strpvol 2g capability='DataMirroring,\ MirrorsOnSeparateComponents' Such a volume tolerates the failure of one enclosure and provides greater reliability. Such a capability can be combined with multipathing to provide resilience against the failure of one of the paths to an enclosure: # vxvoladm -g mydg make strpvol 2g capability='DataMirroring,\ MirrorsOnSeparateComponents,MultipathingThroughMultiplePaths' Creating a Striped VolumeThe following command creates a 2-gigabyte striped volume with 10 columns: # vxvoladm -g mydg make strpvol 2g capability='Striping(ncols=10)' Creating a Mirrored-Stripe Volume with Mirrors on Separate ControllersThe following command creates a 2-gigabyte mirrored-stripe volume with 8 columns, and with the mirrors located on separate controllers: # vxvoladm -g mydg make strpvol 2g \ capability='DataMirrorStripe(ncols=8),\ MirrorsOnSeparateComponents(component="Controller")' Creating a Striped-Mirror Volume from Prefabricated MirrorsThe following command creates a 10-gigabyte striped-mirror volume with 8 columns, and which uses prefabricated mirrors that are exported by an array to form each column: # vxvoladm -g mydg make strpvol 2g capability='Striping(ncols=8),\ PrefabricatedDataMirroring' Creating a RAID-5 Volume with a RAID-5 LogThe following command creates a 2-gigabyte RAID-5 volume with 8 data columns and a RAID-5 log that has 2 redundant copies: # vxvoladm -g mydg make r5vol 2g \ capability='Raid5Capability(ncols=8),Raid5LogMirroring(nlogs=2)' Creating Volumes by Specifying Capabilities and RulesYou 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. Refer to Rules for details of the different types of rule and their usage. Creating a RAID-5 Volume on Prefabricated StorageThe following command creates a 10-gigabyte volume on a prefabricated RAID-5 disk that is exported from an array made by a specified vendor: # vxvoladm -g mydg make perfr5vol 10g \ capability='PrefabricatedRaid5' \ rules='confineto "VendorName"="ACME"' Creating a Mirrored Volume on Enclosures in Separate LocationsThe following command creates a mirrored volume that tolerates the failure of a single enclosure, where each enclosure is in a different room. This avoids single point of failure and ensures greater reliability. # vxvoladm -g mydg make mirvol 10g capability='DataMirroring' \ rules='separateby "Room","Enclosure"' Note In this example, it is assumed that values for the user-defined attribute Room have been assigned to each enclosure. Creating a Striped Volume Excluding Certain DisksThe following command creates a striped volume on storage other than that in Room1 and certain disks in enclosure, Enc1: # vxvoladm -g mydg make strvol 1g capability='Striping(ncols=4)' \ rules='exclude allof("Room"="Room1","DeviceName"="Enc1_1",\ "DeviceName"="Enc1_2")' Creating Volumes by Specifying TemplatesVolumes can be created by specifying templates instead of capabilities. The following example demonstrates how to create a mirrored volume using a template: # vxvoladm -g mydg 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 following ways:
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=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 for more information about these fields. For example, the following command fails because of a template dependency: # vxvoladm -g mydg make myvol 1g volume_template=PrefabricatedRaid5 VxVM vxvoladm 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 command is then run to examine the definition of the PrefabricatedRaid5 volume template: # vxtemplate -g mydg print template=PrefabricatedRaid5 volume_template PrefabricatedRaid5 { provides PrefabricatedRaid5 rules { apply ArrayProductId confineto "Parity" ="1" } }; The apply rule in the listing shows that the PrefabricatedRaid5 template depends on the ArrayProductId template. If the ArrayProductId template does not depend on any other templates, the vxvoladm make command should be modified to list ArrayProductId in addition to PrefabricatedRaid5: # vxvoladm -g mydg make myvol 1g \ volume_template=PrefabricatedRaid5,ArrayProductId Creating Volumes by Specifying Templates and RulesThe following command creates a striped volume using a template, and specifies a rule to ensure that storage is allocated only from a single enclosure in a specified location: # vxvoladm -g mydg make strvol 1g \ volume_template='Striping' \ rules='confineto eachof("Enclosure","Room"="Room2")' Note If you use a volume template to create a volume, and do not specify any capabilities, the values of all the variables that are used in the volume template are taken from the default values defined in the capability. An error is returned if such a variable does not have a default value. Creating Volumes by Specifying Templates and CapabilitiesIf you specify templates in addition to capabilities when creating a volume, this restricts ISP to choosing from the specified templates. The following example shows how to specify both capabilities and templates: # vxvoladm [-g diskgroup] make volume length \ capability='capability[,capability...]' \ volume_template=template[,template...] If you specify rules in addition to capabilities and templates, these rules are applied after ISP has selected the templates that satisfy the required capabilities. Creating Volumes by Specifying User TemplatesOnce you have set them up, user templates provide the simplest way of creating volumes for use with the applications that you run. For example, you can configure user templates that ensure that volumes that you create to store database tables all share the same reliability and performance capabilities, and that they are allocated from a restricted set of storage. The following example shows how you might use a user template to create a volume for a database table: # vxvoladm -g dbdg make Customers 15g user_template=DBTable |
^ Return to Top | < Previous | Next > |
Product: Storage Foundation Guides | |
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide | |
VERITAS Software Corporation
www.veritas.com |