You can migrate virtual disks (VDisks) between managed
disk (MDisk) groups using the command-line interface (CLI).
You can determine the usage of particular
MDisks by gathering input/output (I/O) statistics about nodes, MDisks, and
VDisks. After you have gathered this data, you can analyze it to determine
which VDisks or MDisks are hot. You can then migrate VDisks from one
MDisk group to another.
Perform the following steps to gather
statistics about MDisks and VDisks:
- Isolate any VDisks that are overused. You can determine this by
requesting an I/O statistics dump and analyzing the output.
To start
I/O statistics gathering, issue the following CLI command:
svctask startstats -interval 15
This
command generates 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 command lists the I/O statistics files are generated on a per-node basis. These are prefixed with Nm for
MDisk statistics, Nv for VDisk statistics, and Nn for
node statistics.
- Use secure copy (scp command) to retrieve the dump files
for analyzing. For example, issue the following:
scp clusterip:/dumps/iostats/v_*
This
copies all the VDisk statistics files to the AIX® host in the current directory.
- Analyze the dumps to determine which VDisks are hot. It might
be helpful to also determine which MDisks are being used heavily as
you can spread the data that they contain more evenly across all the
MDisks in the group by migrating the extents.
- Stop the statistics collection again. Issue the following command:
svctask stopstats
After you analyze the I/O statistics data, you can determine
which VDisks are hot. You also need to determine the MDisk group that
you want to move this VDisk to. Either create a new MDisk group or
determine an existing group that is not yet overly used. To do this,
check the I/O statistics files that you generated and then ensure
that the MDisks or VDisks in the target MDisk group are used less
than those in the source group.
You can use data migration
or VDisk mirroring to migrate data between MDisk groups. Data migration
uses the command svctask migratevdisk. VDisk
mirroring uses the commands svctask addvdiskcopy and svctask
rmvdiskcopy.
When you issue the
svctask
migratevdisk command, a check is made to ensure that
the destination of the migration has enough free extents to satisfy
the command. If it does, the command proceeds. The command takes some
time to complete.
Notes: - You cannot use the SAN Volume Controller data
migration function to move a VDisk between MDisk groups that have
different extent sizes.
- Migration commands fail if the target or source
VDisk is offline, or if there is insufficient quorum disk space to
store the metadata. Correct the offline or quorum disk condition and
reissue the command.
When you use data migration, it is possible for
the free destination extents to be consumed by another process; for
example, if a new VDisk is created in the destination MDisk group
or if more migration commands are started. In this scenario, after
all the destination extents are allocated, the migration commands
suspend and an error is logged (error ID 020005). To recover from
this situation, use either of the following methods:
- Add additional MDisks to the target MDisk group. This provides
additional extents in the group and allows the migrations to be restarted.
You must mark the error as fixed before you reattempt the migration.
- Migrate one or more VDisks that are already created from the MDisk
group to another group. This frees up extents in the group and allows
the original migrations to be restarted.
Perform the following steps to use the svctask
migratevdisk command to migrate VDisks between MDisk
groups:
When you use data migration, the VDisk goes offline if
either MDisk group fails. VDisk mirroring can be used to minimize
the impact to the VDisk because the VDisk goes offline only if the
source MDisk group fails.
Perform the following steps to use
VDisk mirroring to migrate VDisks between MDisk groups:
- After you determine the VDisk that you want to migrate and the
new MDisk group that you want to migrate it to, issue the following
command:
svctask addvdiskcopy -mdiskgrp newmdiskgrname/ID vdiskname/ID
- The copy ID of the new copy is returned. The copies now synchronize
such that the data is stored in both MDisk groups. You can check the
progress of the synchronization by issuing the following command:
svcinfo lsvdisksyncprogress
- After the synchronization is complete, remove the copy from the
original I/O group to free up extents and decrease the utilization
of the MDisk group. To remove the original copy, issue the following
command:
svctask rmvdiskcopy -copy original copy id vdiskname/ID