LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-16-2009, 03:01 PM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
MB to useable GB table after you install Linux


It seems like when I install servers, depending on the size of the partitions I create during install, when I do a df -h, the drives report the wrong GB. is there a table somewhere that says what you should put in for MB's to get the correct number of GB's usable space?

Like if you do 6*1024 for MB, that doesn't show as 6GB after install.
 
Old 09-16-2009, 05:10 PM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by rjo98 View Post
It seems like when I install servers, depending on the size of the partitions I create during install, when I do a df -h, the drives report the wrong GB. is there a table somewhere that says what you should put in for MB's to get the correct number of GB's usable space?

Like if you do 6*1024 for MB, that doesn't show as 6GB after install.
Well, the math isn't difficult. And one can control df's results -- if you choose the -H option, the numbers are listed in gigabytes (1000^3) and for -h they are listed in gibibytes (1024^3). Seems like the -H option would make life simpler, especially if the partition configuration program also uses the SI units.

Also, there is the issue that, if you choose a partition size that isn't an integral number of sectors, the installer has to round up or down, and again, I don't know which way that goes. So there are a number of unknowns here, but if the unknowns were resolved, if we knew exactly what is going on, we still would not be likely to get exact agreement with an entered value.

But I will say this. If the MB entry is expressed in mebibytes and you enter 6*1024 mebibytes as in your example, you will get:

6 mebibytes (1 mebibyte = 1024^2 bytes) * 1024 = 6442450944 bytes

That result expressed as gibibytes = 6442450944 / 1024^3 = 6
That result expressed as gigabytes = 6442450944 / 1000^3 = 6.442450944

Based on that, this could become very confusing -- we're talking about two programs: the partition configuration routine, which might assume units of either megabytes or mebibytes, and "df", which at least you can control.

Here's a short reference: Gigabyte (Wikipedia)
 
  


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
[SOLVED] Kingston USB U3 Data Traveler NOT useable Linux ler0nldb2 Linux - Newbie 6 09-06-2009 03:24 PM
no table to install silan sc92031 PCI Fast Ethernet Adapter on redhat enter linux 5 DINESHKUMARC Linux - Networking 1 09-16-2008 10:39 AM
Linux makes changes to another drives partition table during install. vjones777 Linux - Newbie 5 04-20-2006 06:06 PM
config-2.4.20-8 useable to 2.6? demmylls Linux - General 12 12-24-2003 10:37 AM
absolute MiNiuM useable PC for LINUX(peanut or Vector distros) chilibowl Linux - Hardware 11 11-29-2002 02:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:25 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
Open Source Consulting | Domain Registration