Home › Forums › OS X Server and Client Discussion › Questions and Answers › df vs. du difference
- This topic has 3 replies, 2 voices, and was last updated 17 years ago by
zombor.
-
AuthorPosts
-
March 24, 2008 at 2:13 pm #371974
zombor
ParticipantHi, I’m having a problem with disk space usage (getting low on it), so I ran a quick du on my drive, and it comes out differently than df. Can anyone help me figure out why this is? I have pasted my commands and output below:
fileserver:/ admin$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/disk7 76Gi 71Gi 5.1Gi 94% /
devfs 115Ki 115Ki 0Bi 100% /dev
fdesc 1.0Ki 1.0Ki 0Bi 100% /dev
/dev/disk8s2 698Gi 351Gi 348Gi 51% /Volumes/Users
map -hosts 0Bi 0Bi 0Bi 100% /net
map auto_home 0Bi 0Bi 0Bi 100% /home
map -fstab 0Bi 0Bi 0Bi 100% /Network/Servers
map -static 0Bi 0Bi 0Bi 100% /Network/Applications
/dev/disk9 14Ti 5.9Ti 7.8Ti 44% /Volumes/xsanvolfileserver:vm admin$ sudo du -schx /*
10G /Applications
4.0K /Desktop DB
8.0K /Desktop DF
0B /Desktop Folder
1.8G /Developer
0B /Groups
191M /Image Management
1.5G /Library
2.0K /Network
786M /Network Applications
207M /Network Library
8.0K /Shared Items
3.9G /System
1.3G /Users
32M /Volumes
7.5M /bin
0B /cores
2.0K /dev
4.0K /etc
1.0K /home
604K /mach.sym
9.8M /mach_kernel
10M /mach_kernel.ctfsys
du: /net/localhost: Operation timed out
du: /net/broadcasthost: Operation timed out
du: /net/fileserver.local: Operation timed out
1.0K /net
228M /opt
11G /private
5.3M /sbin
4.0K /tmp
1.9G /usr
4.0K /var
33G totalMarch 24, 2008 at 6:16 pm #371980khiltd
ParticipantIt’s difficult to see what it is we’re supposed to be comparing there since I’m not apt to grab a calculator and work out the percentages myself, but if you’re seeing a discrepancy it could be a difference in the way block sizes are being calculated.
March 24, 2008 at 6:38 pm #371982zombor
Participant[QUOTE][u]Quote by: khiltd[/u][p]It’s difficult to see what it is we’re supposed to be comparing there since I’m not apt to grab a calculator and work out the percentages myself, but if you’re seeing a discrepancy it could be a difference in the way block sizes are being calculated.
[/p][/QUOTE]df -h (and the finder) says my usage is 75G. du (and another tool called WhatSize) tell me my usage is 33G. I’m trying to find where all the space is being used up, as it keeps going up. Last Friday I had about 10G free, now this morning i have less than 1G. My thoughts were that a log file was being run up somewhere, but du doesn’t see m to tell me where the space is being used up, because it tell me there is only 33G used on the disk. I’ve never seen df and du tell me different results.
March 24, 2008 at 11:29 pm #371985zombor
ParticipantI rebooted the server tonight, and all my free space came back, so du was telling me the right amount. I will have to wait and see if the problem persists.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed