Previous  |  Next  >  
Product: Volume Manager Manual Pages for Storage Foundation   
Manual: Maintenance Commands (1m)   

vxvoladm

NAME

vxvoladm - create and administer application volumes on allocated storage

SYNOPSIS


vxvoladm [options] [-b] add
{column|log|mirror} volume
[storage-spec ...] [attribute ...]

vxvoladm [options] [-b] evacuate
{column|disk|log|mirror|subdisk|volume}
volume [storage_spec ...] [attribute ...]

vxvoladm [options] [-b] growby volume
length_change
[storage_spec ...] [attribute ...]

vxvoladm [options] -M growby
vxvoladm [options] [-b] growlogby volume
length_change
[storage_spec ...] [attribute ...]

vxvoladm [options] [-b] growlogto volume
length_change
[storage_spec ...] [attribute ...]

vxvoladm [options] [-b] growto volume
new_length
[storage_spec ...] [attribute ...]

vxvoladm [options] -M growto
vxvoladm help [options | keywords | attributes]
vxvoladm [options] listattrs [lun_name1 [lun_name2 ...]]
vxvoladm [options] [-b] make volume length
[storage_spec ...] [attribute ...]

vxvoladm [options] -M make
vxvoladm [options] maxgrow volume
[storage_spec ...]

vxvoladm [options] maxsize [attribute ...]
vxvoladm [options] [-b] [-g diskgroup] [-p storage_pool] [-I rules] migrate volume ...
vxvoladm [options] -M migrate
vxvoladm [options] printintent [object_names ...]
vxvoladm [options] [-b] remove column
volume
[storage-spec ...] [attribute ...]

vxvoladm [options] remove {log|mirror|volume}
volume [storage-spec ...] [attribute ...]

vxvoladm [options] removeall log volume
[storage_spec ...] [attribute ...]

vxvoladm [options] [-b] setstwidth volume
[attribute ...]

vxvoladm [options] shrinkby volume
length_change
[attribute ...]

vxvoladm [options] -M shrinkby
vxvoladm [options] shrinkto volume
new_length
[attribute ...]

vxvoladm [options] -M shrinkto
vxvoladm [options] [-b] transform volume
[storage_spec ...] [attribute ...]

vxvoladm [options] transformreverse volume
vxvoladm [options] verify

DESCRIPTION

The vxvoladm utility provides a command line interface to the VERITAS Intelligent Storage Provisioning (ISP) feature of VERITAS Volume Manager (VxVM) that provides rule-based allocation of storage for the creation and administration of application volumes.

The operations that can be performed by vxvoladm are selected by specifying the appropriate keyword on the command line. See the KEYWORDS section for a description of the available operations.

Most operations can be applied to a single disk group only. If a disk group is not specified by using the -g option, and an alternate default disk group is not defined by specifying the diskgroup attribute on the command line or in a defaults file (usually /etc/default/allocator), the default disk group is determined using the rules given in the vxdg(1M) manual page.

Many vxvoladm operations take attributes that specify how volumes should be laid out, which storage can and cannot be used, and so on. Attributes are of two basic types: storage specifications and attribute settings.

You can specify storage specification attributes in the same way as for the vxassist command by naming individual disks (for example, disk01), or by grouping disks that are selected by target, tray, controller or enclosure (for example, !ctrl:c1 specifies that no disks on controller c1 can be used). In addition, vxvoladm allows you to specify rule-based expressions that determine how storage can be allocated. See the STORAGE SPECIFICATION section for details.

Other attributes are specified in the form attribute_name=value. See the ATTRIBUTES section for a list of supported attributes.

KEYWORDS

add column|log|mirror

Adds columns, logs or mirrors to a volume. Unless the number is specified, one column, log or mirror is added.

The addition of columns supports the specification of the following attributes: layout=grow, ncols, stripe_stripeunit, tmplen and use_storage.

The addition of logs supports the specification of the following attributes: drl, loglen (for the first log of this type that is being added), lognames, logtype, nlogs, regionsize, and use_storage. The logtype attribute must be specified.

The addition of mirrors supports the specification of the following attributes: nmirror, plexnames and use_storage.

These operations support the specification of the following options: -b, -d defaultfile, -g diskgroup, -n, -p storage_pool and -t tasktag. In addition, the add log and add mirror operations support the specification of the -f option.

evacuate

Relocates columns, disks, logs, subdisks, or mirrors that belong to the named volume, or moves an entire volume.

For disks, excluded storage may specified using the ! prefix.

The names of column, log, mirror and subdisk names may be specified by the attributes columnnames, lognames, plexnames and sd respectively.

This operation also support the use of the attributes evac_storage and use_storage to specify storage that is to be evacuated and populated respectively.

This operation supports the specification of the following options: -b, -d defaultfile, -g diskgroup, -n, -p storage_pool and -t tasktag.

growby | growto

Increases the length of the named volume to (growto) or by (growby) the specified length in VERITAS Volume Manager standard units (see vxintro(1M)) or a percentage (for example, 110%).


Note   Note    When you grow a volume, it is recommended that you also grow any file system that is configured on that volume (see vxresize(1M)). vxvoladm does not resize file systems (or other uses of the volume, such as databases) that reside on the volume. If necessary, use the appropriate application command to adjust the layout of data in the volume after the grow operation has finished.

Note   Note    Growing a volume requires that it is enabled.

The growto operation fails if the new length is smaller than the current volume length. The length of the volume is increased by extending existing subdisks in the volume, or by adding and associating new subdisks. Plexes that are not already fully populated (that is, that are sparse) are left unchanged. Log-only plexes are also left unchanged.

When a volume is grown, the volume may be converted from one layout to another as a side effect. For example, a volume that has the mirror-stripe layout may be converted to stripe-mirror when it is grown. This kind of conversion is done if vxvoladm determines that the new volume is too large for the original layout.

These operations can be applied to single volumes, or to multiple volumes if the -M option is specified.

These operations support the specification of the following attributes: layout=contig, layout=span, spare, use_storage.

These operations support the specification of the following options: -b, -d defaultfile, -f, -g diskgroup, -M, -n, -p storage_pool and -t tasktag.

growlogby | growlogto

Increases the length of DCO volume associated with the named volume to (growlogto) or by (growlogby) the specified length in VERITAS Volume Manager standard units (see vxintro(1M)) or as a percentage (for example, 110%).

The growlogto operation fails if the new length is smaller than the current DCO volume length.

The logtype=dco attribute must be specified.

These operations support the specification of the following options: -b, -d defaultfile, -f, -g diskgroup, -n, -p storage_pool and -t tasktag.

help

Displays information on vxvoladm usage, keywords, options and attributes.

listattrs

Lists the attributes of the logical units (LUNs) in the specified disk group and/or storage pool.

If LUN names are specified, only the attributes of those LUNs are displayed.

If the -a option is specified, the attributes of all LUNs that are attached to the host are displayed.

Otherwise, an error is returned if a disk group is not specified and no default disk group is defined (see the vxdg(1M) manual page).

make

Creates a volume with a specified name and length. The units of the volume length may be specified in VERITAS Volume Manager standard units (see vxintro(1M)).

This operation can be used to create multiple volumes if the -M option is specified. This allows the allocation of storage to be balanced among the volumes that are created in the same operation. See the section OPERATIONS ON MULTIPLE VOLUMES for details.

This operation supports the specification of the following attributes: capability, comment, dcologlen, drl, excl, fmr, fstype, group, init, layout, max_ncolumn, max_nraid5column, min_ncolumn, min_nraid5column, mode, raid5loglen, raid5_stripeunit, regionsize, rules, spare, stripe_stripeunit, use_storage, user, user_template, usetype, volume_template and vxvmtaskid.

This operation supports the specification of the following options: -b, -d defaultfile, -g diskgroup, -M, -n, -o iosize, -o iodelay, -p storage_pool and -t tasktag.

maxgrow

Reports the maximum size to which a volume can be grown given the specified attribute constraints and available storage. This operation supports the specification of the following options: -b, -d defaultfile, -f, -g diskgroup, -n, -p storage_pool and -t tasktag.

maxsize

Reports the maximum size of volume that can be created given the specified attribute constraints and available storage.

This operation supports the specification of the following attributes: capability, drl, fstype, layout, loglen, max_ncolumn, min_ncolumn, max_nraid5column. min_nraid5column, raid5_stripeunit, rules, spare, stripe_stripeunit, use_storage, user_template and volume_template.

This operation supports the specification of the following options: -b, -d defaultfile, -g diskgroup, -n, -p storage_pool and -t tasktag.

migrate

Makes volumes previously created using vxassist manageable by ISP. After migration, vxvoladm must be used instead of vxassist to administer the volumes. The volumes to be migrated from a disk group may be specified on the command line, or in a definitions file that is read from the standard input if the -M option is specified. See the section OPERATIONS ON MULTIPLE VOLUMES for details of the syntax of this file.

ISP assigns the default intent, "allocate plexes, logs and columns on separate disks" to the volumes that are being migrated. You can specify additional rules using the -I option on the command line, or by entries in the definitions file. However, you cannot include mirror, stripe or log rules. Rules specified on the command line are applied to all the specified volumes. The use of a definitions file allows different rules to be applied to each volume.

Volumes specified on the command line are also associated with the same storage pool. If a storage pool is not specified using the -p option, the volumes are placed in the data storage pool of the disk group. The use of a definitions file allows the migrated volumes to be placed in different storage pools.


Note   Note    Volumes to be migrated must be compatible with the Cross-platform Data Sharing (CDS) feature and have an alignment value of 8k. All volumes in a VVR replicated volume group (RVG) must be migrated together. All volumes that share a set of disks must be migrated in a single operation. Disks cannot be shared with any volumes that are not listed on the command line or in a definitions file. Volumes cannot share disks unless these disks are to be located in the same storage pool. Volumes with a usage type of root, such as those on a root disk that is under VxVM control, cannot be migrated. The disk group containing the volumes to be migrated must have a version number of 120 or greater (see vxdg(1M)).

This operation supports the specification of the following options: -b, -d defaultfile, -g diskgroup, -I, -M -n, -p storage_pool and -t tasktag.

printintent

Prints the rules that are associated with the specified objects. The types of object that can be specified are disk group, storage pool, volume and plex. If no object names are specified, the disk group is assumed as the default object. This information may also be obtained by using the vxprint -m command. The only supported option is -g diskgroup.

remove column|log|mirror|volume

Deletes columns, logs, or mirrors from a volume, or deletes an entire volume. Unless the number is specified, one column, log or mirror is removed.

The removal of columns supports the specification of the following attributes: layout=shrink, ncols, stipeunit and tmplen.

The removal of logs supports the specification of the following attributes: logtype (mandatory), lognames, nlogs, remaininglog and remove_storage.

The removal of mirrors supports the specification of the following attributes: nmirror, plexnames, remainingmirror and remove_storage.


Note   Note    When deleting a mirror or a log, storage that is not to be removed is specified using the ! prefix. Storage that is to be removed is specified without this prefix.

This operation supports the specification of the following options: -b, -d defaultfile, -f, -g diskgroup, -n, -p storage_pool and -t tasktag.

removeall log

Deletes all logs of the type specified by the logtype attribute from a volume.

setstwidth

Sets the stripe unit width for a striped or RAID-5 volume. in VERITAS Volume Manager standard units (see vxintro(1M)). The tmplen attribute may be used in conjunction with this operation.

shrinkby | shrinkto

Reduces the length of the named volume to (shrinkto) or by (shrinkby) the specified length in VERITAS Volume Manager standard units (see vxintro(1M)) or a percentage (for example, 110%).

Caution: Data can be lost or corrupted if file systems or other organized data residing on a volume are not shrunk before shrinking the volume. vxvoladm does not resize file systems (or other uses of the volume, such as databases) that reside on the volume. You can use the vxresize command to shrink file systems on the volume (see vxresize(1M)). Otherwise, use the appropriate application command to adjust the layout of data in the volume before initiating the shrink operation. You must specify the -f option to forcibly shrink volumes of usage type fsgen or raid5.


Note   Note    Shrinking a volume requires that it is enabled.

The shrinkto operation fails if the new length is greater than the current volume length.

When a volume is shrunk, the volume may be converted from one layout to another as a side effect. For example, a volume that has the stripe-mirror layout may be converted to mirror-stripe when it is shrunk. This kind of conversion is done if vxvoladm determines that the new volume is too small for the original layout.

This operation can be applied to single volumes, or to multiple volumes if the -M option is specified.

This operation supports the specification of the following attributes: layout=contig, layout=nocontig, spare, use_storage.

This operation supports the specification of the following options: -b, -d defaultfile, -f, -g diskgroup, -M, -n, -p storage_pool and -t tasktag.

transform

Changes the capabilities of the existing volume online without changing the size of the volume. This operation supports all the attributes and options that are supported by the make operation.


Note   Note    The online transformation of an ISP volume is not necessarily complete if the vxtask command shows that synchronization of the volume has finished. A small additional time is required to perform cleanup operations.

transformreverse

Converts a volume that is undergoing a transformation back to its original state.


Note   Note    If volume is undergoing a transformation, the vxtask list command shows that a synchronization task is being performed on the top-level volume.

verify

Checks the intent of volumes that have been created by vxvoladm for conformance to template rules, user-specified rules, volume group rules and storage pools rules. Error messages are displayed if the intent has been violated.

This operation supports the specification of the following options: -a, -d defaultfile, -g diskgroup, -n, -p storage_pool and -t tasktag. If the -a option is specified, the intent of all ISP application volumes in all disk groups is verified. Otherwise, the -g diskgroup option can be used to verify the intent of all application volumes in the specified disk group.

OPTIONS

-a

When used with the listattrs keyword, lists the attributes of all LUNs that are attached to the host.

When used with the verify keyword, verifies the intent of volumes in all disk groups.

-b

Puts operations that can take a long time into the background.

-d defaultfile

Specifies a file that contains default attribute values for volume creation and space allocation. If not specified, vxvoladm reads the standard defaults file, /etc/default/allocator if this exists.

-f

Forces operations not usually allowed by vxvoladm. This is necessary for the following operations:

      • To resize a volume of type fsgen or raid5.
      • To grow a volume or a log where to do so would violate rules.
      • To remove mirrors, columns or logs that would violate rules. For example, the rules may imply that a volume must have minimum number of mirrors of a particular kind.
      • To remove a DCO while DRL is enabled on it.
      • For the add log, add mirror, growby, growto, growlogby, growlogto and maxgrow operations, the -f option allows rules to be ignored that would otherwise be obeyed. The intent of the volume is preserved, but the rules that have been overridden are marked. To remove a rule from a volume's intent permanently, use the transform operation.

        -g diskgroup

        Specifies the disk group for the operation, either by disk group ID or by disk group name. If this option is not specified, and an alternate default disk group is not defined by specifying the diskgroup attribute on the command line or in a defaults file (usually /etc/default/allocator), the default disk group is determined using the rules given in the vxdg(1M) manual page.

        -I rules

        Specifies additional rules to the migrate operation. mirror, stripe and log rules cannot be included.

        -M

        Performs the operation on multiple volumes. See the section OPERATIONS ON MULTIPLE VOLUMES for details.

        -n

        Do not read the system defaults file.

        -o useopt[,useopt...]

        Passes in option values to the operation.

        attribute_name=value

        Any attribute that is defined in the /etc/default/allocator file can be overridden by specifying it and its value as arguments to the -o option. See the ATTRIBUTES section for a list of the attributes that can be defined.

        iosize=size

        Performs copy and recovery operations in regions with the length specified by size, which can be specified in VERITAS Volume Manager standard units (see vxintro(1M)). Specifying a larger number typically causes the operation to complete sooner, but with greater impact on other processes using the volume. The default I/O size is 1 megabyte.

        iodelay[=milliseconds]

        Reduces the system performance impact of copy operations. Copy and plex consistency recovery operations are usually a set of short operations on small regions of the volume (normally from 16 kilobytes to 128 kilobytes). This option inserts a delay between the recovery of each such region. A specific delay can be specified as a number of milliseconds, or a default is chosen (normally 250 milliseconds).

        -p storage_pool

        Specifies the name of the storage pool to which an operation is applied. If a disk group contains only a data storage pool, this option is not required. If a disk group contains a data storage pool and one or more clone storage pools, it may be necessary to specify this option.

        -t tasktag

        If any tasks that are registered to track the progress of an operation, mark them with the tag tasktag. This option is passed to utilities called by vxvoladm, so any child tasks are also tagged with the same task tag.

ATTRIBUTES

Attribute values are specified with arguments of the form attribute_name=value. Default attribute values can be stored in the file /etc/default/allocator, and may be overridden for a particular invocation of the command by specifying them as arguments to the -o option. The /etc/default/allocator_readme file contains a pristine copy of the /etc/default/allocator file as it is shipped and installed.

allocation_policy_order={1|2|3|4|5|6|7|8|9|10|11|12}

Specifies the order of priority in which ISP takes action to allocate space. 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. The numeric argument to allocation_policy_order determines the behavior of ISP as follows:

1

S < T < A < D

2

S < T < D < A

3

S < A < T < D

4

S < D < T < A

5

S < A < D < T

6

S < D < A < T

7

A < S < T < D (default behavior)

8

D < S < T < A

9

A < S < D < T

10

D < S < A < T

11

A < D < S < T

12

D < A < S < T

Here A stands for "autogrow," D for "desired rules," S for "self-sufficient," and T for "template combinations." The < operator indicates the precedence, so that "X < Y" means that Y is chosen in preference to X, and the rightmost items in the list are chosen before those to the left. For example, the default behavior of ISP (equivalent to 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

Next, 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.

autogrow={on|off|true|false|yes|no}

Enables or disables the autogrow feature for a cache volume that is used by space-optimized instant snapshots.

cachevolume=cachevol

Specifies the cache volume that a space-optimized instant snapshot is to use.

capability='cap_name(var_name=var_value, ...),cap_name ...'

Specifies the capabilities to be used with a make, maxsize, or transform operation. Capabilities take optional parameters, and multiple capabilities can be specified for a volume.

See the VERITAS Storage Foundation Intelligent Storage Provisioning Administrator's Guide for a list of the set of capabilities that are provided by VERITAS Volume Manager.

columnnames=plex-name

(alias: column, columns) Specifies the name of columns for an evacuate operation.

comment=comment

Specifies a comment to give to a volume when it is created.

dcologlen=length

Specifies the DCO volume size to be used. This attribute may be used with the make operation if the specified templates and/or capabilities imply that storage is to be allocated for a DCO volume.


Note   Note    The actual size of the log that is added may be adjusted because of constraints on minimum size and alignment.

diskgroup=diskgroup

Specifies the disk group for an operation. If a disk group is specified in a defaults file, then it just specifies the default disk group to use for the make operation, if no other means of determining the disk group can be used. If specified as a command line attribute, it has the same effect as specifying a disk group with the -g option (the operation is forced to apply to the given disk group).

drl={{true|yes|y|on}|sequential|{false|no|n|off}}

Specifies whether dirty region logging (DRL), sequential DRL, or no DRL is to be enabled.

excl={yes|y|on|true|no|n|off|false}

Sets or clears the EXCLUSIVE flag on the volume. A volume in exclusive open state can be opened by only one node in the cluster at a time. Multiple opens of an exclusive volume from the same node are permitted. Non-exclusive volumes can be simultaneously opened by more than one node. After a node opens an exclusive volume, every other node's open attempt fails until the last close of the volume by the first opener. Such an open failure returns a EBUSY error code. Available only if the VERITAS Volume Manager cluster feature is enabled.

fastresync={yes|y|on|true|no|n|off|false}

(alias: fmr) Enables or disables Persistent FastResync on a volume. A DCO object and DCO log volume must have been associated with the volume. Note: A license is necessary to use the FastResync feature.

fstype=file-system-type

Specifies the file system type for a new volume.

group=owning-group

Sets the group ID for a new volume. The group ID can be specified numerically or with a system group name. This attribute is used only with the make operation. By default, volumes are created with group 0.

growby=growby-percentage

Sets the growby value as a percentage for a cache volume that is used by space-optimized instant snapshots.

highwatermark=high-water-mark-percentage

Sets the high watermark value as a percentage for a cache volume that is used by space-optimized instant snapshots.

init=initialization-type

Specifies how to initialize a new volume. The default method (which can be selected explicitly with init=default) is to call vxvol start to perform a default initialization that is specific to a usage type. A new volume can be left uninitialized with init=none. Specifying init=zero clears a volume before enabling it for general use.

layout=layout-spec[,layout-spec, ...]

Specifies a plex layout type. See the LAYOUT SPECIFICATION section for details. By default, unmirrored non-striped volumes are created without any logs.

loglen=length

(alias: logsize) Specifies the log length to be used.


Note   Note    The actual size of the log that is added may be adjusted because of constraints on minimum size and alignment.

lognames=log-name

(alias: log, logs) Specifies the name of an existing log to the add log or remove log operation. For the add log operation, it specifies that the new log should be similar to that named. For the remove log operation, it specifies that the named log should be removed.

logtype=type

Specifies the type of log to use with a volume:

dcm

Data change map (DCM) used with VERITAS Volume Replicator volumes to enable the fast resynchronization of a secondary RVG with its primary.

dco

Data change object (DCO) used to implement persistent snapshots and new-style dirty region logging (DRL). DRL allows the speedy recovery of mirrors after a system crash.

drl

Traditional DRL log (implemented as a dedicated plex, and not using DCO) used with mirrored layout volumes only.

raid5

RAID-5 log used to permit the speedy recovery of RAID-5 volumes.


Note   Note    Use of this attribute with the make operation is not supported.

max_ncolumn=number

(alias: maxcolumns, max_nstripe, maxstripes) Specifies the default maximum number of columns for a striped plex (default value is 8). The rules for selecting the default number of columns are described for the nstripe attribute.

max_nraid5column=number

(alias: maxraid5columns, max_nraidcolumn, max_nraid5stripe, max_nraidstripe, maxraidcolumns, maxraid5stripes, maxraidstripes) Specifies the default maximum number of columns for a RAID-5 volume (default value is 8). The rules for selecting the default number of RAID-5 columns are described for the nstripe attribute.

maxgrow=maxgrow-percentage

Sets the maxgrow value as a percentage for a cache volume that is used by space-optimized instant snapshots.

min_ncolumn=number

(alias: mincolumns, min_nstripe, minstripes) Specifies the default minimum number of stripe columns for either a RAID-5 volume (if min_nraid5column is not also specified) or for a striped plex (default value is 2). The policy for selecting the default number of stripe columns does not allow the creation of a striped plex with fewer than this number of columns.

min_nraid5column=number

(alias: minraid5columns, min_nraidcolumn, min_nraid5stripe, min_nraidstripe, minraidcolumns, minraid5stripes, minraidstripes) Specifies the default minimum number of columns for a RAID-5 volume (default value is 3). The policy for selecting the default number of RAID-5 columns does not allow the creation of a RAID-5 volume with fewer than this number of columns.

mode=permissions

Specifies the permissions for the block and character device nodes that are created for a new volume. The mode can be specified either as an octal number or symbolically (see the chmod(1) manual page). The default mode for a volume gives read and write access only to the owner.

ncols=number

Specifies the number of columns to add or remove.

nlogs=number

(alias: nlog, logs) Specifies the number of logs to add or remove.

nmirror=number-of-mirrors

Specifies the number of mirrors (plexes) to add or remove.

plexnames=plex-name

(alias: plex, plexes) Specifies the name of a plex to an add or remove mirror operation.

probe_granularity=size

Specifies the granularity for the maxgrow and maxsize requests. The default size value is 1m (1 megabyte).

raid5_stripeunit=width

(alias: raid5_stwid, raid5_stwidth, raid5_st_width, raid_st_width, raid_stripeunitsize, raid5_stripeunitsize, raid5_stripeunitwidth, raid_stwid, raid_stwidth, raid_stripeunit, raid_stripeunitwidth) Specifies the stripe unit size to use when creating a new RAID-5 volume (default value is 16K).

raid5loglen=length

(alias: raidloglen) Specifies the RAID-5 log length to be used. This attribute may be used with the make operation if the specified templates and/or capabilities imply that storage is to be allocated for a RAID-5 log.


Note   Note    The actual size of the log that is added may be adjusted because of constraints on minimum size and alignment.

regionsize=size

Specifies 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).

remaininglog=number

Sets the number of RAID-5 log copies or DCO plexes that must remain in a volume after a delete log operation.

remainingmirror=number

Sets the number of mirrors that must remain in a volume after a delete mirror operation.

rules=rules

Specifies the rules that are to be used with a make, maxsize, or transform operation. See the ALLOCATOR RULES section for more information.

spare=no|only|yes

Controls the use of spare disks when hot-relocation is performed.

If set to yes, spare disks are used. If necessary, free space is also used on disks that have been marked nohotuse=off. This is the default behavior.

If set to only, relocation storage is allocated using only spare disks.

If set to no, spare disks are not used. Alternatively, do not mark any of your disks as spares and do not mark them as available for use by hot relocation.

stripe_stripeunit=width

(alias: stripe_stwid, stripe_stwidth, stripe_st_width, stripe_stripeunitsize, stripe_stripeunitwidth) Specifies the default stripe unit size for RAID-5 and striped plexes. This attribute also resets the values for both raid5_stripeunit and stripe_stripeunit.

tmplen=size

Controls the size of the temporary volume that is used for add column, rmcolumn and setstwidth operations. If not specified, the size of the temporary volume is based on the size of the volume that is being operated upon.


Note   Note    The temporary volume is a 2-way mirror that requires at least two disks, and twice as much disk space as the size of the temporary volume.

type={cachevolume|data|snapshot}

Sets the type of a volume to data for a normal volume, snapshot for a volume that is being created to hold a full-sized instant snapshot, or cache for a volume that is being created to hold the cache volume for use by space-optimized instant snapshots.

If no type is specified, data is assumed.

For the cachevolume type, a cache object is also created above the cache volume.

For the snapshot type, a DCO and DCO volume are also created for the volume.

user=owning-user

Specifies the user ID for a new volume (default value is root). The user ID can be specified numerically or it can be a system login name.

user_template=ut1[,ut2, ...]

Specifies the list of user templates to be used with a make, maxsize, or transform operation.

usetype=volume-usage-type

Specifies the usage type to use when creating a new volume (the default value is raid5 for RAID-5 volumes; otherwise fsgen is the default).

volume_template=t1[,t2 ...]

Specifies a list of volume templates to be used with a make, maxsize, or transform operation.

STORAGE SPECIFICATION

Storage specification attributes are used to specify which storage can and cannot be allocated during vxvoladm operations. They are also used with the evacuate operation to specify the storage from which VxVM objects are to be removed and the storage that may be allocated to relocate these objects.

Storage specification attributes have one of the following forms:

[!]diskname

Includes a disk for allocation by ISP. If ! is specified, the disk is ignored. diskname refers to a disk media record name in a VERITAS Volume Manager disk group.

[!]diskclass:instance

Includes a set of disks for allocation by ISP. If ! is specified, the disks are ignored. diskclass names a particular type of disk grouping (for example, ctlr to indicate groups of disks on a single controller), and instance specifies which grouping of that type (for example c1). Each type of disk class has a particular format for specifying instances of the class.

diskclass:same

Specifies that the allocation must be constrained to include disks from the same instance of the given class. For example, a storage specification of diskparam:same indicates that all disks selected must have the same basic parameters (tracksize, cylinder size, size, and revolutions-per-minute), but does not specify which specific parameters to use.

The defined disk classes (and alternate names, or aliases, for those classes) are as follows:

ctlr

(alias: c, ctrl, cntrl, controller) Specifies disks accessible through a controller group. All disks accessible through the specified controller name(c#) are selected for the operation.

da

Specifies a VERITAS Volume Manager disk (VM disk) by device name (disk access record name). For example, c2t1d0 indicates a VM disk defined on disk c2t1d0.

device

(alias: d) Specifies all VM disks on a physical disk. The physical disk is specified in the form c#t#d#, which indicates the controller, target ID, and disk number. Typically, only one VM disk device is created for each physical disk.

diskrpm

(alias: rpm) Specifies disks with a given rotation speed in revolutions per minute (for example, 7200).

dm

(alias: disk) Specifies a VM disk by disk name (disk media record name) in the disk group of the volume. Specifying a disk class type of dm or disk is equivalent to giving a storage specification with no disk class name.

enclr

(alias: e, enclr, enclosure) Specifies disks belonging to a particular enclosure. The enclosure name is obtained using the vxdmpadm listenclosure all command.

target

(alias: t) Specifies disks with the same SCSI target address on the same controller. The target is specified in the form c#t#. For example, t:c2t4 selects disks on target 4 of controller 2.

Storage can additionally be specified using the following expressions in conjunction with rules that may be combined by using the allof, eachof and noneof operators (see the OPERATORS section):

evac_storage=rules

Specifies storage assigned to a volume that is to be evacuated by the evacuate operation on columns, disks, logs, mirrors or subdisks.

remove_storage=rules

Specifies storage that is to be removed from use by a volume in a remove operation on a column, log or mirror.

use_storage=rules

Specifies storage that may be used to relocate columns, disks, logs, mirrors, subdisks or a volume that are being evacuated.

The following example evacuates data from subdisks belongs to the volume vol1 that are currently on controller c1 to available storage on any other controller:


vxvoladm -g mydg evacuate sd vol1 \
  evac_storage='eachof("Controller"="c1")' \
  use_storage='noneof("Controller"="c1")'

The next example creates a 10-gigabyte volume using disks from enclosure encl1 that are not available exclusively on controller c1:


vxvoladm -g mydg make vol2 10g \
  use_storage='allof("Enclosure"="encl1",noneof("Controller"="c1"))'
Note   Note    The storage specification does not contribute to the intent of a volume.

LAYOUT SPECIFICATION

The layout attribute specifies a comma-separated list of parameters that may be applied to a vxvoladm operation.

The following parameter values are defined:

contig, nocontig

Disallows or allows default plexes, regular stripe columns, or RAID-5 stripe columns from using multiple regions of disk. If contig is specified, plexes and columns must be allocated from a single contiguous region of disk. If this is not possible, the allocation fails. By default, vxvoladm tries to allocate space contiguously, but it can use multiple regions or multiple disks if necessary.

grow

Requests that the volume length be increased when adding columns to a volume.

shrink

Requests that the volume length be decreased when removing columns from a volume.

span,nospan

Allows (default) or disallows plexes, regular stripe columns, or RAID-5 stripe columns from spanning multiple disks. If nospan is indicated, plexes or columns can be formed from multiple regions of the same disk, but not from more than one disk.

ALLOCATOR RULES

affinity

Expresses attraction between VxVM objects. Objects that conform to this rule share as many attribute values as possible.

confineto

Depending on the scope in which the rule is used, confines a volume, mirror, column or log to a specific set of LUNs.

confineto expressions may be used with the allof, anyof, eachof, noneof and oneof operators.

The default operator for merging confineto expressions is eachof.

exclude

Depending on the scope in which the rule is used, excludes a set of LUNs from allocation to a volume, mirror, column or log.

exclude expressions may be used with the allof, eachof and noneof operators.

The noneof operator can be used to forcibly include sets of LUNs in the allocation.

The default operator for merging exclude expressions is eachof.

multipath

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   Note    Expressions involving multipath do not use operators to combine multiple arguments.

parity

Specifies whether redundancy should be based on parity. Parity-based redundancy is typically implemented using a RAID-5 layout in hardware or using software.

select

Depending on the scope in which the rule is used, confines a volume, mirror, column or log to a specific set of LUNs. specifies storage that can be allocated to create a volume, mirror, column or log.

select expressions may be used with the allof, anyof, eachof, noneof and oneof operators.

The default operator for merging select expressions is anyof.

separateby

Defines how mirrors are separated in a volume. A separateby expression is typically used to place mirrors in different failure domains for greater reliability.

striped

Specifies whether a volume or mirror is to be striped. As striping can be implemented in hardware as well as in software, a value of true does not imply that the number of columns is greater than one.

strong separateby

A more restrictive form of the separateby rule, that does not permit any sharing of attributes for the storage that is assigned to VxVM objects

SIMPLIFIED RULE SYNTAX

For convenience, rules may be expressed in the following simplified form on the command line:


rulename=attribute_name[=value][, ...]

as shown in the following examples:


confineto=VendorName=EMC,Room=Room1,Building
select=Room=Room1,Room=Room2,Building
exclude=VendorName=EMC,VendorName=Hitachi
affinity=Enclosure
separateby=Controller
strong separateby=Spindles

which are equivalent to these rule expressions:


confineto eachof("VendorName"="EMC","Room"="Room1","Building")
select anyof("Room"="Room1","Room"="Room2","Building")
exclude allof("VendorName"="EMC","VendorName"="Hitachi")
affinity "Enclosure"
separateby "Controller"
strong separateby "Spindles"

See the VERITAS Storage Foundation Intelligent Storage Provisioning Administrator's Guide for details of the syntax of rule expressions.

OPERATORS

allof

Selects available storage that matches the union of all of the operands.

anyof

Selects available storage that matches any of the operands in the order that they are listed. The first match is chosen.

eachof

Selects available storage that matches the intersection of the operands.

noneof

Does not select storage that matches any of the operands.

oneof

Selects available storage that matches one and only one of the operands. The first match is chosen.

See the VERITAS Storage Foundation Intelligent Storage Provisioning Administrator's Guide for more information about these operators.

OPERATIONS ON MULTIPLE VOLUMES

The make, grow and shrink operations can be performed on only a single volume if this is specified on the command line. The migrate operation can be performed on multiple volumes that are specified on the command line, but the same rules are applied to each volume, and only a single destination storage pool may be used. These limitations may be overcome by specifying the -M option with these operations. The command then reads multiple volume definitions from the standard input until the end of file is encountered. Input can be redirected from a definitions file or from a here document.

The syntax of the definitions for creating multiple volumes with make is shown here:


volumegroup { 
  [diskgroup "dgname"]
  [rules { volume-group-rules } ]
  volume "namelength {
    [cachevolume "cachevol"]
    [capability 'capability[(name=value[, ...])],capability ...]']
    [comment "comment"]
    [dcologlen length]
    [dm dm1,[dm2, ...]] 
    [drl on|off|true|false|yes|no|sequential]
    [excl on|off|true|false|yes|no]
    [fmr on|off|true|false|yes|no]
    [fstype file-system-type]
    [group "group"]
    [init active|none|zero]
    [iodelay delay
    [iosize size]
    [layout "type"]
    [max_ncolumn number]
    [max_nraid5column number
    [min_ncolumn number]
    [min_nraid5column number]
    [mode mode]
    [pool "poolname"]
    [raid5_stripeunit width
    [raid5loglen length]
    [regionsize size]
    [rules { volume-rules } ]
    [spare yes|no|only]
    [stripe_stripeunit width]
    [tasktag "tag"] 
    [type cachevolume|data|snapshot]
    [user "user"]
    [user_template "ut1[,ut2 ...]"]
    [usetype volume-usage-type
    [volume_template "vt1[,vt2 ...]"]
    [vxvmtaskid taskid]
  } 
  [volume "name2length2 {
      ...
  }]
};
[volumegroup { 
 ...
};]

Each volume group (volumegroup) definition contains the rules and volume definitions for the volumes that are to be created for a disk group.

For the migrate operation, the specification syntax is:


diskgroup "dgname"
volume "volumename1" {
    pool "pool_name1"
    rules { volume1_rules }
};
volume "volumename2" {
    pool "pool_name2"
    rules { volume2_rules }
};
...

For operations to grow or shrink multiple volumes, the syntax of each line in the input is:


diskgroup dgname volume volname length

EXAMPLES

MAXIMUM VOLUME SIZE

Find out the maximum size of a mirrored volume that can be created in the disk group mydg using the available free storage:


vxvoladm -g mydg maxsize capability='DataMirroring' 

VOLUME CREATION

Create a 100-megabyte concatenated volume with 2 mirrors in the default disk group, and which is made immediately active:


vxvoladm make vol1 100m rules='mirror 2' init=active

Create a 20-gigabyte striped volume with 4 stripes and its contents initialized to all zeros:


vxvoladm -g mydg make vol2 20g rules='stripe 4' init=zero

Create a 500-megabyte mirrored-stripe volume which is not initialized:


vxvoladm -g mydg make vol3 500m init=none \
  rules='mirror 2{stripe 3}' 
Using the DataStripeMirror capability,
create a 30-gigabyte striped-mirror volume which is immediately active:
vxvoladm -g mydg make vol4 30g \
  capability='DataStripeMirror(ncols=3,nmirs=2)' \
  init=active
Create a 500-megabyte mirrored volume, relvol, using
the volume template DataMirroring.
vxvoladm -g mydg make relvol 500m volume_template=DataMirroring

Create a 10-gigabyte 4-mirror volume, perfvol, on hardware-striped EMC storage that is in the same location:


vxvoladm -g mydg make perfvol 10g \
  capability='DataMirroring(nmirs=4),PrefabricatedStriping' \
  rules='confineto allof("Room","Vendor"="EMC")'

MULTIPLE VOLUME CREATION

Create a 1-gigabyte contiguous volume, tvol1, and a 10-gigabyte mirrored volume, tvol2 :


vxvoladm -M make <<!!
volumegroup { 
  diskgroup "tvdg" 
  volume "tvol1" 1g { 
    layout "contig"
  } 
  volume "testvol2" 10g { 
    init active 
    capability 'DataMirroring(nmirs=3)' 
  }
}; 
!!

MIRROR ADDITION AND REMOVAL

Add two mirrors to the volume myrelvol:


vxvoladm -g mydg add mirror myrelvol nmirror=2
Add a mirror to the volume myvol2 using disk mydg10
for storage:
vxvoladm -g mydg add mirror myvol2 dm:mydg10
Remove the two mirrors from volume myvol3 with
plexes named plex01 and plex02:
vxvoladm -g mydg remove mirror testvol3 nmirror=2 \
  plexnames=plex01,plex02

MAXIMUM GROWABLE VOLUME SIZE

Find out the maximum size to which the volume relvol can be grown:


vxvoladm -g mydg maxgrow relvol

GROWING AND SHRINKING VOLUMES

Grow the volume pervol by 25%:


vxvoladm -g mydg growby pervol 25% 
Shrink the volume myvol by 100MB: 
vxvoladm -g mydg shrinkby myvol 100m 
Growing and Shrinking Multiple Volumes
Grow several volumes in varying disk groups by different amounts:
vxvoladm -M growby <<!!
diskgroup ttdg volume vol1 100m
diskgroup ttdg volume vol2 200m 
diskgroup mydg volume myvol3 50%
!!
Shrink several volumes in different disk groups by varying amounts:
vxvoladm -M shrinkto <<!!
diskgroup ttdg volume vol1 1g
diskgroup mydg volume myvol4 90%
!!

LOG ADDITION AND REMOVAL

Add a DCO log to the volume tvol1:


vxvoladm -g ttdg add log tvol1 logtype=dco
Remove the DCO log from the volume tvol1
vxvoladm -g ttdg remove log tvol1 logtype=dco 

GROWING A LOG

Grow the DCO volume associated with the volume myvol2 by 100%:


vxvoladm -g mydg growlogby myvol2 100% logtype=dco

VOLUME REMOVAL

Delete the volume vol2:


vxvoladm -g mydg remove volume vol2

MIGRATING A VOLUME TO ISP

Migrate the volumes myvol and snap_myvol to data and clone storage pools respectively:


vxvoladm -M migrate <<!!
diskgroup mydg
volume myvol {
    pool "mydatapool"
};
volume snap_myvol {
    pool "myclonepool"
};
!!

EXIT STATUS

The vxvoladm utility exits with a non-zero status if the attempted operation fails. A non-zero exit code is not a complete indicator of the problems encountered, but rather denotes the first condition that prevented further execution of the utility.

NOTES

Attribute names and their values are case sensitive. You can use the vxvoladm listattrs command to find out the correct names of LUN attributes.

Values for attributes such as max_ncolumn and min_nstripe are ignored if they would contradict the values specified by capability parameters or rules.

FILES

/etc/default/allocator

Defaults file used by vxvoladm. /etc/default/allocator_readme Pristine copy of the defaults file as shipped and installed.

NOTES

The vxvoladmtask command may be used to monitor and administer ISP tasks. See the vxvoladmtask(1M) manual page for more information.

Operations on mirrored-stripe volumes to add or remove columns, or to change the stripe width can be reversed by using transformreverse. Such operations on striped, striped-mirror and RAID-5 volumes can only be reversed by first running vxtask abort to stop the operation, and then running vxrelayout reverse to undo it.

If an HFS or Base JFS file system is configured on an ISP volume, do not specify layout=shrink to the vxvoladm command when removing columns from the volume. Similarly, do not specify layout=grow to the vxvoladm command when adding columns to the volume unless you first unmount the file system. Both HFS and Base JFS file systems cannot be shrunk, and can only be grown if they are first unmounted. These restrictions do not apply to an Online JFS file system, which can be grown and shrunk while mounted. See the vxresize(1M) manual page for more information.

SEE ALSO

vxpool (1M), vxrelayout (1M), vxresize (1M), vxtask (1M), vxtemplate (1M), vxusertemplate (1M), vxvoladmtask (1M)
VERITAS Storage Foundation Intelligent Storage Provisioning Administrator's Guide
 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Manual Pages for Storage Foundation  
Manual: Maintenance Commands (1m)  
VERITAS Software Corporation
www.veritas.com