Resizing a volume

Resizing a volume changes its size. For example, if a volume is too small for the amount of data it needs to store, you can increase its length . To resize a volume, use one of the following commands: vxresize (preferred), vxassist, or vxvol. You can also use the graphical Veritas Enterprise Administrator (VEA) to resize volumes.

Note:

You cannot use VxVM commands, Storage Foundation Manager (SFM), or VEA to resize a volume or any underlying file system on an encapsulated root disk. This is because the underlying disk partitions also need to be reconfigured. If you need to resize the volumes on the root disk, you must first unencapsulate the root disk.

If you increase a volume's size, the vxassist command automatically locates available disk space. The vxresize command lets you optionally specify the LUNs or disks to use to increase the size of a volume. The vxvol command requires that you have previously ensured that there is sufficient space available in the plexes of the volume to increase its size. The vxassist and vxresize commands free unused space for use by the disk group. For the vxvol command, you must do this yourself. To determine how much you can increase a volume, use the following command:

# vxassist [-g diskgroup] maxgrow volume

When you resize a volume, you can specify the length of a new volume in sectors, kilobytes, megabytes, or gigabytes. The unit of measure is added as a suffix to the length (s, m, k, or g). If you do not specify a unit, sectors are assumed. The vxassist command also lets you specify an increment by which to change the volume's size.

Warning:

If you use vxassist or vxvol to resize a volume, do not shrink it below the size of the file system on it. If you do not shrink the file system first, you risk unrecoverable data loss. If you have a VxFS file system, shrink the file system first, and then shrink the volume. For other file systems, you may need to back up your data so that you can later recreate the file system and restore its data.