LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-05-2012, 10:34 PM   #1
mattjjs
LQ Newbie
 
Registered: Jul 2012
Posts: 16

Rep: Reputation: Disabled
df -h shows 100% used but I have deleted files...


Hi Guys,

Thanks for taking the time to look at my post!

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:

Filesystem Size Used Avail Use% Mounted on
/dev/sda3 901G 859G 0 100% /
/dev/sda1 190M 17M 165M 9% /boot
tmpfs 505M 0 505M 0% /dev/shm

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.

Matt
 
Old 08-05-2012, 11:08 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

you probably have 5% of blocks reserved. You can check by running the following as root.

Code:
tune2fs -l /dev/sda3
If this is the case, given the size of the disk you could probably reduce this to 1% or 2%. IIRC, you could do this by:
Code:
tune2fs -m 2 /dev/sda3
Please check the tune2fs man page for details.

Please note however that it is usually considered good practice to keep your disks below about 90% full.

Evo2.
 
Old 08-06-2012, 03:10 PM   #3
mattjjs
LQ Newbie
 
Registered: Jul 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi Evo2,

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


Once again I really appreciate your help!

Matt
 
Old 08-06-2012, 03:17 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
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.
 
1 members found this post helpful.
Old 08-06-2012, 04:06 PM   #5
mattjjs
LQ Newbie
 
Registered: Jul 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi suicidaleggroll,

That's great thank you! My problem is solved

Matt
 
Old 08-06-2012, 07:08 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
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)
 
Old 08-06-2012, 09:19 PM   #7
mattjjs
LQ Newbie
 
Registered: Jul 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi Chris,

Thanks for the advice! This is just a backup server so just squeezing out as much space as I can until I get an answer on what I can delete

Matt
 
Old 08-06-2012, 09:20 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,848

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
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
 
Old 08-07-2012, 03:32 AM   #9
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
in addition to the above, running df-h as root shows the real available space on your drives.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Something has deleted cca 100 libs CMartin Slackware 13 12-13-2012 06:37 PM
DF -h shows md2 100% under var dir Exrace Linux - Newbie 1 11-19-2010 10:26 AM
every things shows in trash both deleted and nondeleted rakesh_sni Linux - Newbie 3 08-31-2009 01:01 PM
debugfs shows 0 deleted inodes found, however there're some... jaggy00 Linux - Security 3 06-06-2007 07:52 PM
root partition shows 100% full in RH 7.2 dmcmurray5 Red Hat 2 05-18-2004 04:24 PM


All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration