Creating a FlashCopy consistency group and adding mappings using the CLI

You can use the command-line interface (CLI) to create and add mappings to a FlashCopy consistency group.

If you have created several FlashCopy mappings for a group of volumes that contain elements of data for the same application, it can be convenient to assign these mappings to a single FlashCopy consistency group. You can then issue a single prepare or start command for the whole group. For example, you can copy all of the files for a database at the same time.

To add FlashCopy mappings to a new FlashCopy consistency group, complete the following steps.

  1. Issue the mkfcconsistgrp CLI command to create a FlashCopy consistency group.

    The following CLI command is an example of the command you can issue to create a FlashCopy consistency group:

    mkfcconsistgrp -name FCcgrp0 -autodelete

    Where FCcgrp0 is the name of the FlashCopy consistency group. The -autodelete parameter specifies to delete the consistency group when the last FlashCopy mapping is deleted or removed from the consistency group.

  2. Issue the lsfcconsistgrp CLI command to display the attributes of the group that you have created.

    The following CLI command is an example of the command you can issue to display the attributes of a FlashCopy consistency group:

    lsfcconsistgrp -delim : FCcgrp0
    The following output is an example of the output that is displayed:
    id:1 
    name:FCcgrp0 
    status:idle_or_copied 
    autodelete:on 
    FC_mapping_id:0 
    FC_mapping_name:fcmap0 
    FC_mapping_id:1 
    FC_mapping_name:fcmap1
    Note: For any group that has just been created, the status reported is empty
  3. Issue the chfcmap CLI command to add FlashCopy mappings to the FlashCopy consistency group:

    The following CLI commands are examples of the commands you can issue to add Flash Copy mappings to the FlashCopy consistency group:

    chfcmap -consistgrp FCcgrp0 main1copy
    chfcmap -consistgrp FCcgrp0 main2copy

    Where FCcgrp0 is the name of the FlashCopy consistency group and main1copy, main2copy are the names of the FlashCopy mappings.

  4. Issue the lsfcmap CLI command to display the new attributes of the FlashCopy mappings.

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

    lsfcmap -delim :
    id:name:source_vdisk_id:source_vdisk_name:target_vdisk_id:
    target_vdisk_name:group_id:group_name:status:progress:copy_rate
    0:main1copy:28:maindisk1:29:bkpdisk1:1:FCcgrp0:idle_copied::75
    1:main2copy:30:maindisk2:31:bkpdisk2:1:FCcgrp0:idle_copied::50
  5. Issue the lsfcconsistgrp CLI command to display the detailed attributes of the group.

    The following CLI command is an example of the command that you can issue to display detailed attributes:

    lsfcconsistgrp -delim : FCcgrp0

    Where FCcgrp0 is the name of the FlashCopy consistency group, and -delim specifies the delimiter.

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

    id:1
    name:FCcgrp0
    status:idle_or_copied
    autodelete:off
    FC_mapping_id:0
    FC_mapping_name:main1copy
    FC_mapping_id:1
    FC_mapping_name:main2copy