Creating VDisks using the CLI

You can use the command-line interface (CLI) to create a virtual disk (VDisk).

If the VDisk that you are creating maps to a solid-state drive (SSD), the data that is stored on the VDisk is not protected against SSD failures or node failures. To avoid data loss, add a VDisk copy that maps to an SSD on another node.

This task assumes that the cluster has been set up and that you have created managed disk (MDisk) groups. You can establish an empty MDisk group to hold the MDisks that are used for image mode VDisks.

Note: If you want to keep the data on an MDisk, create image mode VDisks. This task describes how to create a VDisk with striped virtualization.

Perform the following steps to create VDisks:

  1. Issue the svcinfo lsmdiskgrp CLI command to list the available MDisk groups and the amount of free storage in each group.

    The following is an example of the CLI command you can issue to list MDisk groups:

    svcinfo lsmdiskgrp -delim :
    

    The following is an example of the output that is displayed:

    id:name:status:mdisk_count:vdisk_count:capacity:extent_size:free_capacity:
    virtual_capacity:used_capacity:real_capacity:overallocation:warning
    0:mdiskgrp0:degraded:4:0:34.2GB:16:34.2GB:0:0:0:0:0
    1:mdiskgrp1:online:4:6:200GB:16:100GB:400GB:75GB:100GB:200:80
  2. Decide which MDisk group you want to provide the storage for the VDisk.
  3. Issue the svcinfo lsiogrp CLI command to show the I/O groups and the number of VDisks 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. You can use FlashCopy® to make copies of VDisks regardless of whether the source and target VDisk are in the same I/O group. If you plan to use intracluster Metro Mirror or Global Mirror, both the master and auxiliary VDisk must be in the same I/O group.

    The following is an example of the CLI command you can issue to list I/O groups:

    svcinfo lsiogrp -delim :

    The following is an example of the output that is displayed:

    id:name:node_count:vdisk_count:host_count
    0:io_grp0:2:0:2
    1:io_grp1:2:0:1
    2:io_grp2:0:0:0
    3:io_grp3:0:0:0
    4:recovery_io_grp:0:0:0
  4. Decide which I/O group you want to assign the VDisk 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, 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.
  5. Issue the svctask mkvdisk CLI command to create a VDisk. See the IBM® System Storage® SAN Volume Controller Command-Line Interface User's Guide for more information on this command.

    The following is an example of the CLI command you can issue to create a VDisk using the I/O group ID and MDisk group ID:

    svctask mkvdisk -name mainvdisk1 -iogrp 0
     -mdiskgrp 0 -vtype striped -size 256 -unit gb

    where mainvdisk1 is the name that you want to call the VDisk, 0 is the ID of the I/O group that want the VDisk to use, 0 is the ID of the MDisk group that you want the VDisk to use, and 256 is the capacity of the VDisk.

    The following is an example of the CLI command that you can issue to create a VDisk using the I/O group and MDisk group name:

    svctask mkvdisk -name bkpvdisk1 -iogrp io_grp1
    -mdiskgrp bkpmdiskgroup -vtype striped -size 256 -unit gb

    where bkpvdisk1 is the name that you want to call the VDisk, io_grp1 is the name of the I/O group that want the VDisk to use, bkpmdiskgroup is the name of the MDisk group that you want the VDisk to use, and 256 is the capacity of the VDisk.

    The following is an example of the the CLI command that you can issue to create a space-efficient VDisk using the I/O group and MDisk group name:

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

    where io_grp1 is the name of the I/O group that you want the VDisk to use and 20% is how much real storage to allocate to the VDisk, as a proportion of its virtual size. In this example, the size is 10 GB so that 2 GB will be allocated.

    The following is an example of the CLI command that you can issue to create a VDisk with two copies using the I/O group and MDisk group name:

    svctask mkvdisk -iogrp io_grp1 -mdiskgrp grpa:grpb 
    -size 500 -vtype striped -copies 2

    where io_grp1 is the name of the I/O group that you want the VDisk to use, grpa is the name of the MDisk group for the primary copy of the VDisk and grpb is the name of the MDisk group for the second copy of the VDisk, and 2 is the number of VDisk copies.

    Note: If you want to create two VDisk copies of different types, create the first copy using the mkvdisk command and then add the second copy using the addvdiskcopy command.
  6. Issue the svcinfo lsvdisk CLI command to list all the VDisks that have been created.
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2003, 2009. All Rights Reserved.