?
Solved

df -k reporting incorrect disk space

Posted on 2003-03-18
6
Medium Priority
?
3,493 Views
Last Modified: 2013-12-27
I'm running Solaris 2.6 on Ultra 60 machines.  When I run df -k on the root patition on one machine it reports that the root partition is 63% full while another machine with the same configuration reports only 7%.  I run du -k / | sort -n on both machines and get the same total disk space used for the root partition.  I tried running fsck and fsck -of in single user mode with no change in the df output.  Help!
0
Comment
Question by:keechv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 8161957
Are the root partitions the same size on the two machines?

If they are, it's still possible that this is correct if there are files that have been deleted but there are still processes with open file-handles to them. This won't survive a reboot, however.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 8163405
Running 'du -k /' will not return the space used for the root partition if you have multiple partitions.
0
 

Expert Comment

by:jhundpogi
ID: 8164518
Hi,
Do you have the same patch level ?
if yes, Check if you have the same OBP release.

If problem still persist :
1. try to switch disk
2. if you dont have a seperate /var,check /var/crash..maybe their is a nasty core file..in their..
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:keechv
ID: 8276126
The problem was cause by circular soft links on the workstation where the root partition was reported as 63% full.  The question now becomes...  Why did the df -k command stop at 63%.  I would think it would follow the links until the df command reported 100% full.
0
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 150 total points
ID: 8284099
df does not look at the actual files to determine disk usage, but rather looks at in-kernel information kept at the filesystem level.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 8295974
Of course it still stands that running 'du -k /' will give you totally different results to 'df -k /'

du will list the sizes of every directory on your system.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question