Solved

Displaying wrong available space

Posted on 2007-03-24
9
265 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
[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
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 21

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:Gabriel Orozco
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 62

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
 

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 62

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 21

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 P.S.
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
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.:

734 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