UX:vxfs fsadm: ERROR: cannot shrink /dev/vx/rdsk/<Diskgroup>/<Volume> - blocks are currently in use. vxvm:vxresize: ERROR: Problem running fsadm command for volume <Volume>, in diskgroup <Diskgroup>

book

Article ID: 100021555

calendar_today

Updated On:

Description

Error Message

Example:

Filesystem                kbytes        used         avail   capacity  Mountedon
/dev/vx/dsk/APP4/u14   261,695,488  95,948,909  155,387,998      39%    /u14


# /etc/vx/bin/vxresize  -g APP4  u14 419430400

UX:vxfs fsadm: ERROR: cannot shrink /dev/vx/rdsk/APP4/u14 - blocks are currently in use.
vxvm:vxresize: ERROR: Problem running fsadm command for volume u14, in diskgroup APP4

Resolution


There can be 2 causes for this error.


1) The volume/file system is busy at the time of the vxresize command and the blocks are currently in use.

Solution: Try again later at off-peak hours.


2) The file system is fragmented.

Solution: Run Fragmentation report and defragment.

# /opt/VRTS/bin/fsadm -ED

# /opt/VRTS/bin/fsadm -de -s -t 1800 /      

The -s option prints a summary at the end of each pass. This will defragment the file system  for 1800 seconds and then stop. (See fsadm man page.)  Run the command repeatedly if fragmentation is still reported. A heavily fragmented file system can cause fsadm to fail with error 28, which typically means a 100% full file system, but in this case, it is not.  

Determining Fragmentation

To determine whether a file system is fragmented, the free extents of that file system must be examined. If a large number of small extents are free, there is fragmentation.If more than half of the amount of free space is used by smaller extents (smaller than 64 blocks), or there is less than 5 percent of total file system space available in large extents, there is serious fragmentation.

Running The Extent-fragmentation Report

The extent-fragmentation report provides detailed information about the degree of fragmentation in a given file system. The command syntax for an extent-fragmentation report is:

# fsadm -E[-l largesize] [-r rawdev] mount_point
 
 
 

 

Issue/Introduction

vxresize shrink fails with the following error: UX:vxfs fsadm: ERROR: cannot shrink /dev/vx/rdsk/ - blocks are currently in use. vxvm:vxresize: ERROR: Problem running fsadm command for volume , in diskgroup