Use the vxresize command to resize a volume containing a file system. Although you can use other commands to resize volumes containing file systems, vxresize offers the advantage of automatically resizing certain types of file system as well as the volume.
Table: Permitted resizing operations on file systemsshows which operations are permitted and whether you must unmount the file system before you resize it.
Table: Permitted resizing operations on file systems
VxFS |
|
---|---|
Mounted file system |
Grow and shrink |
Unmounted file system |
Not allowed |
For example, the following command resizes a volume from 1 GB to 10 GB. The volume is homevol in the disk group mydg, and contains a VxFS file system. The command uses spare disks mydg10 and mydg11.
# vxresize -g mydg -b -F vxfs -t homevolresize homevol 10g mydg10 mydg11
The -b option specifies that this operation runs in the background. To monitor its progress, specify the task tag homevolresize with the vxtask command.
When you use vxresize, note the following restrictions:
In some situations, when you resize large volumes, vxresize may take a long time to complete.
If you resize a volume with a usage type other than FSGEN or RAID5, you can lose data. If such an operation is required, use the -f option to forcibly resize the 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.
Note: |
If you enter an incorrect volume size, do not try to stop the vxresize operation by entering Crtl-C. Let the operation complete and then rerun vxresize with the correct value. |
For more information about the vxresize command, see the vxresize(1M) manual page.