| Note: The first syntax diagram depicts the creation of a sequential or striped mode virtual disk. The second syntax diagram depicts the creation of an image mode virtual disk. |
>>- svctask -- -- mkvdisk -- -----------------------------------> >-- -mdiskgrp --+- mdisk_group_id ---+-- -----------------------> '- mdisk_group_name -' >-- -iogrp --+- io_group_id ---+-- -- -size -- disk_size -- ----> '- io_group_name -' >--+------------+-- --+-------------------------+-- ------------> '- -fmtdisk -' '- -vtype --+- seq -----+-' '- striped -' >--+--------------------------+-- --+-------------------+-- ----> '- -node --+- node_name -+-' '- -unit --+- b --+-' '- node_id ---' +- kb -+ +- mb -+ +- gb -+ +- tb -+ '- pb -' >--+---------------------------------+-- -----------------------> '- -mdisk --+- mdisk_id_list ---+-' '- mdisk_name_list -' >--+-------------------------+-- -------------------------------> '- -name -- new_name_arg -' >--+-------------------------+--------------------------------->< '- -instance -- instance -'
>>- svctask -- -- mkvdisk -- -----------------------------------> >-- -mdiskgrp --+- mdisk_group_id ---+-- -----------------------> '- mdisk_group_name -' >-- -iogrp --+- io_group_id ---+-- --+----------------------+---> '- io_group_name -' '- -size -- disk_size -' >-- -- -vtype -- image -- --+--------------------------+-- -----> '- -node --+- node_name -+-' '- node_id ---' >--+-------------------+-- --+----------------------------+-----> '- -unit --+- b --+-' '- -mdisk --+- mdisk_id ---+-' +- kb -+ '- mdisk_name -' +- mb -+ +- gb -+ +- tb -+ '- pb -' >-- --+-------------------------+-- ----------------------------> '- -name -- new_name_arg -' >--+-------------------------+--------------------------------->< '- -instance -- instance -'
This command creates a new virtual disk object. You can use the command to create a variety of types of virtual disk objects and, as such, it is one of the most complex commands.
You will need to decide which managed disk group will provide the storage for the VDisk. Use the svcinfo lsmdiskgrp command to list the available managed disk groups and the amount of free storage in each group.
Decide which I/O group the VDisk should be assigned to. This determines which SAN Volume Controller nodes in the cluster process the I/O requests from the host systems. If you have more than one I/O group then make sure you distribute the VDisks between the I/O groups so that the I/O workload is shared evenly between all SAN Volume Controller nodes. Use the svcinfo lsiogrp command to show the I/O groups and the number of virtual disks assigned to each I/O group.
| Note: It is normal for clusters with more than one I/O group to have MDisk groups that have VDisks in different I/O groups. FlashCopy can be used to make copies of VDisks regardless of whether the source and destination VDisk are in the same I/O group. If however you plan to use intra-cluster Remote Copy then make sure that both the master and auxiliary VDisk are in the same I/O group. |
The virtualization policy controls the type of virtual disk to create. These policies include striped and seq and image:
If the -mdisk argument 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 from the extents will be from the following maintenance disks: 0, 1, 2, 1, 0, 1, 2, and so forth. All MDisks specified in the -mdisk argument must be in the managed mode.
A capacity of 0 is allowed.
It will create the virtual disk only using extents from the given managed disk (assuming there are enough free extents on the managed disk).
You may add image mode VDisks to an already populated mdiskgrp with other types of VDisks, such as a striped or sequential VDisk.
| Note: An image mode VDisk
must be at least one extent in size (capacity can not be 0). That is, the
minimum size that can be specified for an image mode VDisk should be the same
as the MDisk group extent size that it will be added to, by default 16Mb.
The -mdisk flag must be used to specify an MDisk that has a mode of unmanaged. The -fmtdisk flag can not be used when creating an image mode VDisk. |
The command returns the IDs of the newly created VDisk.
| Attention: Do not create a VDisk in an offline I/O group. You must ensure the I/O group is online before creating a VDisk to avoid any data loss scenarios. This applies in particular to recreating VDisks that are assigned the same object ID. |
| Note: If you receive an error for this command that indicates that the licensed virtualization capacity has been exceeded, then the command was still effective. However, the return code will indicate the license violation. |
| Note: This error is also returned if a stripe set of MDisks has been specified and one or more of these MDisks does not contain enough free extents to complete the creation of the VDisk. In this case, the MDisk group will be reporting that it has enough free capacity to create the VDisk. You can check the free capacity on each MDisk by issuing the svcinfo lsfreeextents <mdiskname/ID> command. Alternatively, do not specify a stripe set and let the system choose the free extents automatically. |
An invocation example
svctask mkvdisk -mdiskgrp Group0 -size 0 -iogrp 0 -vtype striped -mdisk mdisk1 -node 1
The resulting output
Virtual Disk, id [1], successfully created
An invocation example for creating an image mode VDisk
svctask mkvdisk -mdiskgrp Group0 -iogrp 0 -vtype image -mdisk mdisk2 -node 1
The resulting output
Virtual Disk, id [2], successfully created