LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-18-2010, 11:59 AM   #1
reed68
LQ Newbie
 
Registered: Aug 2007
Posts: 28

Rep: Reputation: 0
Disk Utility and "df" show different disk space. confusion sets in.


Hi,

I don't understand disk sizes in Linux. Can someone help me out?

I have a 500GB drive. It's ext4. I have run "tune2fs -m 0" on it to reserve the amount of space reserved for root to 0.

I'm using Ubuntu 10.04 that comes with a Disk Utility. When I run "System->Administration->Disk Utility (palimpsest)" the disk shows up as 500GB (see picture). But when I run df -h it shows up as 459GB. So, I don't understand the discrepancy.

When I run df I get the following:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 459G 448G 12G 98% /home

Question: Why is Disk Utility showing me something different than "df"?
Attached Images
File Type: jpg 500GBHardDiskDiskUtility.jpg (174.9 KB, 12 views)
 
Old 11-18-2010, 12:22 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Some of the disk space is used to hold the file system data structures (inodes). This is how the kernel finds files stored on the disk. The inodes point to the beginning and end of each file.

Actually it's a tiny bit more complicated but I believe that the above explanation is accurate in the context of your question.

The same situation exists on Windows computers. The file system data structures in NTFS require some disk space even if there are no files stored in the file system.

Last edited by stress_junkie; 11-18-2010 at 12:26 PM.
 
Old 11-18-2010, 12:35 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046
The harddisk manufacturers, and it seems palimpsest too, are counting in decimal system, df is counting in binary. So one kilobyte for the manufacturer is 1000 Bytes, but for the computer it is 1024 Bytes. The difference adds up to 41 GB in your case.

Last edited by TobiSGD; 11-18-2010 at 12:36 PM. Reason: fixed typos and grammar
 
Old 11-18-2010, 12:35 PM   #4
reed68
LQ Newbie
 
Registered: Aug 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Hi,

Thanks for your response. I had thought that since I ran "tune2fs -m 0" on it to reserve the amount of space reserved for root to 0 that that would have gotten rid of the inodes thing.
 
Old 11-18-2010, 12:40 PM   #5
reed68
LQ Newbie
 
Registered: Aug 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Hi, Thanks for all the explanations! And I see that the man page includes the 1000/1024 fact that TobiSGD pointed out above.

I re-read the man page and now ran df with the H option and get:
$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 493G 481G 12G 98% /home
 
Old 11-18-2010, 12:40 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by reed68 View Post
Hi,

Thanks for your response. I had thought that since I ran "tune2fs -m 0" on it to reserve the amount of space reserved for root to 0 that that would have gotten rid of the inodes thing.
The amount of disk space reserved for root is a separate issue from inodes. The file system is based on inodes to map the location of the files. You cannot have a file system without inodes.
 
Old 11-18-2010, 12:44 PM   #7
reed68
LQ Newbie
 
Registered: Aug 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Hi stress_junkie, Thanks for clearing that up for me!
 
  


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
Debian / Wrong free space / "du" and "ls" show different space use brgsousa Linux - Software 3 02-25-2010 11:55 AM
Kubuntu slow system -- now get "low disk space" error drjoewebb Linux - Hardware 8 08-23-2008 05:28 PM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 06:19 PM
Red Hat 6.2 disk space error - "Freeing blocks not in datazone" richfink Linux - Software 2 08-26-2006 04:08 PM
Allocating free disk space - start of "/ " needs moving. ibex Linux - General 4 04-17-2006 09:46 PM


All times are GMT -5. The time now is 01:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration