df output shows dataset size keeps shrinking

Status
Not open for further replies.

FNNewbie

Cadet
Joined
Nov 8, 2013
Messages
5
Hi,

I notice a strange behavior that as more disk space is used, df shows dataset total size shrinks. For example, I have several datasets in volroot volume.

$ df -h /volroot/proj1
Filesystem Size Used Avail Use% Mounted on
freenas:/mnt/volroot/proj1
6.1T 4.4T 1.8T 72% /volroot/proj1

When available space reduces, the "Size" value shrinks too. It seems to me if the other datasets consume spaces which decreases the value in "Avail", even though this particular dataset's "Used" value does not change, the "Size" value decreases as well. It's almost like "Size" value is calculated from "Used" + "Avail". Is this expected behavior?

Post 122377 mentioned df output is not reliable because it does not understand ZFS. So is there a way from the client side to find the real values similar to df?

Thank you.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not easily. If you understand all the implications of snapshots, referenced values etc you can calculate it yourself. Otherwise the "simple" way is to just do a "zfs list" and take that value as your true amount of available space.
 
Status
Not open for further replies.
Top