Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
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.
|
|
03-10-2011, 10:47 AM
|
#1
|
Member
Registered: Feb 2009
Posts: 78
Rep:
|
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
|
|
|
03-10-2011, 11:10 AM
|
#2
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
|
|
03-10-2011, 11:12 AM
|
#3
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
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.
|
|
|
03-10-2011, 11:35 AM
|
#4
|
Senior Member
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753
|
Quote:
Originally Posted by druuna
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?
|
|
|
03-10-2011, 11:58 AM
|
#5
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Quote:
Originally Posted by cascade9
|
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....
|
|
|
03-10-2011, 01:45 PM
|
#6
|
Moderator
Registered: Aug 2002
Posts: 26,480
|
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.
|
|
|
All times are GMT -5. The time now is 09:34 AM.
|
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
|
|