The addvdiskcopy command
adds a copy to an existing VDisk, which changes a nonmirrored
VDisk into a mirrored VDisk.
Note: The first syntax
diagram depicts the addition of a sequential or striped mode virtual
disk. The second syntax diagram depicts the addition of an image mode
virtual disk.
Syntax

>>- svctask --addvdiskcopy-------------------------------------->
>-- -mdiskgrp --+-mdisk_group_id_list---+----------------------->
'-mdisk_group_name_list-'
>--+-----------------------+------------------------------------>
| .-striped-. |
'- -vtype --+---------+-'
'-seq-----'
>--+-------------------------------+---------------------------->
'- -mdisk --+-mdisk_id_list---+-'
'-mdisk_name_list-'
>--+----------------------------------------------------------------------------------------------------------------------------+-->
'- -rsize --+-disk_size-------------+--+--------------------------------------+--+---------------+--+----------------------+-'
+-disk_size_percentage%-+ '- -warning -+-disk_size-------------+-' '- -autoexpand -' | .-32--. |
'-auto------------------' '-disk_size_percentage%-' '- -grainsize -+-64--+-'
+-128-+
'-256-'
>--+-----------+--+---------------+--+-------------------+------>
'- -fmtdisk-' '- -createsync -' '- -syncrate --rate-'
>--+-----------------+--+- vdisk_name -+-----------------------><
| .-mb-. | '- vdisk_id ---'
'- -unit --+-b--+-'
+-kb-+
+-gb-+
+-tb-+
'-pb-'

>>- svctask --addvdiskcopy-------------------------------------->
>-- -mdiskgrp --+-mdisk_group_id_list---+----------------------->
'-mdisk_group_name_list-'
>-- -vtype ----image---- -mdisk --+-mdisk_id_list---+----------->
'-mdisk_name_list-'
>--+----------------------------------------------------------------------------------------------------------------------------+-->
'- -rsize --+-disk_size-------------+--+--------------------------------------+--+---------------+--+----------------------+-'
+-disk_size_percentage%-+ '- -warning -+-disk_size-------------+-' '- -autoexpand -' | .-32--. |
'-auto------------------' '-disk_size_percentage%-' '- -grainsize -+-64--+-'
+-128-+
'-256-'
>--+-------------------+--+---------------+--------------------->
'- -syncrate --rate-' '- -createsync -'
>--+-----------------+--+-----------+--+-vdisk_name-+----------><
| .-mb-. | '- -import -' '-vdisk_id---'
'- -unit --+-b--+-'
+-kb-+
+-gb-+
+-tb-+
'-pb-'
Parameters
- -mdiskgrp mdisk_group_id_list
| mdisk_group_name_list
- (Required) Specifies
the managed disk groups to use to create copies for the virtual disk.
You must specify a group for each copy that is being added.
- -vtype seq
| striped | image
- (Optional) Specifies the virtualization
type for the copy: sequential, striped, or image. The type can be
different than the virtualization types for other copies on the VDisk.
The default virtualization type is striped.
- -mdisk mdisk_id_list
| mdisk_name_list
- (Optional) Specifies one or
more managed disks (MDisks). For sequential and image mode copies,
you must specify a single MDisk that has sufficient free extents.
For image mode copies, the MDisk must be in unmanaged mode. For sequential
mode copies the MDisk must be in the managed mode.
- -syncrate rate
- (Optional) Specifies the copy synchronization rate. A value of
zero (0) prevents synchronization. The default value is 50.
For the supported -syncrate values and their corresponding
rates, see Table 1.
- -createsync
- (Optional) Suppresses the synchronization of the new VDisk
copy with the primary copy. Using this parameter can cause data corruption
if the primary copy fails and leaves an unsynchronized secondary copy
to provide data. Using this parameter can cause loss of read stability
in unwritten areas if the primary copy fails, data is read from the
primary copy, and then different data is read from the secondary copy.
To avoid data loss or read stability loss, use this parameter only
for a primary copy that has been formatted and not written to, and
with the -fmtdisk parameter.
- -fmtdisk
- (Optional) Formats a sequential or striped mode copy. You must
also specify the -createsync parameter,
which labels the formatted copy as identical to the primary copy.
The -fmtdisk parameter causes the VDisk
to go offline until new VDisk copy formatting completes. To query
the formatting progress, use the lsvdiskprogress command.
- -rsize disk_size
| disk_size_percentage% | auto
- (Optional) Makes the copy space-efficient and specifies the real
size of the copy. Specify the disk_size | disk_size_percentage value
using an integer, or an integer immediately followed by the percent
character (%). The default units for disk_size are
megabytes (MB); to specify different units, use the -unit parameter. The auto option
creates a VDisk copy that uses the entire size of the MDisk; if you
specify the -rsize auto option, you must
also specify the -vtype image option.
- -warning disk_size
| disk_size_percentage%
- (Optional)
Requires that the -rsize parameter also
be specified. 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 megabytes (MB) unless the -unit parameter
is specified; or you can specify a disk_size%,
which is a percentage of the virtual disk size. If -autoexpand is
enabled, the default value for -warning is
80% of the virtual disk capacity. If -autoexpand is
not enabled, the default value for warning is 80% of the real capacity.
To disable warnings, specify 0.
- -autoexpand
- (Optional) Requires that the -rsize parameter
also be specified. Specifies that space-efficient copies automatically
expand their real capacities by allocating new extents from their
managed disk group. If the -autoexpand parameter
is specified, the -rsize parameter specifies
a capacity that is reserved by the copy. This protects the copy from
going offline when its managed disk group runs out of space by allowing
it to consume this reserved space first.
- -grainsize 32 | 64 | 128
| 256
- (Optional) Requires that the -rsize parameter
also be specified. Sets the grain size (KB) for a space-efficient
VDisk. The default is 32 KB.
- -unit b | kb | mb | gb |
tb | pb
- (Optional) Specifies the data units
for the -rsize and -warning parameters.
- -import
- (Optional)
Imports an image mode disk that contains a space-efficient
volume into the cluster. Requires that the -rsize and -vtype image parameters
also be specified.
- vdisk_name | vdisk_id
- (Required)
Specifies the virtual disk to add the VDisk copy to, either by ID
or by name.
Description
The addvdiskcopy command
adds a copy to an existing VDisk, which changes a nonmirrored
VDisk into a mirrored VDisk. Use the -mdiskgrp parameter
to specify the managed disk group that will provide storage for the
copy; the svcinfo lsmdiskgrp command lists the available managed
disk groups and the amount of available storage in each group.
The
virtualization types are defined as follows:
- sequential
(seq)
- This policy requires the -mdisk parameter with
a single managed disk as its argument. This MDisk must be in the managed
mode.
It creates the virtual disk using extents from the given
managed disk (assuming there are enough free extents on the managed
disk).
- striped
- This is the
default policy. If the -vtype parameter is not specified, this
policy is used in its default form. That is, all managed disks in
the managed disk group are used to create the virtual disk. The striping
is at an extent level; one extent from each managed disk in the group
is used. For example, a managed disk group with 10 managed disks uses
one extent from each managed disk, then it uses the 11th extent from
the first managed disk, and so on.
If the -mdisk parameter
is also specified, you can supply a list of managed disks to use as
the stripe set. This can be two or more managed disks from the same
managed disk group. The same circular algorithm is used across the
striped set. However, a single managed disk can be specified more
than once in the list. For example, if you enter -m 0:1:2:1,
the extents are from the following managed disks: 0, 1, 2,
1, 0, 1, 2, and so forth. All MDisks that are specified in the -mdisk parameter
must be in managed mode.
- image
- This policy allows image mode virtual disks to be created when
a managed disk already has data on it, perhaps from a previrtualized
subsystem. When an image mode virtual disk is created, it directly
corresponds to the (previously unmanaged) managed disk that it was
created from; therefore, virtual disk logical block address (LBA) x equals
managed disk LBA x. You can use this command to bring a nonvirtualized
disk under the control of the cluster. After it is under the control
of the cluster, you can migrate the virtual disk from the single managed
disk. When it is migrated, the virtual disk is no longer an image
mode virtual disk.
You can add image mode VDisks to an already
populated MDisk group with other types of VDisks, such as a striped
or sequential.
Note: An image mode copy must
be at least as large as the VDisk that it is being added to, but any
capacity beyond the size of the VDisk is not accessible.
The command returns the ID of the newly created
VDisk copy.
Table 1 provides the
relationship of the rate value to the data copied per second.
Table 1. Relationship between the rate value
and the data copied per second| User-specified rate attribute value |
Data copied/sec |
| 1 - 10 |
128 KB |
| 11 - 20 |
256 KB |
| 21 - 30 |
512 KB |
| 31 - 40 |
1 MB |
| 41 - 50 |
2 MB |
| 51 - 60 |
4 MB |
| 61 - 70 |
8 MB |
| 71 - 80 |
16 MB |
| 81 - 90 |
32 MB |
| 91 - 100 |
64 MB |
An invocation example
svctask addvdiskcopy -mdiskgrp 0 vdisk8
The
resulting output
Vdisk [8] copy [1] successfully created