Administering volumes 285

Resizing a volume

vxassist command also allows you to specify an increment by which to change the volume’s size.

Caution: If you use vxassist or vxvol to resize a volume, do not shrink it below the size of the file system which is located 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. Other file systems may require you to back up your data so that you can later recreate the file system and restore its data.

Resizing volumes using vxresize

Use the vxresize command to resize a volume containing a file system. Although other commands can be used to resize volumes containing file systems, the vxresize command offers the advantage of automatically resizing certain types of file system as well as the volume.

See the following table for details of what operations are permitted and whether the file system must first be unmounted to resize the file system:

Table 8-1

Permitted resizing operations on file systems

 

 

 

 

 

 

 

 

Online JFS (Full-

Base JFS (Lite-

HFS

 

 

VxFS)

VxFS)

 

 

 

 

 

Mounted File System

Grow and shrink

Not allowed

Not allowed

 

 

 

 

Unmounted File System

Grow only

Grow only

Grow only

 

 

 

 

 

For example, the following command resizes the 1-gigabyte volume, homevol, in the disk group, mydg, that contains a VxFS file system to 10 gigabytes using the spare disks mydg10 and mydg11:

#vxresize -g mydg -b -F vxfs -t homevolresize homevol 10g \ mydg10 mydg11

The -boption specifies that this operation runs in the background. Its progress can be monitored by specifying the task tag homevolresize to the vxtask command.

Note the following restrictions for using vxresize:

vxresize works with VxFS, JFS (derived from VxFS) and HFS file systems only.

In some situations, when resizing large volumes, vxresize may take a long time to complete.