I have a bunch of drives of different sizes. In order to get them relatively aligned from a size perspective, I created a volume group. So the drives I have for the array are:
- 1400GB (Linux)
- 1200GB (LVM)
- 931GB (Linux)
The output of MDADM is:
sudo mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sda /dev/mapper/smalldisks-smallvolume /dev/sdb
mdadm: size set to 976631296K
mdadm: automatically enabling write-intent bitmap on large array
mdadm: largest drive (/dev/sdb) exceeds size (976631296K) by more than 1%
My understanding is that (assuming all the sizes are the same or within 1%) the total available size of the array is: (1400 + 1200 + 931) - 1400GB for parity. Why then is the size being set to 976631296K?
From another answer I read that if the sizes are outside of the 1% threshold then the smaller disk size will be used.
Does this mean that if my drives are not exactly the same size (or less than 1% different) then no matter how many disks I add to the array, it will only ever be the size of the smallest disk?
What do I need to do in order to get my largest drive as the parity and the 2 smaller drives added together as the capacity of the array?
(N-1) x S(min) = 2 x 931GB = 1862GB