Migrating VDisks between MDisk groups using the CLI Advanced functions with the CLI Migrating a VDisk between I/O groups using the CLI

This task provides step-by-step instructions for migrating VDisks between MDisk groups.

You can determine the usage of particular MDisks by gathering I/O statistics about MDisks and VDisks. Once you have gathered this data, you can analyze it to determine which VDisks or MDisks are hot. This procedure then takes you through migrating VDisks from one MDisk group to another.

When a migrate command is issued, a check is made to ensure that the destination of the migrate has enough free extents to satisfy the command. If it does, the command proceeds, but will take some time to complete. During this time, it is possible for the free destination extents to be consumed by another process, for example, by creating a new VDisk in the destination MDisk group or by starting more migrate commands. In this scenario, when all the destination extents have been allocated the migration commands suspend and an error is logged (error id 020005). There are two methods for recovering from this situation:

  1. Add additional MDisks to the target MDisk group. This provides additional extents in the group and allows the migrations to be restarted. You will need to mark the error as fixed in order to reattempt the migration.
  2. Migrate one or more VDisks that are already created from the MDisk group to another group. This will free up extents in the group and allow the original migrations to be restarted (again by marking the error as fixed).
Steps

Perform the following steps to migrate VDisks between MDisk groups:

  1. Isolate any VDisks that are overutilized. You can determine this by requesting an I/O statistics dump and analyzing the output. To start I/O statistics gathering, issue the following command:
    svctask startstats -interval 15
  2. This will generate a new I/O statistics dump file approximately every 15 minutes. Wait for at least 15 minutes after issuing the svctask startstats command and then issue the following command:
    svcinfo lsiostatsdumps
    This will list the I/O statistics files that have been generated. These are prefixed with m and Nm for MDisk statistics and v for VDisk statistics.
  3. Use secure copy (scp) to retrieve the dumps files for analyzing. For example, issue the following:
    <AIX HOST PROMPT#>scp <clusterip>:/dumps/iostats/v_*
    This will copy all the VDisk statistics files to the AIX host in the current directory.
  4. Analyze the dumps to determine which VDisks are hot. It may be helpful to also determine which MDisks are being heavily utilized as you can spread the data they contain more evenly across all the MDisks in the group by migrating the extents.
  5. Stop the statistics collection again. Issue the following command:
    svctask stopstats
    Once you have analyzed the I/O statistics data, you can determine which VDisks are hot. You also need to determine which MDisk group you wish to move this VDisk to. Either create a new MDisk group or determine an existing group that is not yet over utilized. You can do this by checking the I/O statistics files generated above and ensuring that the MDisks or VDisks in the target MDisk group are less utilized than the source group.
  6. After having determined which VDisk you wish to migrate, and the new MDisk group you wish to migrate it to, issue the following command:
    svctask migratevdisk -vdisk <vdiskname/ID> -mdiskgrp
    <newmdiskgrname/ID> -threads 4

  7. You can check the progress of the migration by issuing the following command:
    svcinfo lsmigrate
Related topics Advanced functions with the CLI Migrating a VDisk between I/O groups using the CLI

(C) Copyright International Business Machines Corporation 2003, 2004