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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-05-2012, 10:34 PM
|
#1
|
LQ Newbie
Registered: Jul 2012
Posts: 16
Rep:
|
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
|
|
|
08-05-2012, 11:08 PM
|
#2
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
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.
|
|
|
08-06-2012, 03:10 PM
|
#3
|
LQ Newbie
Registered: Jul 2012
Posts: 16
Original Poster
Rep:
|
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
|
|
|
08-06-2012, 03:17 PM
|
#4
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
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.
|
08-06-2012, 04:06 PM
|
#5
|
LQ Newbie
Registered: Jul 2012
Posts: 16
Original Poster
Rep:
|
Hi suicidaleggroll,
That's great thank you! My problem is solved
Matt
|
|
|
08-06-2012, 07:08 PM
|
#6
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415
|
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)
|
|
|
08-06-2012, 09:19 PM
|
#7
|
LQ Newbie
Registered: Jul 2012
Posts: 16
Original Poster
Rep:
|
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
|
|
|
08-06-2012, 09:20 PM
|
#8
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286
|
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
|
|
|
08-07-2012, 03:32 AM
|
#9
|
Member
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 218
Rep:
|
in addition to the above, running df-h as root shows the real available space on your drives.
|
|
|
All times are GMT -5. The time now is 09:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|