Solved

Displaying wrong available space

Posted on 2007-03-24
9
264 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

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…
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 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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

726 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