You can migrate volumes between pools 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 volumes. After you collect this data,
you can analyze it to determine which volumes or MDisks are hot. You
can then migrate volumes from one storage pool to
another.
Complete the following step to gather statistics about
MDisks and volumes:
- Use secure copy (scp command) to retrieve the dump files
for analyzing. For example, issue the following command:
scp clusterip:/dumps/iostats/v_*
This
command copies all the volume statistics files to the AIX host in the current directory.
- Analyze the memory dumps to determine which volumes 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 storage pool by migrating the extents.
After you analyze the I/O statistics data, you can determine
which volumes are hot. You also need to determine the storage
pool that you want to move this volume to.
Either create a new storage pool or determine
an existing group that is not yet overly used. Check the I/O statistics
files that you generated and then ensure that the MDisks or volumes
in the target storage pool are used less than
the MDisks or volumes in the source storage pool.
You can use
data migration or volume mirroring to migrate
data between storage pools. Data migration uses the command migratevdisk. Volume mirroring uses the commands addvdiskcopy and rmvdiskcopy.
Migrating data using migratevdisk
You can use the
migratevdisk command to migrate data between two storage
pools. When you issue the
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 data migration function to move a volume between storage pools that have different extent sizes.
- Migration
commands fail if the target or source volume is offline, there is no quorum disk defined, or the
defined quorum disks are unavailable. Correct the offline or quorum disk condition and reissue the
command.
- The system supports migrating volumes between child pools within the
same parent pool or migrating a volume in a child pool to its parent pool. Migration of volumes
fails if source and target child pools have different parent pools. However, you can use
addvdiskcopy and rmvdiskcopy commands to migrate volumes
between child pools in different parent pools.
When you use data migration, it is possible for the
free destination extents to be consumed by another process; for example,
if a new
volume is created in the destination
parent pool 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 more MDisks to the target parent pool,
which provides more 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 volumes that are already created from the parent pool to another group. This action frees
up extents in the group and allows the original migrations to be restarted.
Complete the following steps to use the
migratevdisk command
to migrate
volumes between
storage
pools:
- After you determine the volume that you want to migrate and the new storage pool that you want to migrate it to, issue the following CLI command:
migratevdisk -vdisk vdisk_name
-mdiskgrp
mdisk_group_name -threads 4
- You can check the progress of the migration by issuing the following
CLI command:
lsmigrate
Migrating data using volume mirroring
When
you use data migration, the
volume goes offline
if either pool fails.
Volume mirroring can
be used to minimize the impact to the
volume because
the
volume goes offline only if the source
pool fails.
You can migrate volumes between child pools or from
a child pool to a parent pool using the addvdiskcopy and rmvdiskcopy commands
instead of using the migratevdisk command.Complete
the following steps to use
volume mirroring
to migrate
volumes between pools:
- After you determine the volume that you want to migrate and
the new pool that you want to migrate it to, enter the following
command:
addvdiskcopy -mdiskgrp mdisk_group_namevdisk_name -autodelete yes
where
mdisk_group_name is the name of the new storage pool and
vdisk_name is the name of the volume that is being copied. Specify
yes for the -autodelete to automatically delete the original
copy of the volume after the copies are synchronized.
- The copy ID of the new copy is returned. The copies now synchronize
such that the data is stored in both storage pools.
You can check the progress of the synchronization by issuing the following
command:
lsvdisksyncprogress