Operating System - HP-UX
1847124 Members
5545 Online
110263 Solutions
New Discussion

Re: disk usage difference

 
SOLVED
Go to solution
Shivkumar
Super Advisor

disk usage difference

$du and $bdf on a file system gives different used and free disk space ?
What could be the issue ?

12 REPLIES 12
James R. Ferguson
Acclaimed Contributor
Solution

Re: disk usage difference

Hi Shiv:

There is no issue. 'bdf' inclues some of the underlying filesystem structural overhead in its summation of used space.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: disk usage difference

Usually it's because an open file has been deleted and bdf will not report the space as unused until the process holding the file open has terminated. The du command reports the space as unused.


Pete

Pete
Jannik
Honored Contributor

Re: disk usage difference

it could be a double mount. I recomeed that U do a
lvdisplay -v | more
and se the size of the logical volume.
Remenber that du give output in byte if you don't specify -k this is the command:
du -sk ./*

jaton
Arunvijai_4
Honored Contributor

Re: disk usage difference

Hi Shiv,

There is no issue since bdf reports from structural way of a FS. Also, do a "sync" before executing "bdf" and "du"

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Nguyen Anh Tien
Honored Contributor

Re: disk usage difference

Hmm. not any issue!
bdf - working with mouting file system
du- size of file (not mouting file system)
Recommend:
If you want to monitor how many percent of Phisical disk is currently use, you should use
#vgdisplay -v vgname
pay you attention on Free PE and Total PE on each PV (physical Volume).

bdf, du only monitor file system, file level.
HTH
HP is simple
Arunvijai_4
Honored Contributor

Re: disk usage difference

Hi shiv,

There are no of threads discussed about this in ITRC. You may need to take a look at them,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=767419
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=787308

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Senthil Prabu.S_1
Trusted Contributor

Re: disk usage difference

hi shiva,
there are not much difference.
bdf works with mouting file system and
du just shows size of file
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Devender Khatana
Honored Contributor

Re: disk usage difference

Hi,

bdf shows the usage of the file system by the contents. Whereas du shows the content's size in total.

There may be a difference as the files in use may have been showing different size than actual in use. It is also quite possible that if some file in use has been deleted, then the size for this will not be listed in du whereas bdf will consider the full space as used, reason being the process has not yet released the space to file system.

HTH,
Devender
Impossible itself mentions "I m possible"
Yogeeraj_1
Honored Contributor

Re: disk usage difference

hi,

see also:
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&admit=-1335382922+1137574060762+28353475&docId=200000080063060

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Shivkumar
Super Advisor

Re: disk usage difference

We saw the difference between these 2 command too much. du -sk showed 1gb in /opt/rose/ file system whereas bdf showed 13gb. the disk alert is configured with bdf command. also application stopped working when disk usage with bdf reached 100%. we killed unused java process and it released the disk space from 96% to 8%. we had 14gb in /opt/rose total. i am still confused why 2 java processes were using 12gb of disk space. i checked there were no zombies running on the system also.
Shivkumar
Super Advisor

Re: disk usage difference

did anyone get a chance to see my reply ?
Pete Randall
Outstanding Contributor

Re: disk usage difference

You need to use a tool like lsof to see what process is creating these files. You can download lsof from here:

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.75/


Pete

Pete