Symantec logo

Moving volumes onto disk partitions using VxVM

 To move volumes onto disk partitions

  1. Evacuate disks using the vxdiskadm program, VEA, or the vxevac script. You should consider the amount of target disk space required for this before you begin.

    Evacuation moves subdisks from the specified disks to target disks. The evacuated disks provide the initial free disk space for volumes to be moved to disk partitions.

  2. Remove the evacuated disks from VERITAS Volume Manager control using the following commands:

    # vxdg -g diskgroup rmdisk disk _media_name

    # vxdisk rm disk_access_name

  3. Decide which volume to move first. If the volume to be moved is mounted, unmount it.
  4. 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 is synced.
  5. Create a partition on free disk space of the same size as the volume. If there is not enough free space for the partition, a new disk must be added to the system for the first volume removed. Subsequent volumes can use the free space generated by the removal of this volume.
  6. Copy the data on the volume onto the newly created disk partition using a command similar to the following:

    # dd if=/dev/vx/dsk/diskgroup/lhome of=/dev/sdb2

    where sdb is the disk outside of VERITAS Volume Manager and 2 is the newly created partition on that disk.

  7. Replace the entry for that volume (if present) in /etc/fstab with an entry for the newly created partition.
  8. Mount the disk partition if the corresponding volume was previously mounted.
  9. Stop the volume and remove it from VERITAS Volume Manager using the following commands:

    # vxvol -g diskgroup -f stop volume_name

    # vxedit -g diskgroup -rf rm volume_name

  10. Remove any disks that have become free (have no subdisks defined on them) by removing volumes from VERITAS Volume Manager control. To check if there are still some subdisks remaining on a particular disk, use the following command:

    # vxprint -F "%sdnum" disk_media_name

  11. If the output is not 0, there are still some subdisks on this disk that must be subsequently removed. If the output is 0, remove the disk from VERITAS Volume Manager control using the following commands:

    # vxdg -g diskgroup rmdisk disk _media_name

    # vxdisk rm disk_access_name

  12. The free space now created can be used for adding the data in the next volume to be removed.
  13. After all volumes have been converted into disk partitions successfully, reboot the system. After the reboot, none of the volumes should be open. To verify that none of the volumes are open, use the following command:

    # vxprint -Aht -e v_open

  14. If any volumes remain open, repeat the steps listed above.