Re: bdf vs. df -k

 
SOLVED
Go to solution
Joseph Hoh
Frequent Advisor

bdf vs. df -k

Why does the total allocated kb appear larger using bdf vs df -k?

profx / # df -k /home
/home (/dev/vg00/lvol8) :
39883 total allocated
18302 free allocated Kb
21581 used allocated Kb 54 % allocation used

profx / # bdf /home
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol8 40960 21581 18302 54% /home


6 REPLIES 6
Dan Hetzel
Honored Contributor
Solution

Re: bdf vs. df -k

Hi Jeff,

df reports the total size minus the 'minfree %'
bdf reports the total size

bdf_total * (100 - minfree %) = df_total

Best regards,

Dan


Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Dan Hetzel
Honored Contributor

Re: bdf vs. df -k

forgot to mention...

'df -t' will report the minfree %

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Joseph Hoh
Frequent Advisor

Re: bdf vs. df -k

Thanks that makes since.

However, everything I have read says that the minfree is approx. 10%. When I do a df -t most of my file systems show 2% or less. ???
hp-ux 11.0 jfs fsprofx


/ # bdf /ora_db9
Filesystem kbytes used avail %used Mounted on
/dev/vg_emc9/lv_oradb9
113250304 89243128 23819680 79% /ora_db9
profx / # df -k /ora_db9
/ora_db9 (/dev/vg_emc9/lv_oradb9) : 113062808 total allocated Kb
23819680 free allocated Kb
89243128 used allocated Kb
78 % allocation used
profx / # df -t /ora_db9
/ora_db9 (/dev/vg_emc9/lv_oradb9): 47639360 blocks 750216 i-nodes
226500608 total blocks 750272 total i-nodes
178486256 used blocks 56 used i-nodes
0 percent minfree


Dan Hetzel
Honored Contributor

Re: bdf vs. df -k

Hi,

But minfree is only relevant with hfs filesystems....

You may try 'fstyp -v /dev/vg??/lvol??' as this will report the most accurate figures.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Joseph Hoh
Frequent Advisor

Re: bdf vs. df -k

So is there a minfree % value for vxfs.

I cannot find any info that specifies anything other than 10%. But the df -t command shows 0-2%. Any info. on vxfs??
Dan Hetzel
Honored Contributor

Re: bdf vs. df -k

Hi Jeff,

If you look at the 'df' manpage, it says (generic) right on the top.
My understanding of this is that 'df' isn't really tuned to report accurate figures with 'non standard' (sic) filesystems layout like vxfs.

I'm not really sure that the Berkeley version is really tuned either. There are some warnings on the manpage as well.

As 'fstyp -v /dev/vg??/lvol??' reads from the superblock, this will definitely be accurate.
One of its advantage, besides this, is the ability to report that info from mounted or umounted filesystems.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com