Description
This article provides several methods for moving volumes and subdisks to different disks.
This article is a part of a set about migrating volumes to new disk enclosures using Veritas Storage Foundation. Click here to start at the beginning: https://www.veritas.com/docs/000018274 |
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 <disk group> <source disk> <target disk> Example, with typical output: Notice that the vxprint output initially shows that volumes "locks," "vol2" and "vol3" reside on disk "datadg05."
After running
vxevac,
vxprint now shows that the volumes "locks," "vol2" and "vol3" have been relocated to disk "datadg06."
|
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 <disk group> mirror <volume> alloc=<new disk>
To mirror to any available disk in a specified disk enclosure: vxassist -b -g <disk group> mirror <volume> enclr:<new enclosure>
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.
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
Use
vxassist to mirror the volume to disk "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.
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.
|
b | Use vxplex to remove the old plex. | Syntax: vxplex -g datadg -o rm dis <old plex> 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 |
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 <disk group> sd <new_subdisk_name> disk=<diskname> offset=<starting offset in sectors> len=<length of current subdisk in sectors >Example, with typical output:
Notice that
vxprint initially shows the following information:
# vxprint -ht
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 <disk group> mv <old_subdisk> <new_subdisk> Example, with typical output:
Before running
vxsd,
vxprint shows an unattached "sd" (subdisk) record, named "datadg05-1."
# vxprint -ht
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 <disk group> -rf rm <old_subdisk> 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 Use vxedit to remove the old subdisk.
Vxprint now shows that the old subdisk, "datadg06-02," has been removed.
|