Fragmented file system resize fails with error message "fsadm: ERROR: V-3-20340: attempt to resize <volume> failed with errno 28"

Fragmented file system resize fails with error message "fsadm: ERROR: V-3-20340: attempt to resize <volume> failed with errno 28"

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

Problem

Fragmented file system resize fails with error message "fsadm: ERROR: V-3-20340: attempt to resize failed with errno 28"

Error Message

UX:vxfs fsadm: ERROR: V-3-20340: attempt to resize /dev/vx/rdsk// failed with errno 28
UX:vxfs fsadm: ERROR: V-3-23643: Retry the operation after freeing up some space

Solution

This error will typically occur when attempting to grow ahighly fragmented file system.  The first step in confirming fragmentationas the issue is to first verify the file system's available space.

Note:The use of the VTRS 'df' tool is preferred in this case due to betterunderstanding of VxFS statfs() response.

#/opt/VRTS/bin/df -k | grepdemo_volume
/dev/vx/dsk/demodg/demo_volume  65536    52007    13529  80%    /demo_fs

In this example, 80% used shouldallow enough space for a resize to complete successfully.  In general, filesystems over 95% will need to have their usage reduce before performing a filesystem resize.

Once sufficient space has been confirmed, determine filesystem fragmentation using the fsadm command:

# fsadm -E<mountpoint>
 ExtentFragmentationReport
       Total    Average      Average    Total
       Files    FileBlks    # Extents   FreeBlks
       6320          3          2      14404
   blocks used forindirects: 0
   % Freeblocks in extents smaller than 64 blks:100
   % Free blocks inextents smaller than  8 blks:100
   % blks allocated toextents 64 blks or larger:0.00
   Free Extents BySize
         1:      14368            2:        20            4:          9
         8:          0          16:          0          32:          0
         64:          0          128:          0          256:          0
       512:          0        1024:          0        2048:          0
       4096:          0        8192:          0        16384:          0
     32768:          0        65536:          0      131072:          0
     262144:          0      524288:          0      1048576:          0
   2097152:          0      4194304:          0      8388608:          0
   16777216:          0    33554432:          0    67108864:          0
 134217728:          0    268435456:          0    536870912:          0
 1073741824:          0  2147483648:          0

Fragmentation will be observed as a concentration of values in the smallerextents such as the 1, 2 and 4 block regions.  Large amount of smallerblock extents denote extreme fragmentation, as evident in the above data ( 143681 block extents ).

Defragmentation must be performed before a resize ofthe file system will succeed.  Small extents cannot be utilized properlywhen restructuring the underlying file system meta data.

Defragmentationcan be performed using the fsadm tool.  This must be run on a mounted filesystem and does not interfere with file system availability.  Heavily usedfile systems will take longer to complete defragmentation but this operationdoes not impair normal availability.

# fsadm-e -d <mount point>
eg,
#fsadm -e -d /demo_fs

This command produces no output andwill return to the command prompt when completed.  Following completion ofthe defragmentation process the file system resize should succeed withoutissue.

# vxresize -g demodg demo_volume +1gb

Was this content helpful?