mkvdisk

The mkvdisk command creates sequential, striped, or image mode virtual disk objects. When they are mapped to a host object, these objects are seen as disk drives with which the host can perform I/O operations.

Note: The first syntax diagram depicts the creation of a striped mode virtual disk. The second syntax diagram depicts the creation of a sequential or image mode virtual disk.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- svctask -- mkvdisk ----------------------------------------->

>-- -mdiskgrp --+-mdisk_group_id_list---+----------------------->
                '-mdisk_group_name_list-'   

>-- -iogrp --+-io_group_id---+-- -size --disk_size-------------->
             '-io_group_name-'                       

>--+------------+----------------------------------------------->
   '- -fmtdisk -'   

>--+----------------------------------------------------------------------------------------------------------------------------+-->
   '- -rsize --+-disk_size-------------+--+--------------------------------------+--+---------------+--+----------------------+-'   
               +-disk_size_percentage%-+  '- -warning -+-disk_size-------------+-'  '- -autoexpand -'  |              .-32--. |     
               '-auto------------------'               '-disk_size_percentage%-'                       '- -grainsize -+-64--+-'     
                                                                                                                      +-128-+       
                                                                                                                      '-256-'       

>--+-----------+--+-----------------------+--------------------->
   '- -import -'  '- -copies --num_copies-'   

>--+-------------------+--+---------------+--------------------->
   '- -syncrate --rate-'  '- -createsync -'   

>--+---------------------+--+-----------------------+----------->
   '- -udid --vdisk_udid-'  '- -vtype ----striped---'   

>--+-------------------------------+---------------------------->
   '- -mdisk --+-mdisk_id_list---+-'   
               '-mdisk_name_list-'     

>--+------------------------+--+-----------------+-------------->
   '- -node --+-node_name-+-'  |          .-mb-. |   
              '-node_id---'    '- -unit --+-b--+-'   
                                          +-kb-+     
                                          +-gb-+     
                                          +-tb-+     
                                          '-pb-'     

>--+-----------------------+--+-------------------------+------><
   '- -name --new_name_arg-'  |           .-readwrite-. |   
                              '- -cache --+-none------+-'   

Read syntax diagramSkip visual syntax diagram
>>- svctask -- mkvdisk ----------------------------------------->

>-- -mdiskgrp --+-mdisk_group_id_list---+----------------------->
                '-mdisk_group_name_list-'   

>-- -iogrp --+-io_group_id---+--+------------+------------------>
             '-io_group_name-'  '- -fmtdisk -'   

>--+----------------------------------------------------------------------------------------------------------------------------+-->
   '- -rsize --+-disk_size-------------+--+--------------------------------------+--+---------------+--+----------------------+-'   
               +-disk_size_percentage%-+  '- -warning -+-disk_size-------------+-'  '- -autoexpand -'  |              .-32--. |     
               '-auto------------------'               '-disk_size_percentage%-'                       '- -grainsize -+-64--+-'     
                                                                                                                      +-128-+       
                                                                                                                      '-256-'       

>--+-----------+--+-----------------------+--------------------->
   '- -import -'  '- -copies --num_copies-'   

>--+-------------------+--+---------------+--------------------->
   '- -syncrate --rate-'  '- -createsync -'   

>--+----------------------+------------------------------------->
   '- -udid  --vdisk_udid-'   

>--+---------------------------------------------------+-------->
   '- -vtype --+-seq---+-- -mdisk -+-mdisk_id_list---+-'   
               '-image-'           '-mdisk_name_list-'     

>--+------------------------+--+-----------------+-------------->
   '- -node --+-node_name-+-'  |          .-mb-. |   
              '-node_id---'    '- -unit --+-b--+-'   
                                          +-kb-+     
                                          +-gb-+     
                                          +-tb-+     
                                          '-pb-'     

>--+-----------------------+--+-------------------------+------><
   '- -name --new_name_arg-'  |           .-readwrite-. |   
                              '- -cache --+-none------+-'   

Parameters

-mdiskgrp mdisk_group_id_list | mdisk_group_name_list
(Required) Specifies one or more managed disk groups to use when you are creating this virtual disk. If you are creating multiple copies, you must specify one managed disk group per copy. The primary copy is allocated from the first managed disk group in the list.
-iogrp io_group_id | io_group_name
(Required) Specifies the I/O group (node pair) with which to associate this virtual disk.
-udid vdisk_udid
(Optional) Specifies the unit number (udid) for the disk. The udid is an identifier that is required to support OpenVMS hosts; no other systems use this parameter. Valid options are a decimal number 0 - 32 767, or a hexadecimal number 0 - 0x7FFF. A hexadecimal number must be preceded by 0x (for example, 0x1234).
-size disk_size
(Required for sequential [seq] or striped VDisk creation) (Optional for image VDisk creation) Specifies the capacity of the virtual disk, which is used with the value of the unit. 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. However, an entire extent is reserved even if it is only partially used. The default capacity is in MB. You can specify a capacity of 0. Specify the size in bytes in multiples of logical block address (LBA) sizes.
Note: If you do not specify the -size parameter when you create an image mode disk, the entire MDisk capacity is used.
-rsize disk_size | disk_size_percentage%| auto
(Optional) Makes the VDisk space-efficient; otherwise, the VDisk is fully allocated. Specify the disk_size | disk_size_percentage value using an integer, or an integer immediately followed by the percent character (%). Specify the units for a disk_size integer using the -unit parameter; the default is MB. The -rsize value can be greater than, equal to, or less than the size of the VDisk. 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. Specifies a threshold at which a warning error log is generated for VDisk copies. A warning is generated 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. 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) Specifies that space-efficient copies automatically expand their real capacities by allocating new extents from their managed disk group. Requires that the -rsize parameter also be specified. 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 having the managed disk group to consume this reserved space first.

The parameter has no immediate effect on image mode copies. However, if the image mode copy is subsequently migrated to managed mode, the copy is then automatically expanded.

-grainsize 32 | 64 | 128 | 256
(Optional) Sets the grain size (KB) for a space-efficient VDisk. This parameter also requires that the -rsize parameter be specified. The default is 32 KB. If you are using the space-efficient VDisk in a FlashCopy® map, use the same grain size as the map grain size for best performance. If you are using the space-efficient VDisk directly with a host system, use a small grain size.
-import
(Optional) Imports a space-efficient VDisk from the Mdisk. This parameter also requires that the -rsize parameter be specified.
-copies num_copies 
(Optional) Specifies the number of copies to create. The num_copies value can be 1 or 2. Setting the value to 2 creates a mirrored VDisk. The default value is 1.
-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) Creates copies in sync. Use this parameter if you have already formatted the MDisks, or when read stability to unwritten areas of the VDisk is not required.
-fmtdisk
(Optional) Specifies that the virtual disk be formatted before it can be used. The -fmtdisk parameter 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; you can query the status using the svcinfo lsvdiskprogress command.

The -fmtdisk parameter is not required when creating space-efficient virtual disks. Space-efficient VDisks return zeros for extents that have not been written to.

The -fmtdisk parameter synchronizes mirrored copies by default.

Note: You cannot specify this parameter with the -vtype image parameter.
-vtype seq | striped | image
(Optional) Specifies the virtualization type. When creating sequential or image mode VDisks, you must also specify the -mdisk parameter. The default virtualization type is striped.
-node node_id | node_name
(Optional) Specifies the preferred node ID or the name for I/O operations to this virtual disk. You can use the -node parameter to specify the preferred access node.
Note: This parameter is required for the subsystem device driver (SDD). The cluster chooses a default if you do not supply this parameter.
-unit b | kb | mb | gb | tb | pb
(Optional) Specifies the data units to use in conjunction with the capacity that is specified by the -size and -rsize parameters.
-mdisk mdisk_id_list | mdisk_name_list
(Optional) Specifies one or more managed disks. For sequential and image mode VDisks, the number of MDisks must match the number of copies. For sequential mode VDisks, each MDisk must belong to the specified MDisk group. For striped VDisks, you cannot specify the -mdisk parameter if the -copies value is greater than 1. When creating a single copy striped VDisk, you can specify a list of MDisks to stripe across.
-name new_name_arg
(Optional) Specifies a name to assign to the new virtual disk.
-cache readwrite | none
(Optional) Specifies the caching options for the VDisk. Valid entries are readwrite or none. The default is readwrite. If you do not specify the -cache parameter, the default value (readwrite) is used.

Description

This command creates a new virtual disk object. You can use the command to create a variety of types of virtual disk objects, making it one of the most complex commands.

You must decide which managed disk group or groups 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. If you are creating a VDisk with more than one copy, each MDisk group that you specify must have enough space for the size of the VDisk.

Choose an I/O group for the VDisk. This determines which nodes in the cluster process the I/O requests from the host systems. If you have more than one I/O group, ensure that you distribute the VDisks between the I/O groups so that the I/O workload is shared evenly between all nodes. Use the svcinfo lsiogrp command to show the I/O groups and the number of virtual disks that are 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 processing can make copies of VDisks whether the source and target VDisks are in the same I/O group. If, however, you plan to use intracluster Metro or Global Mirror operations, ensure that both the master and auxiliary VDisk are in the same I/O group.
Specify the virtualization type using the -vtype parameter; the supported types are sequential (seq), striped, and image.
sequential (seq)
This virtualization type creates the virtual disk using sequential extents from the specified MDisk (or MDisks, if creating multiple copies). The command fails if there are not enough sequential extents on the specified MDisk.
striped
This is the default virtualization type. If the -vtype parameter is not specified, striped is the default; 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 -mdisk 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 the managed mode.

A capacity of 0 is allowed.

image
This virtualization type 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, with the exception of space-efficient image mode VDisks, 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 VDisk must be 512 bytes or greater. At least one extent is allocated to an image mode VDisk.

You must use the -mdisk parameter to specify an MDisk that has a mode of unmanaged. The -fmtdisk parameter cannot be used to create an image mode VDisk.

Note: If you create a mirrored VDisk from two image mode MDisks without specifying a -capacity value, the capacity of the resulting VDisk is the smaller of the two MDisks, and the remaining space on the larger MDisk is not accessible.
The command returns the IDs of the newly created VDisk.
Attention:
  1. Do not create a VDisk in an offline I/O group. You must ensure that the I/O group is online before you create a VDisk to avoid any data loss. This applies in particular to recreating VDisks that are assigned the same object ID.
  2. To create an image mode disk, you must already have a quorum disk in the cluster because an image mode disk cannot be used to hold quorum data. See "Creating a quorum disk" in the IBM® System Storage® SAN Volume Controller Software Installation and Configuration Guide for more details.
  3. The command fails if either limit of 2048 VDisks per I/O Group or 8192 VDisk copies per cluster is reached.

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

An invocation example for creating a new VDisk

svctask mkvdisk -mdiskgrp Group0 -size 0 -unit kb 
-iogrp 0 -vtype striped -mdisk mdisk1 -node 1 -udid 1234

The resulting output

Virtual Disk id [2], successfully created 

An invocation example for creating a space-efficient VDisk

svctask mkvdisk -mdiskgrp Group0 -iogrp 0 -vtype striped 
-size 10 -unit gb -rsize 20% -autoexpand -grainsize 32 

The resulting output

Virtual Disk id [1], successfully created 

An invocation example for creating a mirrored image-mode VDisk

svctask mkvdisk -mdiskgrp Group0:Group0 -mdisk mdisk2:mdisk3 
-iogrp 0 -vtype image -copies 2

The resulting output

Virtual Disk id [1], successfully created 
An invocation example for creating a mirrored VDisk
svctask mkvdisk -iogrp 0 -mdiskgrp 0:1 -size 500 -copies 2

The resulting output

Virtual Disk id [5], successfully created 
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2003, 2009. All Rights Reserved.