Solved

Displaying wrong available space

Posted on 2007-03-24
9
261 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: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
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)

 
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 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

773 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