df command reporting incorrect space usage

book

Article ID: 100021692

calendar_today

Updated On:

Resolution

VxFS will use some of file system space for structural data such as the IntentLog, Free Extent Bitmaps,  Superblocks, etc.
 
Dynamic inode allocation functionality can also contribute this discrepancy on a VeritasFile System (VxFS). This space will be released by Veritas if the user area needs it.
 
The correct way of identifying the actual free space available would be to use "df -b" command, e.g in above scenario:
 
# df -h /tvol1
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/gdg/gvol 30G 73M 28G 1% /tvol1
 
# df -b /tvol1
Filesystem avail
/dev/vx/dsk/gdg/gvol 30946806 <<<<<<< available free space
 
This is not a bug but rather the way VxFS keeps the structural data of the file system.
 
 

 

Issue/Introduction

df command reporting incorrect space usage. This can even impact a newly created file system. Example: # vxassist -g gdg maxsize
Maximum volume size: 62042112 (30294Mb)
# vxassist -g gdg make gvol 30294M
# mkfs -Fvxfs /dev/vx/rdsk/gdg/gvol
version 7 layout
62042112 sectors, 31021056 blocks of size 1024, log size 65536 blocks
largefiles supported
# mount -Fvxfs /dev/vx/dsk/gdg/gvol /tvol1
# df -h /tvol1
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/gdg/gvol 30G 73M 28G 1% /tvol1
In the above example the used space is shown as 78M yet no space has been physically used. If the file system created is 300G or greater, 18-20G of space will be shown as used even though the file system is empty.