networked day to day technical issues


The Confusion Between Gigabyte And Gibibyte

Recently i have been confronted with several cases where on the SAN side a LUN was configured, of a certain size and on the Linux side it was detected with a larger size. The SAN vendor's support team didn't ever reply to why this is happening and after some digging i managed to find the explanation. I presumed it was some kind of issue with how each part (SAN Storage Array and Linux) measured the LUN and it turned out to be so. The Linux in question is RHEL 5.5 64bit , kernel 2.6.18

It turns out that on the SAN side the size was presented in Gibibytes and Linux presented the size as Gigabytes .

1 Gigabyte (GB) = 1 x 1000 x 1000 x 1000 = 1000000000 bytes

1 Gibibyte (GiB) = 2^30 = 1 x 1024 x 1024 x 1024 = 1073741824 bytes

So a 500 GiB LUN was reported on Linux as ~536.8 GB

Unfortunately this confusion will haunt for a long time.

More details on wikipedia and  man 7 units