286

Administering volumes

Resizing a volume

Resizing a volume with a usage type other than FSGEN or RAID5 can result in loss of data. If such an operation is required, use the -foption to forcibly resize such a volume.

You cannot resize a volume that contains plexes with different layout types. Attempting to do so results in the following error message:

VxVM vxresize ERROR V-5-1-2536 Volume volume has different organization in each mirror

To resize such a volume successfully, you must first reconfigure it so that each data plex has the same layout.

For more information about the vxresize command, see the vxresize(1M) manual page.

Resizing volumes using vxassist

The following modifiers are used with the vxassist command to resize a volume:

growto Increase volume to a specified length.

growby Increase volume by a specified amount. shrinkto Reduce volume to a specified length. shrinkby Reduce volume by a specified amount.

Extending to a given length

To extend a volume to a specific length, use the following command:

#vxassist [-b] [-g diskgroup] growto volume length

Note: If specified, the -boption makes growing the volume a background task.

For example, to extend volcat to 2000 sectors, use the following command:

#vxassist -g mydg growto volcat 2000

Note: If you previously performed a relayout on the volume, additionally specify the attribute layout=nodiskalign to the growto command if you want the subdisks to be grown using contiguous disk space.

Extending by a given length

To extend a volume by a specific length, use the following command:

# vxassist [-b] [-g diskgroup] growby volume length

Page 285
Image 285
HP Veritas Volume Manager 5.0 -UX 11i v3 manual Resizing volumes using vxassist, Extending to a given length