Quote:
Originally Posted by rjo98
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)