Migrating volumes between pools using the CLI
You can migrate volumes between pools using the command-line interface (CLI).
About this task
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.
- Use secure copy (scp command) to retrieve the dump files for analyzing. For example,
issue the following command:
This command copies all the volume statistics files to the AIX® host in the current directory.scp clusterip:/dumps/iostats/v_*
- 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 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.
- 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.
- 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
- 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:
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 -autodelete to automatically delete the original copy of the volume after the copies are synchronized.addvdiskcopy -mdiskgrp mdisk_group_name -autodelete vdisk_name
- 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