Volume is larger than file system due to fsadm error while running vxresize

book

Article ID: 100029847

calendar_today

Updated On:

Description

v  tvol         -            ENABLED  ACTIVE   4194304  SELECT    -        fsgenpl tvol-01      tvol         ENABLED  ACTIVE   4194304  CONCAT    -        RWsd disk01-01    tvol-01      disk01   0        4194304  0         EMC_CLARiiON0_7 ENA# df -k /tvol/dev/vx/dsk/nadg/tvol   2097152   18006 1949207     1%    /tvol

Note: Converting 1k blocks to 512 byte blocks    2097152 * 2 = 4194304

 

After a failed resize:

v  tvol         -            ENABLED  ACTIVE   6291456  SELECT    -        fsgenpl tvol-01      tvol         ENABLED  ACTIVE   6291456  CONCAT    -        RWsd disk01-01    tvol-01      disk01   0        6291456  0         EMC_CLARiiON0_7 ENA# df -k /tvol/dev/vx/dsk/nadg/tvol   2097152   18006 1949207     1%    /tvol

The best path to correct the volume/file system size difference is to correct the issue that is preventing fsadm from executing during a vxresize operation and re-run the original command.

Alternatively, you can safely resize the volume back to its original size if the exact original block size is known.  This is done using the vxassist shrinkto command.  Please note that by default this command will produce an error message.

# vxassist -g nadg shrinkto tvol 4194304VxVM vxassist ERROR V-5-1-7236 Shrinking a FSGEN or RAID5 usage type volume can result in loss of data. It is recommended to use the "vxresize" command or specify "-f" option to force the operation.

Use the '-f' option if you can confirm the previous volume size.

# vxassist -g nadg -f shrinkto tvol 4194304

 

Resolution

Question:

Can a volume be shrunk safely when it is larger than the file system on the volume?

This condition can occur as a result of an error with the fsadm command during a vxresize operation (either initiated on the command line or through the GUI).  Error conditions during a resize will ordinarily revert the volume to its original size but in some circumstances the volume may remain at the target size, while the file system is still the original size.


Example:

Original volume 'tvol' is 2 gigabytes (4194304 blocks) with a file system.  Note the file system is slightly smaller due to fs meta data.

Issue/Introduction

Volume is larger than file system due to fsadm error while running vxresize