Home > Veritas Storage Foundation™ Volume Manager Manual Pages
VXVOLADM (1M) |
Maintenance Commands |
vxxoladm [options] [-b] [--noattach] -M add mirror volume ... [storage-spec ...] [attribute ...]
vxvoladm [options]
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] list [capability=c1[,c2...]] [tag=tagname] ... [template=t1[,t2...]]
vxvoladm [options] listattrs [lun_name1 [lun_name2 ...]]
vxvoladm [options] listtag {volume|vset} ...
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] printrules volume ...
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] -M
remove mirror volume ...
[storage-spec ...] [attribute ...]
vxvoladm [options] removetag {volume|vset} tagname[=[tagvalue]] ...
vxvoladm [options] replacetag {volume|vset} old_tagname new_tagname
vxvoladm [-b] [-g diskgroup] reversemigrate volume ...
vxvoladm [-b] [-g diskgroup] reversemigrateall
vxvoladm [options] [-b] setstwidth volume
[attribute ...]
vxvoladm [options] settag {volume|vset} tagname[=tagvalue] ...
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
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.
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.
If the -M option is specified to add mirror, mirrors may be added to multiple volumes in a single operation.
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 supports 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: -d defaultfile, -g diskgroup, -n, -P storage_pool and -t tasktag.
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: 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.
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.
If no capabilities, tags or templates are specified, all volumes in the disk group (and storage pool, if specified) are listed.
Dotted tag hierarchies are understood. For example, the listing for tag=a.b includes all volumes that have tag names that start with a.b.
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).
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.
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.
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: 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. 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.
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.
If the -M option is specified, mirrors may be removed from multiple volumes in a single operation.
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.
The volumes that are specified on the command line must not share any disks with any volumes that are not listed on the command line.
Tag names and tag values are case-sensitive character strings of up to 256 characters. Tag names can consist of letters (A-Z and a-z), numbers (0-9), dashes (-), underscores (_) or periods (.) from the ASCII character set. A tag name must start with either a letter or an underscore. Tag values can consist of any character from the ASCII character set with a numeric value from 32 to 127.
The tag names "site", "udid" and "vdid" are reserved and should not be used. To avoid possible clashes with future product features, it is recommended that tag names do not start with any of the following strings: "asl", "be", "isp", "nbu", "sf", "symc" or "vx".
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: 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.
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.
Note: If volume is undergoing a transformation, the vxtask list command shows that a synchronization task is being performed on the top-level volume.
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.
When used with the verify keyword, verifies the intent of volumes in all disk groups.
- 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.
- 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).
- 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.
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.
Note: The actual size of the log that is added may be adjusted because of constraints on minimum size and alignment.
Note: The actual size of the log that is added may be adjusted because of constraints on minimum size and alignment.
- 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: Use of this attribute with the make operation is not supported.
Note: The actual size of the log that is added may be adjusted because of constraints on minimum size and alignment.
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.
The tag names "site", "udid" and "vdid" are reserved and should not be used. To avoid possible clashes with future product features, it is recommended that tag names do not start with any of the following strings: "asl", "be", "isp", "nbu", "sf", "symc" or "vx".
If not specified, a tag value is set to null.
More than one tag may be associated with a volume provided that each tag is uniquely named.
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.
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.
Storage specification attributes have one of the following forms:
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):
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: The storage specification does not contribute to the intent of a volume.
See the vxassist(1M) manual page for details of the layout specifications that are supported.
confineto expressions may be used with the allof, anyof, eachof, noneof and oneof operators.
The default operator for merging confineto expressions is eachof.
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.
Note: Expressions involving multipath do not use operators to combine multiple arguments.
select expressions may be used with the allof, anyof, eachof, noneof and oneof operators.
The default operator for merging select expressions is anyof.
as shown in the following examples:rulename=attribute_name[=value][, ...]
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.
See the Veritas Storage Foundation Intelligent Storage Provisioning Administrator's Guide for more information about these operators.
The -M option can also be used to add mirrors to (mirror), or to remove mirrors from (remove mirror) multiple volumes in a single operation.
The syntax of the definitions for creating multiple volumes with make is shown here:
dgname"] [rules { volume-group-rules } ] volume "name" length { [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] [nvol number] [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 "name2" length2 { ... }] }; [volumegroup { ... };]volumegroup {[diskgroup "
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:
dgname" volume "volumename1" { pool "pool_name1" rules { volume1_rules } }; volume "volumename2" { pool "pool_name2" rules { volume2_rules } }; ...diskgroup "
For operations to grow or shrink multiple volumes, the syntax of each line in the input is:
dgname volume volname lengthdiskgroup
vxvoladm -g mydg maxsize capability='DataMirroring'
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")'
vxvoladm -M make <<!! volumegroup { diskgroup "tvdg" volume "tvol1" 1g { layout "contig" } volume "testvol2" 10g { init active capability 'DataMirroring(nmirs=3)' } }; !!
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
vxvoladm -g mydg maxgrow relvol
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% !!
vxvoladm -g ttdg add log tvol1 logtype=dco
Remove the DCO log from the volume tvol1:
vxvoladm -g ttdg remove log tvol1 logtype=dco
vxvoladm -g mydg growlogby myvol2 100% logtype=dco
vxvoladm -g mydg remove volume vol2
vxvoladm -M migrate <<!! diskgroup mydg volume myvol { pool "mydatapool" }; volume snap_myvol { pool "myclonepool" }; !!
Values for attributes such as max_ncolumn and min_nstripe are ignored if they would contradict the values specified by capability parameters or rules.
If a JFS or JFS2 file system is configured on an ISP volume, do not specify layout=shrink to the vxvoladm command when removing columns from the volume. These file system types cannot be shrunk. This restriction does not apply to a VxFS file system, which can be grown and shrunk while mounted. See the vxresize(1M) manual page for more information.
Veritas Storage Foundation Intelligent Storage Provisioning Administrator's Guide
Last updated: 17 Aug 2006
Copyright ©2009 Symantec Corporation
All rights reserved.