The chvdisk command modifies the properties
of a virtual disk, such as the disk name, I/O group, I/O governing
rate, or unit number.
Syntax

>>- svctask -- -- chvdisk -- --+-------------------------+------>
'- -name -- new_name_arg -'
>--+---------------------------------------------+-------------->
+- -iogrp --+- io_group_id ---+--+----------+-+
| '- io_group_name -' '- -force -' |
'- -cache --+-readwrite-+--+----------+-------'
'-none------' '- -force -'
>--+--------------------------+--+--------------------------+--->
'- -node --+- node_id ---+-' '- -rate -- throttle_rate -'
'- node_name -'
>--+-----------+--+-------------------------+-- ---------------->
'- -unitmb -' '- -udid -- vdisk_udid -'
>--+--------------------------------------------------+--------->
'- -warning --disk_size |--disk_size_percentage--%-'
>--+-------------------+--+-------------------------+----------->
'- -unit --+- b --+-' '- -autoexpand --on | off-'
+- kb -+
+- mb -+
+- gb -+
+- tb -+
'- pb -'
>--+--------------+--+----------------------+------------------->
'- -copy-- id -' '- -primary-- copy_id -'
>--+------------------------------+--+- vdisk_name -+----------><
'- -syncrate-- percentage_arg -' '- vdisk_id ---'
Parameters
- -name new_name_arg
- (Optional) Specifies a new name to assign to the virtual disk.
You cannot use this parameter with the -iogrp, -rate, -node,
or -udid parameters. This parameter is required if you do not
use the -iogrp, -rate, or -udid parameter.
- -iogrp io_group_id | io_group_name
- (Optional) Specifies a new I/O group to move the virtual disk
to, by I/O group ID or I/O group name. You can use the -node parameter with the -iogrp parameter to
specify a preferred node for the specified VDisk.
Notes: - If the VDisk has a mapping to any hosts, it is not
possible to move the VDisk to an I/O group, unless all of those hosts
are associated with the new I/O group.
- This parameter can fail if there is not enough space to allocate
bitmaps for a mirrored VDisk in the target I/O group.
- This parameter can fail if any copy is not synchronized. The -force parameter
can be used to force the move, but this resynchronizes the
VDisk.
- If the VDisk is offline, use one of the recovervdisk commands
to recover the VDisk and bring it back online. Beginning with SAN Volume Controller version
4.3.1, use of the recovery I/O group is not required.
- -cache readwrite | none
- (Optional) Specifies the caching options for the VDisk. Valid
entries are readwrite, to enable the cache for the VDisk, or none,
to disable the cache mode for the VDisk.
- -force
- (Optional) The force parameter
can only be used for changing the I/O group of a VDisk or the caching
mode. Use the force parameter with the iogrp parameter
to force the VDisk to be removed from an I/O group. Use the force parameter
with the cache parameter to specify that you
want the system to change the cache mode of the VDisk even if the
I/O group is offline. This option overrides the cache flush mechanism.
Attention: - If the force parameter
is used for changing the caching mode or I/O group of a VDisk, the
contents of the cache are discarded and the VDisk might be corrupted
by the loss of the cached data. This could occur if the cluster is
able to destage all write data from the cache or not. The force parameter
should be used with caution.
- If the force parameter is used to move a
VDisk that has out-of-sync copies, a full resynchronization is required.
- -rate throttle_rate [-unitmb]
- (Optional) Specifies the I/O governing rate for the VDisk, which
caps the amount of I/O that is accepted. The default throttle_rate units
are I/Os. To change the throttle_rate units
to megabytes per second (MBps), specify the -unitmb parameter.
The governing rate for a virtual disk can be specified by I/Os or
by MBps, but not both. However, you can set the rate to I/Os for some
virtual disks and to MBps for others.
You cannot use this parameter with the -name, -iogrp, -node,
or -udid parameters.
- -udid vdisk_udid
- (Optional) Specifies the unit number (udid) for
the disk. The vdisk_udid is an identifier
that is required to support OpenVMS hosts; no other systems
use this parameter. Valid options are a decimal number from 0 to 32 767
or a hexadecimal number from 0 to 0x7FFF. A hexadecimal number
must be preceded by 0x (for example, 0x1234). If you
do not use the -udid parameter, the default udid is 0.
You cannot use this parameter with the -name, -iogrp, -node,
or -rate parameters.
- -warning disk_size | disk_size_percentage%
- (Optional) Generates a warning when the used disk capacity on
the space-efficient copy first exceeds the specified threshold. You
can specify a disk_size integer, which defaults
to MBs unless the -unit parameter is specified;
or you can specify a disk_size%,
which is a percentage of the virtual disk size. To disable warnings,
specify 0 or 0%.
- -unit b | kb | mb | gb |
tb | pb
- (Optional) Specifies the data units to use for the -warning disk_size parameter.
- -autoexpand on | off
- (Optional) Specifies whether space-efficient VDisk copies
automatically expand their real capacities by allocating new extents
from their managed disk group. To use this parameter, the VDisk must
be space-efficient.
- -copy id
- (Optional) Specifies the copy to apply the changes to. You must
specify this parameter with the -autoexpand or -warning parameter.
The -copy parameter is required if the specified
VDisk is mirrored and only one VDisk copy is space-efficient. If both
copies are space-efficient and the -copy parameter
is not specified, the specified -autoexpand or -warning parameter
is set on both copies.
- -primary copy_id
- (Optional) Specifies the primary copy. Changing the primary copy
only takes effect when the new primary copy is online and synchronized.
If the new primary is online and synchronized when the command is
issued, the change takes effect immediately.
- -syncrate percentage
- (Optional) Specifies the copy synchronization rate, as a percentage
of the peak synchronization rate. A value of zero (0) prevents
synchronization.
- -node node_id | node_name
- (Optional) Specifies a preferred node for the specified VDisk. When
using this parameter, you must also specify the -iogrp parameter. You
cannot use this parameter with the -name, -rate, or -udid parameters.
- vdisk_name | vdisk_id
- (Required) Specifies the virtual disk to modify, either by ID
or by name.
Description
The chvdisk command
modifies a single property of a virtual disk (VDisk). To change the
VDisk name and modify the I/O group, for example, you must issue the
command twice.
You can specify a new name or label. You can
use the new name subsequently to refer to the virtual disk. To specify
a preferred node for the VDisk, use the -node node_id
| node_name parameter.
You can change the I/O
group with which this virtual disk is associated. However, to change
the I/O group, you must first flush the cache within the nodes in
the current I/O group to ensure that all data is written to disk.
Ensure that you suspend I/O operations at the host level before you
perform this operation.
Attention: - Do not move a VDisk to an offline I/O group under any circumstance.
To avoid any data loss, you must ensure that the I/O group is online
before you move the VDisks.
- Do not move an offline VDisk to the recovery I/O group. Beginning
with SAN Volume Controller version
4.3.1, use of the recovery I/O group is not required. Instead, use
one of the recovervdisk commands to recover the
VDisk and bring it back online.
You can set a limit on the amount of I/O transactions
that is accepted for this virtual disk. It is set in terms of I/Os
per second or MBs per second. By default, no I/O governing rate is
set when a virtual disk is created.
Attention: All
capacities, including changes, must be in multiples of 512 bytes.
An error occurs if you specify a capacity that is not a multiple of
512, which can only happen when byte units (-b) are used. The
default capacity is in MB.
When the virtual disk is created,
there is no throttling applied to it. Using the -rate parameter
can change this. To change the virtual disk back to an unthrottled
state, specify 0 (zero) with the -rate parameter.
You
can migrate a VDisk to a new I/O group to manually balance the workload
across the nodes in the cluster. You might end up with a pair of nodes
that are overworked and another pair that are underworked. Use the
following procedure to migrate a single VDisk to a new I/O group.
Repeat for other VDisks as required.
Attention: This
is a disruptive procedure. Access to the VDisk is lost while you follow
this procedure.
Ensure that when you migrate a VDisk to a
new I/O group, you quiesce all I/O operations for the VDisk. Determine
the hosts that are using this VDisk. Stop and delete any FlashCopy® mappings or Metro
or Global Mirror relationships that use this VDisk. To check if the
VDisk is part of a relationship or mapping, issue the svcinfo
lsvdisk vdiskname | id command, where vdiskname
| id is the name or ID of the VDisk.
Look for the
FC_id and
RC_id fields.
If these are not blank, the VDisk is part of a mapping or relationship.
See the
FlashCopy commands
or Metro Mirror and Global Mirror commands for details on how
to stop or delete the mapping or relationship. Issue the following
command to migrate the VDisk:
svctask chvdisk -iogrp newiogrpname|id vdiskname|id
Follow
the procedure to discover the new vpaths and to check that each vpath
is presenting the correct number of paths. Refer to Multipath Subsystem
Device Driver (SDD) documentation for details on how to dynamically
reconfigure SDD for the given host operating system.
Note: The
command fails if you attempt to change the primary copy of a mirrored
VDisk while the repairvdiskcopy -resync command
is running.
An invocation example
svctask chvdisk -rate 2040 -unitmb 6
The
resulting output
No feedback