If we fetch a volume's space details (using df) on the filer immediately after some data is copied/changed on the volume then we do not get accurate results. Similarly, in cases where we fetch the volume's space details immediately after its creation from a snapshot of parent volume, we don't get valid results. It takes a long time for the "used space" to settle down to a single value depending on the amount of data. For eg : For a volume of size 10G with used space 9G, the new volume that is created takes around 13 minutes to settle down to a consistent used space value. The pattern that is usually observed is - used_space will start from a very high value then it will keep getting lesser till a point in time and after that it shoots up again.
Steps to reproduce this issue: Steps to reproduce.
1. Create a empty volume of size say 10G. 2. Copy data of size 9G. (Used space is 9G). 3. Create a snapshot of this volume. 4. Create a new flexclone using this snapshot and measure space stats of the new volume repeatedly with some time lag in between. The script I had : rsh <filer> vol clone create test_to_check -b <volname> <Snapname> rsh <filer> df -k test_to_check sleep 1; rsh <filer> df -k test_to_check sleep 1; rsh <filer> df -k test_to_check sleep 1; rsh <filer> df -k test_to_check sleep 1; rsh <filer> df -k test_to_check
In this case, for a parent volume of size 10G with 9G of used space, it takes around 13min for the used space to settle down for the new volume.
While cloning a volume of size 310GB, i saw that used_space fluctuted from 385GB -> 310 GB before it started shooting up again.
How can I find out the actual used space on this newly created volume? Any insight in to this issue will be really useful.