Description
This article provides several methods for moving volumes and subdisks to different disks.
Table of Contents
Introduction
Using vxevac to relocate all volumes on a disk
Using mirroring to relocate a single volume
Using vxmake and vxsd to manually relocate a subdisk
Introduction
(Back to top)
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.
Using vxevac to relocate all volumes on a disk
(Back to top)
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."
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
v locks - ENABLED ACTIVE 102400 SELECT - fsgen
pl locks-01 locks ENABLED ACTIVE 102400 CONCAT - RW
sd datadg05-01 locks-01 datadg05 0 102400 0 disk_8 ENA
v vol2 - ENABLED ACTIVE 204800 SELECT - fsgen
pl vol2-01 vol2 ENABLED ACTIVE 204800 CONCAT - RW
sd datadg05-02 vol2-01 datadg05 102400 204800 0 disk_8 ENA
v vol3 - ENABLED ACTIVE 204800 SELECT - fsgen
pl vol3-01 vol3 ENABLED ACTIVE 204800 CONCAT - RW
sd datadg05-03 vol3-01 datadg05 307200 204800 0 disk_8 ENA
After running vxevac, vxprint now shows that the volumes "locks," "vol2" and "vol3" have been relocated to disk "datadg06."
# vxevac -g datadg datadg05 datadg06
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
v locks - ENABLED ACTIVE 102400 SELECT - fsgen
pl locks-01 locks ENABLED ACTIVE 102400 CONCAT - RW
sd datadg06-01 locks-01 datadg06 0 102400 0 disk_9 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
v vol3 - ENABLED ACTIVE 204800 SELECT - fsgen
pl vol3-01 vol3 ENABLED ACTIVE 204800 CONCAT - RW
sd datadg06-03 vol3-01 datadg06 307200 204800 0 disk_9 ENA
|
Using mirroring to relocate a single volume
(Back to top)
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."
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
v locks - ENABLED ACTIVE 102400 SELECT - fsgen
pl locks-02 locks ENABLED ACTIVE 102400 CONCAT - RW
sd datadg05-01 locks-02 datadg05 0 102400 0 disk_8 ENA
Use vxassist to mirror the volume to disk "datadg06."
# vxassist -b -g datadg mirror locks alloc=datadg06
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.
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
v locks - ENABLED ACTIVE 102400 SELECT - fsgen
pl locks-01 locks ENABLED ACTIVE 102400 CONCAT - RW
sd datadg06-01 locks-01 datadg06 0 102400 0 disk_9 ENA
pl locks-02 locks ENABLED ACTIVE 102400 CONCAT - RW
sd datadg05-01 locks-02 datadg05 0 102400 0 disk_8 ENA
Vxtask can be used to check the status of a mirror resynchronization. If needed, it can also be used to pause, resume or abort the operation.
# vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
164 - ATCOPY/R 35.00% 0/819200/286720 PLXATT engvol engvol-02 datadg smartmove auto-throttled
[root@Server101 hrvol]# vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
164 - ATCOPY/R 48.00% 0/819200/393216 PLXATT engvol engvol-02 datadg smartmove auto-throttled
|
| b |
Use vxplex to remove the old plex. |
Syntax:
vxplex -g datadg -o rm dis
Example, with typical output:
# vxplex -g datadg -o rm dis locks-02
After removing the old plex, vxprint now shows that volume "locks" has only one plex, called "locks-01." It resides on disk "datadg06."
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
v locks - ENABLED ACTIVE 102400 SELECT - fsgen
pl locks-01 locks ENABLED ACTIVE 102400 CONCAT - RW
sd datadg06-01 locks-01 datadg06 0 102400 0 disk_9 ENA |
Using vxmake and vxsd to manually relocate a subdisk
(Back to top)
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.
- Disk "datadg05" is empty.
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
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.
# vxmake -g datadg sd datadg05-01 disk=datadg05 offset=102400 len=204800
# |
| b |
Use vxsd to relocate the data that is contained within the old subdisk into the new subdisk. |
Syntax:
vxsd -g mv
Example, with typical output:
Before running vxsd, vxprint shows an unattached "sd" (subdisk) record, named "datadg05-1."
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
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.
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
dm datadg05 disk_8 auto 65536 2027264 -
dm datadg06 disk_9 auto 65536 2027264 -
sd datadg06-02 - datadg06 102400 204800 - disk_9 ENA
v vol2 - ENABLED ACTIVE 204800 SELECT - fsgen
pl vol2-01 vol2 ENABLED ACTIVE 204800 CONCAT - RW
sd datadg05-01 vol2-01 datadg05 102400 204800 0 disk_8 ENA
Use vxedit to remove the old subdisk.
# vxedit -g datadg rm datadg06-02
#
Vxprint now shows that the old subdisk, "datadg06-02," has been removed.
# vxprint -ht
Disk group: datadg
dg datadg default default 1000 1336573086.38.Server101
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 datadg05-01 vol2-01 datadg05 102400 204800 0 disk_8 ENA
|