mkvdisk

You can use the mkvdisk command to create sequential, striped or image mode virtual disk objects. Once mapped to a host object, these objects are seen as disk drives with which the host can perform I/O operations.
Note: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.

Syntax

Read syntax diagramSkip visual syntax diagram>>- 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 -'

Read syntax diagramSkip visual syntax diagram>>- 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 -'

Parameters

-mdiskgrp mdisk_group_id | mdisk_group_name
Specifies the managed disk group to use when creating this virtual disk.
-iogrp io_group_id | io_group_name
Specifies the I/O group (node pair) with which to associate this virtual disk.
-size disk_size
Specifies the capacity of the virtual disk, which is used in conjunction with the units value. The smallest granularity of bytes is 512. All capacities are rounded up to this value. However, an entire extent will be reserved even if only partial is used. You can specify a capacity of 0. The size in bytes should be in multiples of logical block address (LBAs). When creating an image mode disk, if this parameter is not specified, then the entire managed disk capacity will be used.
-fmtdisk
Optionally specifies that the virtual disk should be formatted before use. The -fmtdisk argument formats (sets to all zeros) the extents that make up this VDisk after it is created. If this parameter is used, the command completes asynchronously and you can query the status with the svcinfo command. This flag may not be used when creating an image mode VDisk.
-vtype seq | striped | image
Optionally specifies the virtualization policy. The default virtualization type is striped. Refer to the notes below for more information.
-node node_id | node_name
Optionally specifies the preferred node ID or name for I/O operations to this virtual disk. You can use the -node argument to specify the preferred access node. This argument is required for the subsystem device driver (SDD) and the SAN Volume Controller will choose a default if you do not supply this argument.
-unit b | kb | mb | gb | tb | pb
Optionally specifies the data units to be used in conjunction with the capacity (-size).
-mdisk mdisk_id_list | mdisk_name_list
Optionally specifies a list of one or more managed disks. This argument is used in conjunction with -vtype and has different uses depending upon the policy chosen. Refer to the notes below for more information.
-name new_name_arg
Optionally specifies a name to assign to the new virtual disk.
-instance instance
The VDisk instance number. This value overrides that which would be assigned automatically, and influences other numbers that may be assigned algorithmically later, such as the VDisk_UID of a vdiskhostmap.

Description

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: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:

Striped
This is the default policy. If the -vtype is not specified, then this policy is used in its default form. That is, all managed disks in the managed disk group will be used to create the virtual disk. The striping is at an extent level, in a circular fashion, 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 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.

Seq (Sequential)
This policy requires the -mdisk flag with a single managed disk as its argument. This MDisk must be in the managed mode.

It will create the virtual disk only using extents from the given managed disk (assuming there are enough free extents on the managed disk).

Image
Image mode virtual disks are a special case. These disks can be used 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 managed disk it was created from, therefore, virtual disk logical block address (LBA) x equals managed disk LBA x. This command can be used to bring a nonvirtualized disk under control of the cluster. The data can then be migrated from the single managed disk at which time the virtual disk is no longer an image mode virtual 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: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: 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.

Possible failures

Note: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.

Examples

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

Examples

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

(C) Copyright International Business Machines Corporation 2003, 2004

Related topics

(C) Copyright International Business Machines Corporation 2003, 2004