[SOLVED] df -h shows 100% used but I have deleted files...
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a centos server (version 5.3) and I ran out of space on one of my partitions so I have been deleting files to free up space. When running df -h I get this:
As you can see I have about 40gb free but it shows 100% usage. I thought it might be a locked file or something but I have tried lsof to look for anything that my be locked, I have also rebooted the server but still have had no luck!
If anyone could help me out that would be great! If you need anymore info please let me know.
Thank you very much for your response, If you wouldn't mind taking a look at the result of the command: tune2fs -l /dev/sda3 and helping me go through it.
From the below results it does look like its 5%, i will do a bit of google'in but if you wouldn't mind, is there any risk with having it at 1-2%?
Does having it at 5% mean that I can only use 95% of the drive?
Filesystem OS type: Linux
Inode count: 243564544
Block count: 243563473
Reserved block count: 12178173
Free blocks: 13624880
Free inodes: 243433054
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 965
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 32768
Inode blocks per group: 1024
Filesystem created: Sun Apr 26 16:01:52 2009
Last mount time: Mon Aug 6 19:05:51 2012
Last write time: Mon Aug 6 19:05:51 2012
Mount count: 3
Maximum mount count: -1
Last checked: Mon Aug 6 18:16:26 2012
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: 659ce280-899b-4b47-a361-98971385ecac
Journal backup: inode blocks
If the system filled up completely, everything would come crashing down in a hurry, very very bad things would happen. The reserved blocks are used so that root still has somewhere to work if the filesystem fills up. 5% is an antiquated number from way back in the day when hard drives were much smaller, in my opinion it should have never been a percentage, but a fixed value of maybe 100MB-1GB.
These days, 5% is so ridiculously overkill that it's not even funny anymore, I always resize it to around 1GB after setting up a filesystem. You can do that with:
Code:
tune2fs -r 250000 /dev/sda3
Or you can keep it a percentage and just lower it to 1% using evo2's suggestion.
Last edited by suicidaleggroll; 08-06-2012 at 03:20 PM.
In any case, you should figure out why it 'filled up' and fix it, otherwise its only a matter of time before it fills the new space you have created.
I'd start by checking /var/log and the logrotate tool (/etc/logrotate.d dir) to see if its working properly (see /etc/cron.daily dir)
Absolutely agree (with Chris) - but 850 Gig of logs ?. I don't think so.
Seems like a good candidate for spinning off big consumers to separate partitions. That way the root can be left with some reserved allocation, and the data partitions can be set to zero to recover the space.
/home would be my guess as a good start.
Last edited by syg00; 08-06-2012 at 09:22 PM.
Reason: clarification of post being referred to
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.