Create virtual disks (VDisks) Scenario: typical usage for the command-line interface Creating host objects using the CLI

This task provides step-by-step instructions about how to create a VDisk.

Note:Note: If you want to keep the data on a MDisk (for example because you want to want to import storage that was previously not managed by a SAN Volume Controller) then you should create image mode VDisks instead.

This task only deals with creating VDisks with a striped virtualization policy. For details of other virtualization policies refer to the IBM TotalStorage Subsystem Device Driver: User's Guide.

Context

Assume that the cluster has been setup and that you have created managed disk groups. You must establish an empty managed disk group to hold the MDisks used for image mode VDisks.

Steps

Perform the following steps to create VDisks:

  1. Open a command prompt window.
  2. 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.
    Example

    In our hypothetical scenario, issue the following:

    svcinfo lsmdiskgrp -delim :
    
    

    This command displays the following:
    id:name:status:mdisk_count:vdisk_count:
    capacity:extent_size:free_capacity
    0:mainmdiskgroup:online:4:0:1093.2GB:32:1093.2GB
    1:bkpmdiskgroup:online:4:0:546.8GB:32:546.8GB


  3. 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.
    Example

    In our hypothetical scenario, there are two I/O groups each with two nodes. Neither I/O group has any virtual disks yet. Issue the following command:
    svcinfo lsiogrp -delim :
    This command displays the following:
    id:name:node_count:vdisk_count
    0:io_grp0:2:0
    1:io_grp1:2:0
    2:io_grp2:0:0
    3:io_grp3:0:0
    4:recovery_io_grp:0:0


  4. Type the svctask mkvdisk command to create a virtual disk (VDisk).
    Example

    In our hypothetical scenario, the command to create a VDisk is:
    svctask mkvdisk -name mainvdisk1 -iogrp 0
    -mdiskgrp 0 -vtype striped -size 256 -unit gb


    This command will create a VDisk called mainvdisk1, the VDisk will use I/O group 0 and MDisk group 0 (the ID of maindiskgroup as shown in the output from step 2). The VDisk capacity is 256GB and will be made up of extents from the MDisks in the MDisk group.

    Example

    In our hypothetical scenario, the command to create a second VDisk is:

    Note:Note: This command is the same as the above example, however, here we are specifying the names of the objects instead of the IDs.

    svctask mkvdisk -name mainvdisk2 -iogrp io_grp0
    -mdiskgrp maindiskgroup -vtype striped -size 256 -unit gb

    This command will create a VDisk called mainvdisk2, the Vdisk will use the I/O group named io_grp0 and the MDisk group named maindiskgroup. The VDisk capacity is 256GB and will be made up of extents from the MDisks in the MDisk group.

    Example

    In our hypothetical scenario, the commands to create a third VDisk is:

    Note:Note: This virtual disk is created with an ordered list of MDisks within the MDisk group to allocate extents from.

    The following command lists the managed disks in the MDisk group with ID 1 (named bkpmdiskgroup):
    svcinfo lsmdisk -delim : -filtervalue mdisk_grp_id=1

    This command displays the following:
    id:name:status:mode:mdisk_grp_id:
    mdisk_grp_name:capacity:ctrl_LUN_#:
    controller_name
    4:mdisk4:online:managed:1:bkpmdiskgroup:
    136.7GB:0000000000000004:controller0
    5:mdisk5:online:managed:1:bkpmdiskgroup:
    136.7GB:0000000000000005:controller0
    6:mdisk6:online:managed:1:bkpmdiskgroup:
    136.7GB:0000000000000006:controller0
    7:mdisk7:online:managed:1:bkpmdiskgroup:
    136.7GB:0000000000000007:controller0


    Issue the following command:
    svctask mkvdisk -name bkpvdisk1 -iogrp io_grp1
    -mdiskgrp bkpmdiskgrp -vtype striped -size 256
    -unit gb -mdisk 4:5

    This command will create a VDisk called bkpvdisk1, the Vdisk will use the I/O group named io_grp1 and the MDisk group named bkpmdiskgrp. The VDisk capacity is 256GB and will be made up of extents allocated from the mdisks with IDs 4 and 5.

    Example

    In our hypothetical scenario, the command to create a fourth VDisk is:
    svctask mkvdisk -name bkpvdisk2 -iogrp io_grp1
    -mdiskgrp bkpmdiskgrp -vtype striped -size 256 -unit
    gb -mdisk mdisk6:mdisk7

    This command will create a VDisk called bkpvdisk2, the Vdisk will use the I/O group named io_grp1 and the MDisk group named bkpmdiskgrp. The VDisk capacity is 256GB and will be made up of extents allocated from the mdisks with names mdisk6 and mdisk7.

  5. To list all the virtual disks that have been created use the svcinfo lsvdisk command.
    Example

    In our hypothetical scenario we have created four VDisks. Issue the following command:
    svcinfo lsvdisk -delim :
    This command displays the following:
    id:name:IO_group_id:IO_group_name:status:
    mdisk_grp_id:mdisk_grp_name:capacity:type:FC_id:
    FC_name:RC_id:RC_name
    0:mainvdisk1:0:io_grp0:online:0:mainmdiskgroup:
    512.0GB:striped::::
    1:mainvdisk2:0:io_grp0:online:0:mainmdiskgroup:
    512.0GB:striped::::
    2:bkpvdisk1:1:io_grp1:online:1:bkpmdiskgroup:
    512.0GB:striped::::
    3:bkpvdisk2:1:io_grp1:online:1:bkpmdiskgroup:
    512.0GB:striped::::


Related topics Scenario: typical usage for the command-line interface Creating host objects using the CLI

(C) Copyright International Business Machines Corporation 2003, 2004