LinuxQuestions.org
Review your favorite Linux distribution.
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 05-14-2014, 03:07 AM   #1
suDoh!
LQ Newbie
 
Registered: Apr 2014
Location: Bangalore
Distribution: Precise Pangolin
Posts: 21

Rep: Reputation: Disabled
Lightbulb Is this possible: df showing disk space full, but it isn't?


Hi LQ,

I was recently asked whether a scenario is genuine and if so what's the issue, here it is:

df -h shows a partition is 100% full but actually there is still space left on it, does this happens and if yes, explain what would be the reason for the same?

It was in a interview that I came across this. :P

Cheers
 
Old 05-14-2014, 04:30 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
open file handles on a deleted file? Very possible to remove a huge file and becuase somethign is still writing to that part of the disk, the space is still not available.
 
Old 05-14-2014, 06:13 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,330
Blog Entries: 1

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Yes it's possible. Depending on the filesystem deployed. You can have a limited number of blocks and files can use partial blocks. When you run out of blocks (nodes) you run out of drive space. The default for ext2,ext3,ext4 tends to be 4k blocks. So if you have all 1k files, you'll be full at 25% usage.
 
Old 05-14-2014, 06:19 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
Yes it can happen.
http://perplexed.co.uk/546_df_falsel...disk_usage.htm

Sometimes df and du does not show matched data. You can take a look at here,
http://linuxaria.com/pills/linux-she...fferent-values
 
Old 05-14-2014, 09:43 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,968

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Sounds to me like the exact opposite of the situation the other responders have mentioned. The ext2/3/4 filesystems (and probably some others) by default reserve 5% of the total space for the root user. The "100%" reported by df is 100% of the space available to ordinary users. If you look at the actual block counts, df will report 100% usage whenever the number of used blocks is at or above 95% of the total number of blocks.

I guess it boils down to what you mean by, "but it isn't." If you mean that df is reporting more usage than what you can account for from du, then the responses about deleted files apply. If you mean that there really is still some space available, then that would be the 5% reserved space.

Last edited by rknichols; 05-14-2014 at 09:49 AM. Reason: Fix "du" vs. "df" mixup. Add 2nd paragraph
 
Old 05-14-2014, 11:47 AM   #6
suDoh!
LQ Newbie
 
Registered: Apr 2014
Location: Bangalore
Distribution: Precise Pangolin
Posts: 21

Original Poster
Rep: Reputation: Disabled
Thumbs up

Thanks a lot all you folks for explaining, got it now

Cheers!
 
  


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
A question about showing disk space thomas2004ch Linux - Newbie 3 10-20-2009 04:30 AM
disk space unnecessarily full mbanwi Linux - Newbie 2 09-07-2009 10:52 AM
hard drive showing as full but isn't msound Linux - General 1 07-30-2007 10:21 AM
disk full when it isn't pete-wilko Linux - Newbie 14 06-17-2006 11:36 AM
'df -h' showing wrong free space on disk? Cdzin Slackware 4 03-16-2006 02:35 PM


All times are GMT -5. The time now is 08:29 AM.

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