What units are the output of mdadm -D below (specifically the Array Size and Used Dev Size values)?

The answer is Kilobytes (1 byte = 1024 byte) for the number without units or KiB for short (not KB technically 1 KB = 1000 bytes). The numbers inside of the parenthesis are explained below.

First number XXX GiB is in units of base 2, Second number is XXX GB is in units of base 1000 (or base 10). The numbers in the parenthesis exist for human readable output.

So going from the first unitless number we can convert to any of the numbers inside the parenthesis.

* To get first number in the parenthesis, just take the KiB value and divide by 1024  – keep doing so until you get a number between 0 to 9999 for human readability.

* To get second number take the KiB value and multiply by 1024 to get bytes then convert to base 10 units by dividing by 1000 until you get a number between 0 to 9999- keep track of the units logically)

To get first number (and confirm that the unitless number is that of KiB): So 976751424 KiB/1024/1024 = 931.50 GiB (Gigabytes base 2). First division by 1024 gives you MiB, second one gives you GiB. We dont have a 3rd division, but if we did it would be TiB

And to get to second number (and confirm that the unitless number is that of KiB): 976751424 KiB*1024/1000/1000/1000=1000.19 GB

GiB (where the i is in the middle) is in units of base2 (1 KiB = 1024 bytes and so on)

GB (where there is no i) is in units of base10 (1 KB = 1000 bytes)

Where does this discreptency come from: Essentailly drive manufacturers and history of humans simplifying things its easier to think in 1000s instead of 1024.

Full output below: