Operating System - HP-UX
1850311 Members
2732 Online
104054 Solutions
New Discussion

Difference between usage info provided by bdf and du

 
SOLVED
Go to solution
Babak
Valued Contributor

Difference between usage info provided by bdf and du

Hi All,

I need to know the file system usage to plan for my backup requirements. However the bdf output and that of the du command are quite different. (i.e. a du of the whole system does not match the total of kbytes used or available from the bdf output).
Can anyone shine some light on this?
Your help is greatly appreciated.
Regards,
B.
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: Difference between usage info provided by bdf and du

A boolean search of the forums using +du +bdf turned up:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd52b06350fe2d61190050090279cd0f9,00.html

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8c8e402f24d5d61190050090279cd0f9,00.html

and many others.


I think you'll find your answer in one of those threads.

Pete

Pete
Donald Kok
Respected Contributor

Re: Difference between usage info provided by bdf and du

Hi B,
- bdf gives you the size of the fs in kbytes.
- du gives the disk usage in disk blocks of 512 bytes.

du with -k option will give you kbytes though. (like du -k /var )

This will still not match since a filesystem is not the same as a disk. The filesystem has some overhead.

Hope this helps,
Donald
My systems are 100% Murphy Compliant. Guaranteed!!!
Pete Randall
Outstanding Contributor

Re: Difference between usage info provided by bdf and du

That's part of it, Donald, but there's more to it. If you check Bill Hassell's comments regarding sparse files, etc. in the first thread above or in this one, you'll see:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x308b402f24d5d61190050090279cd0f9,00.html

Pete

Pete
steven Burgess_2
Honored Contributor

Re: Difference between usage info provided by bdf and du

Hi

Also the possibilty of a file having been removed whilst a process was still writing to it will not release the space consumed by the file.

I have seen this also to have caused differences between bdf and du

Regards

Steve
take your time and think things through
Anil C. Sedha
Trusted Contributor

Re: Difference between usage info provided by bdf and du

The bdf output displays just the total filesystems and the space they occupy. That space is listed as the actual configured space.

However, du will give you the actual utilised space.

Here the difference is the overhead that filesystems have. The overhead is for storing information about inodes, pointers and stuff. Ideally you may consider this that for a filesystem of 100 MB provide an additional overhead of 5 Mb.

Regards,
Anil
If you need to learn, now is the best opportunity
Babak
Valued Contributor

Re: Difference between usage info provided by bdf and du

Thank you all.

B.