Veritas Storage Foundation Intelligent Storage Provisioning 5.0 AdministratorÆs Guide, HP-UX 11i v3, First Edition, May 2008

78 Administering application volumes
Resizing volumes online
Reducing the size of a volume to a specified length
The following command reduces the length of a volume:
# vxassist [-g
diskgroup
] [-f] shrinkto
volume
length \
[
attributes
...]
For example, the following command shrinks the volume vol1 to 5 gigabytes:
# vxassist -g mydg shrinkto vol1 5g
This operation fails if the new length specified is larger that the current size of
the volume.
Reducing the size of a volume by a specified amount
The following command reduces the length of a volume by a specified amount:
# vxassist [-g
diskgroup
] [-f] shrinkby
volume
length
\
[
attributes
...]
For example, the following command shrinks the volume vol01 by 500
megabytes:
# vxassist -g mydg shrinkby vol1 500m
Growing and shrinking multiple volumes
If the -M option is specified to the vxassist command, multiple volumes can be
resized in the same operation. For convenience, it is easiest to define the
volumes that are to be resized in a file, and then have
vxassist read this file to
resize the volumes as shown in this example:
# vxassist -M growby <
filename
Each line of input defines the disk group, volume and length parameters for the
resize and has the following format:
diskgroup
dgname
volume
volume_name
length
When used in scripts, the input may conveniently be taken from a “here
document” as shown in this example:
vxassist -M shrinkto <<!!
diskgroup mydg volume vol01 10g
diskgroup mydg volume vol02 12g
!!