Migrating extents using the CLI
This task provides step-by-step
instructions about how to migrate extents to improve performance.
The SAN Volume Controller provides various data migration features. These can be used to
move the placement of data both within MDisk groups
and between MDisk groups. These features can be used
concurrent with I/O operations. There are two ways in which you can migrate
data:
- Migrating data (extents) from one MDisk to another (within the same MDisk
group). This can be used to remove hot or overutilized MDisks.
- Migrating VDisks from one MDisk group to another. This can be used to
remove hot MDisk groups, for example, reduce the utilization of a group of
MDisks.
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 MDisks are hot. The procedure then takes you through
querying and migrating extents to elsewhere in the same MDisk group. This
procedure can only be performed using the command line tools.
To migrate extents to remove possible problems, perform the following:
- Isolate any MDisks 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:
svctask startstats -interval 15
- 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:
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.
- Use secure copy (scp) to retrieve the dumps files to analyze. For example,
issue the following:
<AIX HOST PROMPT#>scp <clusterip>:/dumps/iostats/m_*
This will copy all the MDisk statistics files to the AIX host
in the current directory.
- Analyze the dumps to determine which MDisks are hot. It may be helpful
to also determine which VDisks are being heavily utilized as you can spread
the data they contain more evenly across all the MDisks in the group using
the procedure below.
- Stop the statistics collection again by issuing the following command:
svctask stopstats
Steps
Once you have determined which MDisks are hot, you can migrate
some of the data onto some less hot MDisks within the same MDisk group.
-
Determine the number of extents that are in use by each
VDisk for the given MDisk. Issue the following command:
svcinfo lsmdiskextent <mdiskname>
This will return the number of extents that each VDisk is using
on the given MDisk. You should pick some of these to migrate elsewhere in
the group.
-
Determine the other MDisks that reside in the same MDisk
group.
- To determine the MDisk group that the MDisk belongs to, issue the following
command:
svcinfo lsmdisk <mdiskname/ID>
Look
for the mdisk_grp_name attribute.
- List the MDisks in the group by issuing the following command:
svcinfo lsmdisk -filtervalue mdisk_grp_name=<mdiskgrpname>
- Select one of these MDisks as the target MDisk for the extents. You can
determine how many free extents exist on an mdisk by issuing the following
command:
svcinfo lsfreeextents <mdiskname>
You can issue
the svcinfo lsmdiskextent <newmdiskname> command
for each of the target MDisks to ensure that you are not just moving the over-utilization
to another MDisk. Check that the VDisk that owns the set of extents to be
moved, (see step1), does not already own a large set
of extents on the target MDisk.
-
For each set of extents, issue the following command to move
them to another MDisk:
svctask migrateextents -source <mdiskname/ID> -exts
<num_extents_from_step1> -target <newmdiskname/ID>
-threads 4 <vdiskid_returned_from_step1>
where <num_extents_from_step1> is the number of extents on the <vdiskid_returned_from_step1>, that is, the data that is returned
from the command issued in step 1. <newmdiskname/ID> is the name or ID of the MDisk to which you want
to migrate this set of extents.
- Repeat steps 2 to 4 for all
the sets of extents you wish to move.
- You can check the progress of the migration(s) by issuing the following
command:
svcinfo lsmigrate