Solved

Displaying wrong available space

Posted on 2007-03-24
9
259 Views
Last Modified: 2011-08-18
One of my file system (/opt/apache) is showing wrong available space. What happend to the remaining space?
/dev/vg00/apache      7213153      5941812      550025      92%      /opt/apache

If you see here ( 7213153 -5941812=1271341 ) is the real availabel space, but it is showing only 550025. we have monitoring scrits that delete old logs every 15days.

Any one have any idea about my space?

Thanks,





0
Comment
Question by:Gopivinod
9 Comments
 
LVL 32

Expert Comment

by:Kamran Arshad
ID: 18785021
Hi,


These are apache log files, and I think apache is still running in the background it keeps the file handles in memory. Shutt down and restart apache. I think it will do the trick.
0
 
LVL 20

Accepted Solution

by:
tfewster earned 125 total points
ID: 18785310
uetian1707 makes a good point about deleted files that are still open not releasing space, though that usually shows up as a difference between "df" and "du" results.

I suspect that the filesystem has been created (or tuned) to reserve 10%
(Used+Available)/Size=.8999999  

df doesn't show the reserved space and only root can use it (So you could have a filesystem 110% used ;-)

Reserving space is generally done for improved performance, so I wouldn't change it (using "tunefs" ) unless you're sure disk/filesystem performance is not an issue.
0
 
LVL 19

Expert Comment

by:Redimido
ID: 18785818
generally you can avoid problems when you sync your filesystem before you check free space.

I do not recall well if the comand sync can do that for all filesystems, but certainly df --sync will do.

check this man page for df:
http://www.gnu.org/software/coreutils/manual/html_chapter/coreutils_14.html

and look for the word "sync"
0
 
LVL 61

Expert Comment

by:gheist
ID: 18788263
We are looking for handles to deleted files.
Please post "uname -a" from your system.
btw apache has finest "rotatelogs" utility to keep disks clean, no need for custom scripts.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:Gopivinod
ID: 18790669
Last week i deleted some logs and the space reduced to 87%, which means space reclaimed even though apache is running. Another thing i foget to mention, there are total 3 fs on /opt (/opt,/opt/apache,/opt/oracle). Will this be the reason for the problem( showing wrong available space)?

/dev/vg00/lvol6    2002251 1590085  211940   88% /opt
/dev/vg00/apache   7213153 5702997  788840   88% /opt/apache
/dev/vg00/lvol11   2048000  457559 1491046   23% /opt/oracle

Hi ghiest, here is the uname info

HP-UX MITOCONDRIA B.10.20 C 9000/785 2001853180 32-user license
0
 
LVL 61

Expert Comment

by:gheist
ID: 18790815
Why do yo say "wrong space"
trr dd-ing /dev/zero to some file on the disk - this will show you what is right.
0
 
LVL 20

Expert Comment

by:tfewster
ID: 18791001
/opt and /opt/apache have been created with the default "minfree" (10%)
/opt/oracle has been tuned to minfree=5%

You can verify that safely with
/usr/sbin/mkfs -m /dev/vg00/apache
(man mkfs for info on the output)

Please also post the output of  `grep /opt /etc/fstab` - I suspect all these filesystems are HFS filesystems
From `man df_hfs`:
"When df is used on an HFS file system, the file space reported is the space available to the ordinary user, and does not include the reserved file space specified by fs_minfree.

Unreported reserved blocks are available only to users who have appropriate privileges. See fs(4) for information about fs_minfree."

`bdf` might show diffrent info...
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 21169993
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
ACCEPT tfewster's comment {http:#18785310} as answer

Any objections should be posted here in the next 4 days. After that time, the question will be closed.
JustUNIX, Experts Exchange Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21198258
Forced accept.

Computer101
EE Admin
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now