How to remove/delete a Veritas volume

 

If you no longer need an existing Veritas volume then removing it will free up the disk space for other uses.

In this example the veritas volume is named app2vol, it is mounted on /app2 and is in the diskgroup appdg.

1. Check to see what the maximum available space for growth of another volume in the same disk group (app1vol in this case) is currently set to by typing

vxassist -g appdg maxgrow app1vol
(The value in brackets returned by this command is the maximum potential growth of this volume)

2. Unmount the volume by typing

umount /app2

3. Edit /etc/vfstab and remove the entry for this volume. (/etc/vfstab in Solaris is the filesystem table used to automatically mount filesystems on boot).

4. Ensure the volume is stopped by typing

vxvol -g appdg stop app2vol

5. Remove the volume by typing

vxassist -g appdg remove volume app2vol

6. Check to see if the maximum available space for growth of another volume (app1vol in this case) in the same disk group has increased by typing

vxassist -g appdg maxgrow app1vol
(You should see the maximum growth of this volume (the value in brackets) has increased)

If required this additional space can be used to increase the size of another volume, in this case app3vol.

To increase the size of app3vol in the diskgroup appdg by 8G type the following

/usr/lib/vxvm/bin/vxresize -g appdg app3vol +8G