Using the vxresize command to increase/decrease space in volume/filesystem

Article: 100029279
Last Published: 2022-01-23
Ratings: 1 0
Product(s): InfoScale & Storage Foundation

Description

How to use the vxresize command to increase/decrease space in volume/filesystem

 

Solution

While there are various commands to increase (grow) and shrink the volume/filesystem separately, using the command vxresize to grow or shrink the volume and filesystem simultaneously is considered BEST PRACTICE.
 
This command will shrink/grow the volume and also call the OS based tool to shrink/grow the filesystem (Volume Manager will order these tasks as appropriate).

usage: vxresize [-?hHVsxb] [-Ffstype] [-g diskgroup] [-t tag] [-o verify|override]  volume length[media...]
 
The length can be specified as a size to grow or shrink the volume/filesystem (+ or -) or it can be specified as the resulting size of the volume/filesystem.
 
When growing a volume/filesystem, Volume Manager will use what it believes will be the most efficient disk space to use.  If it is desired to use specific disks within the diskgroup to grow a volume/filesystem, those disk(s) can be specified at the end of the command line separated by spaces (see man page for detailed syntax requirements).  
 
When growing a volume/filesystem, if it is desired that Volume Manager use the remaining space in the diskgroup, this value can be determined and specified as the length(size) in the vxresize command.  
 
Use the command vxassist-g <diskgroup> maxgrow <volume> to determine the maximum size to grow the volume/filesystem.
 
When growing a STRIPE or RAID volume, keep in mind that not only will the additional space be required but multiple disks (spindles) within the diskgroup are required for each of the columns.
 
When growing a mirrored volume, keep in mind that not only will the additional space be required but multiple disks (spindles) within the diskgroup are required for the mirror plex.
 
When shrinking a volume/filesystem, please do not specify a length smaller that what is currently in use (the value reported by df-k for that mount point).  An error message will be displayed preventing the operation.
 
Typical Switches Used
 
-b    This will put the task in the background and can be monitored with the command vxtask list .
 
-s    This switch will cause the command to fail if the syntax does not result in a shrinking of the volume/filesystem.
 
-x    This switch will cause the command to fail if the syntax does not result in an increase (expansion) to the volume/filesystem.
 
 
 

 

Was this content helpful?