Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm installing Ubuntu in a VM using VirtualBox; I selected the dynamic expansion option (as opposed to fixed) in VirtualBox and set the limit to 85GB. Then, when I was installing Ubuntu, the virtual disk I created for it states it is 91.3GB. Did I make a mistake somewhere or is this difference normal? If it is normal, why does it exist? Thank you.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Yes, this is normal.

This is happening because, unfortunately, in practice, the word "gigabyte" can refer to two different units of digital information storage.

Strictly speaking, these days, a gigabyte (GB) is formally defined as exactly one billion bytes, and similarly, a megabyte (MB) is exactly one million bytes and a kilobyte (kB) is exactly one thousand bytes.

However, using powers of two is more convenient for many purposes, and 210 is 1024, which is pretty close to 103. So historically, and in many instances today, people say "kilobyte" to mean 1024 bytes, "megabyte" to mean 1024 "kilobytes", and gigabyte to mean 1024 "megabytes."

This is the distinction between "decimal" and "binary" kilobytes/megabytes/gigabytes/terabytes/etc.

These days, we have separate unit names and symbols formally defined for the units that scale by factors of 1024 rather than 1000: A kibibyte (KiB, and informally a "binary kilobyte") is 1024 bytes, a mebibyte (MiB, "binary megabyte") is 1024 kibibytes, a gibibyte (GiB, "binary gigabyte") is 1024 kibibytes, a tebibyte (TiB, "binary terabyte") is 1024 gibibytes, and so forth.

What's happening is that, apparently, VirtualBox is showing you storage capacity in units of gibibytes, while Ubuntu's installer shows it in units of (decimal) gigabytes.

See this article for more details and historical information.

share|improve this answer
1  
@jay Or to phrase it in arithmetic, 1 GiB = 1024*1024*1024 bytes while 1 GB = 1,000,000,000 bytes. Therefore 1 GiB ~= 1.0737 GB. And so 85 GiB * 1.0737 = 91.2645 or ~91.3 GB. –  irrational John Jun 13 '12 at 7:38
    
Thanks for that info Eliah, and irrational John, I see how the arithmetic works out there, but I'm still having trouble conceptualizing this. –  Jay Jun 13 '12 at 8:07
    
@Jay A GiB is bigger than a GB. You created a virtual drive with a storage capacity of 85 GiB (even though VirtualBox may have said "GB"). Since a GB is smaller than a GiB, a drive will hold more GB's than it will GiB's. Specifically, a drive that will hold 85 GiB's will hold about 91.3 GB's. –  Eliah Kagan Jun 13 '12 at 8:11
    
If Ubuntu is giving me 91.3GB and VB is giving me 85GB, then it makes sense to think that Ubuntu is defining a GB as something smaller than what VB is. So if it is between 1024MB and 1000MB equaling 1GB, then the smaller one, the 1000MB, is the way Ubuntu is defining it and 1024MB is the way VB is. By this, I get that VB sees 1024 X 85 = 87040MB, which would result in 87GB for Ubuntu (divided by 1000). What am I doing wrong to not get 91.3GB? –  Jay Jun 13 '12 at 8:13
    
@Jay 1 GB = 1000 MB. But 1 GiB = 1024 MiB (not MB). That is, 1 GB = 1,000 * 1,000 * 1,000 bytes = 1,000,000,000 bytes, while 1 GiB = 1,024 * 1,024 * 1,024 bytes = 1,073,741,824 bytes. –  Eliah Kagan Jun 13 '12 at 8:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.