You can use the following steps to move data off of VxVM volumes.
To move data off of VxVM volumes
Remove the evacuated disks from Veritas Volume Manager control using the following commands:
# vxdg -g diskgroup rmdisk disk_media_name # /usr/lib/vxvm/bin/vxdiskunsetup -C disk_access_name # vxdisk rm disk_access_name
# vxdg -g mydg rmdisk mydg01 # /usr/lib/vxvm/bin/vxdiskunsetup -C hdisk1 # vxdisk rm hdisk01
Decide which volume to move first. If the volume to be moved is mounted, unmount it. If the volume is being used as a raw partition for database applications, make sure that the application is not updating the volume and that data on the volume has been synchronized.
On the free disk space, create an LVM logical volume that is the same size as the VxVM volume. If there is not enough free space for the logical volume, add a new disk to the system for the first volume to be removed. For subsequent volumes, you can use the free space generated by the removal of the first volume.
Copy the data on the volume onto the newly created LVM logical volume using the following command:
# dd if=/dev/vx/dsk/diskgroup/volume of=/dev/vgvol
where diskgroup is the name of a VxVM disk group, volume is the old volume in that disk group, and vgvol is a newly created LVM volume.
If the volume contains a VxFS file system, the user data managed by VxFS in the volume must be backed up or copied to a native AIX file system in an LVM logical volume.
The entries in /etc/filesystems for volumes holding VxFS file systems, that were copied to native file systems in step 5, must be modified according to the change in step 5.
Mount the disk if the corresponding volume was previously mounted.
Remove the volume from VxVM using the following command:
# vxedit -g diskgroup -rf rm volume
Remove any disks that have become free (have no subdisks defined on them) by removing volumes from VxVM control. To check if there are still some subdisks remaining on a particular disk, use the following command:
# vxprint -g diskgroup -F "%sdnum" disk_media_name
If the return code is not 0, there are still some subdisks on this disk that must be subsequently removed. If the return code is 0, remove the disk from VxVM control using the following commands:
# vxdg -g diskgroup rmdisk disk_media_name # vxdisk rm disk_access_name
Copy the data in the next volume to be removed to the newly created free space.
Reboot the system after all volumes have been converted successfully. Verify that no open volumes remain after the system reboot using the following command:
# vxprint -Aht -e v_open