Veritas Volume Manager 5.0 Administrator's Guide (September 2006)
281Administering volumes
Removing a volume
Removing a volume
Once a volume is no longer necessary (it is inactive and its contents have been archived,
for example), it is possible to remove the volume and free up the disk space for other uses.
To stop all activity on a volume before removing it
1 Remove all references to the volume by application programs, including shells, that
are running on the system.
2 If the volume is mounted as a file system, unmount it with this command:
# umount /dev/vx/dsk/diskgroup/volume
3 If the volume is listed in the /etc/fstab file, remove its entry by editing this file.
Refer to your operating system documentation for more information about the format
of this file and how you can modify it.
4 Stop all activity by VxVM on the volume with the command:
# vxvol [-g diskgroup] stop volume
After following these steps, remove the volume with the vxassist command:
# vxassist [-g diskgroup] remove volume volume
Alternatively, you can use the vxedit command to remove a volume:
# vxedit [-g diskgroup] [-r] [-f] rm volume
The -r option to vxedit indicates recursive removal. This removes all plexes associated
with the volume and all subdisks associated with those plexes. The -f option to
vxedit
forces removal. This is necessary if the volume is still enabled.
Moving volumes from a VM disk
Before you disable or remove a disk, you can move the data from that disk to other disks
on the system that have sufficient space.
To move volumes from a disk
1 Select menu item 6 (Move volumes from a disk) from the vxdiskadm
main menu.
2 At the following prompt, enter the disk name of the disk whose volumes you wish to
move, as follows:
Move volumes from a disk
Menu: VolumeManager/Disk/Evacuate
Use this menu operation to move any volumes that are using a
disk onto other disks. Use this menu immediately prior to
removing a disk, either permanently or for replacement. You
can specify a list of disks to move volumes onto, or you can
move the volumes to any available disk space in the same disk
group.