Visit Our UNIX and Linux User Community


Conflict between df -k and du -sk...again


 
Thread Tools Search this Thread
Operating Systems HP-UX Conflict between df -k and du -sk...again
# 1  
Old 11-09-2009
Conflict between df -k and du -sk...again

Hi,
I know this has been discussed a number of time but i could not get the exact answer. So need help again.

Issue:

The two command for same file system shows different size.

du -sk shows toatl size is 12780685 KB while df -k 45289229 used allocated Kb

Code:
/oxt/mantran/bin $ du -sk /oxt/mantran/bin/dev_usa
12780685        /oxt/mantran/bin/dev_usa
/oxt/mantran/bin $ df -k /oxt/mantran/bindev_usa
/oxt/mantran/bin/dev_usa (/dev/vg07/lvol2       ) : 
                                                   46103286  total  allocated Kb
                                                   814057     free allocated Kb
                                                    45289229 used allocated Kb
                                                     98 % allocation used

Regards,
MalaySmilie

Last edited by pludi; 11-09-2009 at 05:43 AM.. Reason: code tags, please...
# 2  
Old 11-09-2009
If your problem doesn't match answers supplied elsewhere, it helps to know what you know isn't true and why you know it.

So, we assume that you know your file system doesn't need to be fscked to rebuild the free space? We assume that there are no sparse files that could confuse the issue?

What else? What OS? What filesystem?

Could a deleted file be being held open somewhere?

Could you possibly have union mounts anywhere in here?
# 3  
Old 11-09-2009
Hi Tony,

I don't know about fscking to rebuild the space, I need to contact our system administrator for this. This is a HP Unix system.

I neither found any sparse file nor any union mounts anywhere in here.

One more thing I want to add - I am monitoring the folder since last 10 hour. There was very few file came into(total size 2Kb) but the space has been decrease around 4000KB till now.
# 4  
Old 11-09-2009
We need more information to help you here...
What so special about this filesystem? (Does it belong to a application, writing logs or...)
What is the output of uname -r?
what does bdf <directory name> gives you for an output?
# 5  
Old 11-09-2009
What you you get from:

Code:
uname -srm

lvdisplay /dev/vg07/lvol2

bdf /oxt/mantran/bin/dev_usa


This effect is usually caused by processes "deleting" files which are still open. "du" sees the file as gone but "df" and "bdf" are correct.
Can you account for all the processes with:

Code:
fuser -u /oxt/mantran/bin/dev_usa


Last edited by methyl; 11-09-2009 at 12:24 PM.. Reason: fuser
# 6  
Old 11-10-2009
1)uname -srm
Output : HP-UX B.11.23 ia64
2) The file system belong to a application. Yes logs are collected there.
3) bdf /oxt/mantran/bin/dev_usa
Output:Filesystem kbytes used avail %used Mounted on
/dev/vg07/lvol2 46137344 42479560 3448226 92% /oxt/mantran/bin/dev_usa

4)lvdisplay /dev/vg07/lvol2
--- Logical volumes ---
LV Name /dev/vg07/lvol2
VG Name /dev/vg07
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 45056
Current LE 704
Allocated PE 704
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
# 7  
Old 11-10-2009
We have eliminated slow syncing of mirrors because there aren't any mirrors.
We have eliminated wrong parameters to "newfs" or "extendfs" because LVM and "bdf" agree.
The usual reason for this discrepancy is that a program or user is deleting files which are open by an application which is still running. Usually in this circumstance "bdf" is right and "du" is wrong.
There are other possible reasons like embryonic files.
Do you get the disc space back after a reboot or application recycle perhaps?

Previous Thread | Next Thread
Test Your Knowledge in Computers #477
Difficulty: Medium
The first hard disk (IBM 350) was developed in 1956 by IBM and had a capacity of 3.75MB.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Solaris LDOM IP conflict

I have a Sun T4-1 running Solaris 11.4 with a static IP 192.168.0.183. On this machine is a Solaris 10 LDOM with a static IP of 192.168.0.78. The other day I had to stop the LDOM to do a memory reconfigure. When I rebooted it I got an error that the IP 192.168.0.78 was already in use and so... (4 Replies)
Discussion started by: Michele31416
4 Replies

2. Solaris

Need to find conflict in ports

Hi forum, I've run into a problem here and I can't seem to figure it out. OS=Solaris 10 u11 SPARC. This application (running on a local zone) was having a conflict with a port and I can't seem to find that port listed. (eg 41468) I've tried netstat -an|grep 41468 I am pretty sure this... (2 Replies)
Discussion started by: br1an
2 Replies

3. Ubuntu

NIS/RPCBind Conflict!

Hi I am trying to configure NIS client on my Ubuntu 12.04. But I could not put portmap without uninstalling rpcbind. Do I need to have rpcbind there on the server, or how can I have both portmap and rpcbind at same time there on the server, because it's having conflict. (1 Reply)
Discussion started by: nixhead
1 Replies

4. Solaris

i have conflict with memory utilization

dear all, kindly i want to check my server memory utilization i used alot of commands but i want to make sure that it is acurate let me explain i have a server which has 32GB RAM Total Memory = 33423360 kb Free Memory = 4172568 kb Utilized Memory = 29250792 kb Memory Utilization... (2 Replies)
Discussion started by: maxim42
2 Replies

5. Shell Programming and Scripting

Conflict with the operator in IF

I am using a script like this source=$1 if ; then echo "got it" else echo "lost it" fi But the script is giving th error like script.ksh: ==: unknown test operator Can i know , is the syntax iam using is correct or suggest me a good way. ... (3 Replies)
Discussion started by: nani1984
3 Replies

6. Solaris

IP address conflict

Hi, I am currently working on 2 SPARC-ENTREPRISE T5220 (cluster servers), named SERVER 3A and SERVER 3B. Both servers have their own Ip ADRESS and share 1 Virtual IP adress to share applications....... Both servers are available , but can't communicate together right now. For example, from... (8 Replies)
Discussion started by: feg
8 Replies

7. Solaris

Solaris 9 IP conflict

Hi Gurus I am in a strange situation. I have a SUN sparc server . The server was having an IP say X..... (this IP X is now being used by another server)..... I have just installed fresh solaris 9 OS on the same server and given new IP say Y. I also configured probe based IPMP with ce0 and... (2 Replies)
Discussion started by: ningy
2 Replies

8. Shell Programming and Scripting

Boot time driver conflict

I have a Microdia web cam. Some times it won't work if and only if there is a "HV7131R image sensor detected" statement in the boot up. In this case when I try to get a .png snapshot all I get is a frame full of what appears to be white noise only it is mostly green. Here is the command I am... (0 Replies)
Discussion started by: slak0
0 Replies

9. Solaris

Conflict with PIDs

I am trying to determine the root cause of a java process that dies trying to startup during it's cron job. I did go ahead and change the time that it starts up in the cron file and now it starts successfully. However is there a way to determine what PID a process was attempting to get when... (5 Replies)
Discussion started by: vedder191
5 Replies

10. UNIX for Dummies Questions & Answers

DNS Conflict

I host a few websites for friends and lately my server has been bogging down at times. I think that it is because of a dns conflict. Someone said that by doing a nslookup I should be able to see it and then do a pkill -9 in.named and then do in.named to get it going again. Any feedback on this... (1 Reply)
Discussion started by: thomi39
1 Replies

Featured Tech Videos