LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-05-2008, 10:42 AM   #1
moneyshotz
Member
 
Registered: Jun 2003
Posts: 75

Rep: Reputation: 15
Missing Hard Drive Space


So I just installed a new 1tb hard drive. I used fdisk to give it one partition. And then I formatted it w/ ext3. There should be nothing on it but when I looked at the drive it says 877GB free of 924gb. What happened to the rest?

for the installed hard drive...

df -h
/dev/sdb1 925G 200M 878G 1% /mnt/storage

fdisk -l
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00066782

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux

Gparted
shows 917GB free of 925GB

And there is nothing on the drive

What accounts for the discrepancies?
 
Old 06-05-2008, 11:10 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Normal. Simply put, space is reserved for root and the way it's formatted takes up inodes and space to format the system with a filesystem. Now go google, this is asked all the time.
 
Old 06-05-2008, 11:19 AM   #3
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,138

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
I think much of the difference is in the meanings of GB.

Most kinds of computer memory have traditionally been measured based on 2 to 10 power (1024), so
K = 1024
M = K * K = 1048576
G = K * M = 1073741824

But hard drives have traditionally been measured based on 10 to the 3 power (1000), so
K = 1000, M=K*K, G=K*M

Some of the programs from which you showed output seem to be reporting based on G=1073741824.

Partitioning also loses one cylinder (8225280 bytes) so your original 1000204886016 bytes is reduced to 1000202273280.

If you divide that by the larger value of G, you get 931.51.

I'm not sure what brings that down to 925 nor what brings the free portion down to 917. A file system must have some overhead, but I don't know if that is that much.

Last edited by johnsfine; 06-05-2008 at 11:21 AM.
 
Old 06-05-2008, 11:22 AM   #4
moneyshotz
Member
 
Registered: Jun 2003
Posts: 75

Original Poster
Rep: Reputation: 15
The 917GB would be understandable. That's what Gparted is reporting. I was just wondering why

df -f
/dev/sdb1 925G 200M 878G 1% /mnt/storage

So that says I only have 878GB free. I'm not sure why it would drop down that low if I don't have anything installed.
 
Old 06-05-2008, 12:42 PM   #5
chadl
Member
 
Registered: Sep 2005
Location: US
Distribution: Gentoo AMD64 Testing
Posts: 129

Rep: Reputation: 16
By default 5% of an ext3 fs is reserved for root. tunefs can change this, for example:
Code:
tune2fs -m 1 /dev/sda1
will change it to 1% (make sure it is unmounted fist).

That is why there is space that is not "used", but is not "available". On a disk setup like you have it, there is no need for reserved root space; but it is to ensure that root can get in and fix the system if the disk were to actually reach 100%.
 
Old 06-05-2008, 12:53 PM   #6
moneyshotz
Member
 
Registered: Jun 2003
Posts: 75

Original Poster
Rep: Reputation: 15
chadl, thanks for that information. That was puzzling me at first. So since this is an secondary hard drive, would you think 1% would be ok to reserve for root?
 
Old 06-05-2008, 12:57 PM   #7
chadl
Member
 
Registered: Sep 2005
Location: US
Distribution: Gentoo AMD64 Testing
Posts: 129

Rep: Reputation: 16
I said 1%, but actually, as none of the system daemons are going to be using the disk, you might as well set it to 0 (-m 0) so that none of it gets reserved (as chances are, none of it will be used anyway)
 
Old 06-05-2008, 01:43 PM   #8
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally Posted by moneyshotz View Post
So that says I only have 878GB free. I'm not sure why it would drop down that low if I don't have anything installed.
Like I mentioned in my first reply, it's reserved for root. Did you not read my reply? Did you even try to search? This is literally asked all the time.
 
Old 06-05-2008, 03:19 PM   #9
moneyshotz
Member
 
Registered: Jun 2003
Posts: 75

Original Poster
Rep: Reputation: 15
trickykid, you didn't mention how much was reserved by the root. I was just surprised why I missing so much space. I wasn't sure if inodes and/or root was taking up most of the space.

chadl did a great job explaining to me that 5% was used by root and how to fix it.

Last edited by moneyshotz; 06-05-2008 at 03:20 PM.
 
Old 06-05-2008, 03:22 PM   #10
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally Posted by moneyshotz View Post
trickykid, you didn't mention how much was reserved by the root. I was just surprised why I missing so much space. I wasn't sure if inodes and/or root was taking up most of the space.

chadl did a great job explaining to me that 5% was used by root and how to fix it.
But that's why I also said a search could have found the information for you, the details. I'm trying to get more people to utilize searching by such means, honestly, most of the questions any member asks has already been answered, in most cases.
 
  


Reply

Tags
ext3


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing hard drive free space encomium Linux - Server 3 03-26-2008 03:11 AM
Possible hacking; wiped - now hard drive space missing? - hidden files? trekk Linux - Security 9 11-10-2006 11:17 AM
Missing hard drive space rx7haze Linux - General 13 11-16-2005 08:38 AM
suse and hard drive space missing SuSE05 Suse/Novell 1 04-30-2005 09:51 AM
Hard drive space tied2 Linux - General 1 06-29-2002 07:16 PM


All times are GMT -5. The time now is 06:33 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration