Creating volumes using the CLI

You can use the command-line interface (CLI) to create a volume.

Before you begin

If the volume that you are creating maps to a flash drive, the data that is stored on the volume is not protected against Flash drive failures or node failures. To avoid data loss, add a volume copy that maps to an Flash drive on another node.

This task assumes that the clustered system (system) has been set up and that you have created storage pools. You can establish an empty storage pool to hold the MDisks that are used for image mode volumes.

About this task

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

Procedure

To create volumes, complete the following steps.

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

    The following is an example of the CLI command that you can issue to list storage pools:

    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:easy_tier:easy_tier_status
    0:mdiskgrp0:degraded:4:0:34.2GB:16:34.2GB:0:0:0:0:0:auto:inactive
    1:mdiskgrp1:online:4:6:200GB:16:100GB:400GB:75GB:100GB:200:80:on:active
  2. Decide which storage pool you want to provide the storage for the volume.
  3. Issue the lsiogrp CLI command to show the I/O groups and the number of volumes assigned to each I/O group.
    Note: It is normal for systems with more than one I/O group to have storage pools that have volumes in different I/O groups. You can use FlashCopy® to make copies of volumes regardless of whether the source and target volume are in the same I/O group. If you plan to use intra-system Metro Mirror or Global Mirror, both the master and auxiliary volume must be in the same I/O group.

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

    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 volume to. This determines which FlashSystem™ V840 nodes in the system process the I/O requests from the host systems. If you have more than one I/O group, make sure you distribute the volumes between the I/O groups so that the I/O workload is shared evenly between all FlashSystem V840 nodes.
  5. Issue the mkvdisk CLI command to create a volume.

    The rate at which the volume copies will resynchronize after loss of synchronization can be specified using the syncrate parameter. Table 1 defines the rates.

    Table 1. Volume copy resynchronization rates
    Syncrate value Data copied per second
    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

    The default setting is 50. The synchronization rate must be set such that the volume copies will resynchronize quickly after loss of synchronization.

    The following is an example of the CLI command that you can issue to create a volume with two copies using the I/O group and storage pool name and specifying the synchronization rate:

    mkvdisk -iogrp io_grp1 -mdiskgrp grpa:grpb -size500 -vtype striped 
    -copies 2 –syncrate 90

    where io_grp1 is the name of the I/O group that you want the volume to use, grpa is the name of the storage pool for the primary copy of the volume and grpb is the name of the storage pool for the second copy of the volume, and 2 is the number of volume copies and the synchronization rate is 90 which is equivalent to 32MB per second.

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

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

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

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

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

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

    The following is an example of the CLI command that you can issue to create a thin-provisioned volume using the I/O group and storage pool name:

    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 volume to use and 20% is how much real storage to allocate to the volume, 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 volume with two copies using the I/O group and storage pool name:

    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 volume to use, grpa is the name of the storage pool for the primary copy of the volume and grpb is the name of the storage pool for the second copy of the volume, and 2 is the number of volume copies.

    Note: If you want to create two volume 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 lsvdisk CLI command to list all the volumes that have been created.