Several methods are available for moving volumes to new disks. While all of these methods can be performed without disabling access to the volume, consideration should given for the performance degradation that may occur as data is being copied across multiple disks, or arrays. For this reason, the migration of critical volumes should be performed during off-peak hours.
Vxevac is a simple tool that relocates all of the data that resides on one disk to another disk.
For moving a single volume to another disk, a mirror can be created between the target disk and the source disk. Once the mirror has finished synchronizing, the old plex can be removed, leaving only the copy of the volume on the new disk.
Note: A plex is a complete copy of the data. A volume that has two "plexes," has two copies of the data.
If a greater degree of granularity is required, vxmake and vxsd can be used to relocate a single subdisk.
A simple method for relocating data is to use vxevac to "evacuate" all of the data that resides one disk to another disk. If a volume spans multiple disks, only the portion of the volume that resides on the specified disk is relocated.
Table 1 - Using vxevac to relocate all of the volumes on a disk
Syntax:
vxevac -g
Example, with typical output:
Notice that the vxprint output initially shows that volumes "locks," "vol2" and "vol3" reside on disk "datadg05."
An easy way to relocate a single volume is to mirror the volume to another disk. Once the mirror synchronization complete, remove the original plex, leaving only the new copy of the volume, on the new disk.
Table 2 - Using vxassist to mirror a volume and remove the old plex
Step
Description
Syntax and Examples
a
Use vxassist to mirror the volume to another disk.
Syntax:
To mirror to a specified disk:
vxassist -b -g mirror alloc=
To mirror to any available disk in a specified disk enclosure:
vxassist -b -g mirror enclr:
Notice that when specifying an enclosure, a colon is used instead of an equal sign.
A list of enclosures, along with the disks that they contain, can be generated with vxdmpadm getdmpnode.
Example, with typical output:
Initially, vxprint shows that volume "locks" only resides on disk "datadg05." Since the volume is not yet mirrored, there is only a single plex, called "locks-02."
After mirroring the volume, vxprint now shows that volume "locks" has two plexes, called "locks-02" and "locks-01." They reside on disks "datadg05" and "datadg06," respectively.
Vxmake and vxsd can be used to migrate a subdisk. Generally, vxevac or volume mirroring are the preferred methods for moving data. But, if a greater degree of granularity is required, vxmake and vxsd can be used to relocate a single subdisk.
Note: A subdisk is a contiguous portion of a volume. When a volume spans more than one disk, it is broken into subdisks, allowing it to reside on multiple disks.
Table 3 - Using vxmake and vxsd to manually relocate a subdisk
Step
Description
Syntax and Examples
a
Use vxmake to create a new, empty subdisk on the target disk.
Syntax:
vxmake -g sd disk= offset= len=>
Example, with typical output:
Notice that vxprint initially shows the following information:
Subdisk "datadg06-02" is located on disk "datadg06."
The offset for subdisk "datadg06-02" is 102400.
The length of the subdisk "datadg06-02" is 204800.
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
v vol2 - ENABLED ACTIVE 204800 SELECT - fsgen pl vol2-01 vol2 ENABLED ACTIVE 204800 CONCAT - RW sd datadg06-02 vol2-01 datadg06 102400 204800 0 disk_9 ENA
Use vxmake to create a new, empty subdisk on disk "datadg05." For this example, we will use the same offset and length.
Note: While it is not required to use the same offset for the new subdisk, ensure that there are no existing volumes currently located where the new subdisk is being created.
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
sd datadg05-01 - datadg05 102400 204800 - disk_8 ENA
v vol2 - ENABLED ACTIVE 204800 SELECT - fsgen
pl vol2-01 vol2 ENABLED ACTIVE 204800 CONCAT - RW
sd datadg06-02 vol2-01 datadg06 102400 204800 0 disk_9 ENA
Using vxsd to move the information contained within subdisk "datadg06-02" to "datadg05-01."
# vxsd -g datadg mv datadg06-02 datadg05-01
#
c
Use vxedit to remove the old, now empty, subdisk.
Syntax:
vxedit -g -rf rm
Example, with typical output:
Before using vxedit to remove the old subdisk, use vxprint to confirm that the subdisks have been swapped.
Based on the vxprint output in this example, the new subdisk, "datadg05-01," is now associated with volume "vol2." The old subdisk, "datadg06-01," is unattached and can now be removed.