LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-10-2011, 10:47 AM   #1
wjtaylor
Member
 
Registered: Feb 2009
Posts: 78

Rep: Reputation: 15
1TB drive not only recognised as 910GB (before formatting)


Distro=Deb 6

Samsung Spinpoint F3 is only recognised as 917GB. I just partitioned it and formatted it. I would normally expect it so say 1024GB (or something close, preferably larger) and after formatting have 900GB free. I almost have 900GB free, so it's not the smaller space that's the problem; it's the math.

root@localhost:/home/user# df -h /backups
Filesystem Size Used Avail Use% Mounted on
/dev/sde1 917G 200M 871G 1% /backups

917GB - 200 MB != 871 GB

Any ideas? As you can see, this will be used for backups and I want everything working as intended.

Thanks,
WT
 
Old 03-10-2011, 11:10 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860
The drive manufacturers calculate one kilobyte as 1000 byte, not 1024 byte. So a terabyte for them is 1000 x 1000 x 1000 x 1000 bytes, which are actually your 917 GB.
To your second issue, you formatted your drive with standard-parameters, which means that 5% of it are reserved for the root user. You can fix that with
Code:
tune2fs -m 0 /dev/sde1
as root.
 
Old 03-10-2011, 11:12 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392
Hi,

I think you are running into the way things are displayed and harddisk companies that "lie".

- Seen from the hd companies: 1Mb = 1000Kb (and _not_ 1024), this will add up if you buy a 1.5Tb disk (which is not even close 1.5Tb....)

- The output of df -h is rounded, this is shown at my place: /dev/sdb3 12G 157M 11G 2% /xyz (12 - 0.157 != 11). If you want more precise numbers use df without options (bigger numbers, but precise).

Hope this helps.
 
Old 03-10-2011, 11:35 AM   #4
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934
Quote:
Originally Posted by druuna View Post
I think you are running into the way things are displayed and harddisk companies that "lie".
Technically, its not a lie now-

http://en.wikipedia.org/wiki/Megabyte

http://en.wikipedia.org/wiki/Mebibyte

Basically, HDD manufacturers decided that they would call a MB 1 000 000bytes, not 1 048 576bytes (etc), so that advertised space looked bigger. Then when somebody took them to court for misleading labeling, they used 'kilo = 1000, therefore kilobyte = 1000 bytes' as a defense. Then they brought SI into the arguement, and so we ended up with KiB/kb, MiB/MB, etc.

So we end up with the whole kiB/kB, MiB/MB, GiB/GB confusion.

Computers use binary, why the hell use base-10 standards at all?
 
Old 03-10-2011, 11:58 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392
Hi,
Quote:
Originally Posted by cascade9 View Post
I know (hence the double quotes). But in the end the consumer comes off worst (again).

Simplified: (Big) Companies => liars, Lawyers => liars and Advertisements => lies Mind the lack of double quotes

Just the opinion of a disgruntled consumer....
 
Old 03-10-2011, 01:45 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,721

Rep: Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381
To elaborate on TobiSGD's post an ext2/3/4 file system by default reserves 5% for roots use but is not included in the output of the df utility.
So 917GB = 871GB + 45GB (5% value) + .2GB

Reserved space is supposed to reduce fragmentation as well as allow root to login if the file system becomes full. And as stated since this file system is just for data, reserved space can be set to zero.

Basically, the difference between the max drive space (assumes 1 partition) and 917 as is due to file system overhead.

Last edited by michaelk; 03-10-2011 at 01:59 PM.
 
  


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
which FS for 1TB usb backup drive? clifford227 Linux - Newbie 6 08-21-2010 12:31 PM
Drive 99 Percent Full. I have got a New 1Tb External ...HELP!!! WHAT NEXT Wyatt Tuttle Linux - Desktop 21 08-18-2009 11:27 PM
Best 1TB external hard drive? tommytea Linux - Newbie 2 07-05-2009 03:32 PM
Ext3 Filesystem overhead on a 1TB drive Lommer Linux - Newbie 7 03-20-2008 09:55 AM
Problems with WD My Book 1TB external drive BWebb Linux - Hardware 2 03-20-2008 02:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:18 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