Operating System - HP-UX
1753808 Members
8371 Online
108805 Solutions
New Discussion юеВ

Re: bdf and du not match, disk space gone?

 
SOLVED
Go to solution
Gary L
Super Advisor

bdf and du not match, disk space gone?

Hi

There is a 50G SUN disk created and installed on a rp3440 box, mount point is /sb1. Today, It has some differents:
# bdf /sb1
Filesystem kbytes used avail %used Mounted on
/dev/vg01/lveva1 52412416 46711584 5663848 89% /sb1
used 46711544kb, and available 5G. but...

# du -kx /sb1
......
57648 /sb1/egate/tomcat_server/jakarta-tomcat-4.1.27
66840 /sb1/egate/tomcat_server
2508464 /sb1/egate
8 /sb1/backup
2508472 /sb1
only used almost 2.4G

# du /sb1
......
115296 /sb1/egate/tomcat_server/jakarta-tomcat-4.1.27
133680 /sb1/egate/tomcat_server
5016944 /sb1/egate
16 /sb1/backup
5016960 /sb1
used 5G? not "du -k" 2.4G? not "bdf" 44.5G?

# fuser -c /sb1
/sb1: 26748mcto 25779mcto 2826mcto 2807mcto 2832mcto 25782mcto 4477mcto 26770mcto 2901mcto 2928mcto 26757mcto 3044mcto 26783mcto 26837mcto 26801mcto 2835mcto 26752mcto 2752mcto 3023mcto 2816mcto 2932mcto 2811mcto 26829mcto 26884mcto 26805mcto 15141mcto 2906mcto 3015mcto 26774mcto 3032mcto 26730mcto 3040mcto 14696c 26726mcto 3005mcto 26864mcto 3028mcto 2755mcto 26779mcto 26856mcto 26765mcto 2823mcto 26761mcto 26810mcto 2804mcto 3009mcto

#fuser -f and fuser -u no data

questions:
1. what's the different of option -k -kx and none of " du ". For other case, du -kx match bdf, what's going on "du"?
2. why the disk space size not match between " bdf " and " du -kx"?

BTW, I could not umount /sb1 and vgchange -a n /dev/vg01, error message: Device busy.

How to fix it? Any answers will be very appreaciate!!!
8 REPLIES 8
Aussan
Respected Contributor
Solution

Re: bdf and du not match, disk space gone?

to unmount it you have to kill the process running on it

try

fuser -cku /sb1

about bdf and du being diffrent

take a look at doc TBRIXKBRC00001367

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c0
1026280-2

if the link does not work here is what's in it

PROBLEM

The filesystem has filled up, so action was taken to delete 800MB of logfiles.

The command:
"du -s"

shows the space as 'freed' but "bdf" doesn't. How can that be?

CONFIGURATION

hpux 10.x 10.20 11.x s700
s800

RESOLUTION

Obviously there is a difference in how du and bdf behave.
This may occur if we touch open files.
"du" shows output in a positive view: it shows the number of currently allocated
blocks and counts the blocks you've just deleted as free.

"bdf" has a more negative perspective: it shows the free disk space available.

The difference is here: if a still-active process has allocated blocks (such as
for a logfile that you've just deleted), "bdf" counts these as still occupied.
This won't change until the process closes the file ("deallocates the blocks")
as it usually happens when the process terminates.
The tongue weighs practically nothing, but so few people can hold it
Gary L
Super Advisor

Re: bdf and du not match, disk space gone?

Hi Aussan

Thank you very much for your kindly help.
Done!
According as your suggestion: I could umount the /sb1 after used "fuser -cku /sb1". When I re-mount it, bdf match with du -kx. 79% became 5%
/dev/vg01/lveva1 52412416 2514928 49515232 5% /sb1

great, thanks again

-Gary
Aussan
Respected Contributor

Re: bdf and du not match, disk space gone?

Glad to help :)
The tongue weighs practically nothing, but so few people can hold it
Gary L
Super Advisor

Re: bdf and du not match, disk space gone?

Have a good weekend, buddy.
Dennis Handly
Acclaimed Contributor

Re: bdf and du not match, disk space gone?

>1. what's the different of option -k -kx and none of "du". For other case, du -kx match bdf

I didn't see any answers to this part of the question?

Basically -k says you want the answers in Kb, not some scummy half-size "blocks".

-x says don't cross file system mounts.
Gary L
Super Advisor

Re: bdf and du not match, disk space gone?

Hi Dennis

Thank you very much for your detail explanations of du option -k -kx and none.

-Gary
James R. Ferguson
Acclaimed Contributor

Re: bdf and du not match, disk space gone?

Hi Gary:

Compare the output of :

# du -k /

...and:

# du -xk /

...and you will appreciate what it means to cross (or not cross) mountpoints :-))

Regards!

...JRF...
Gary L
Super Advisor

Re: bdf and du not match, disk space gone?

Hi James

Thanks a lot

have a great day

-Gary