Calculate additional disks or capacity needed to reach a target storage size.
Expanding storage to a target capacity requires accounting for the RAID overhead of the new disks being added, not just their raw size — RAID 5 sacrifices one disk's worth of capacity to parity regardless of array size, RAID 6 sacrifices two, and mirrored levels (RAID 1/10) sacrifice half. This calculator finds the minimum number of same-size new disks, at the chosen RAID level, needed to close the gap between current and target usable capacity.
New capacity
new_capacity = current_capacity + disks_added × disk_size × raid_efficiency
RAID 5 always dedicates exactly one disk's worth of capacity to distributed parity, so efficiency is (n-1)/n — with 4 disks that's 75% usable, but with 8 disks it rises to 87.5%, since the fixed one-disk parity cost is spread across more capacity.
Growing an existing RAID array (if your RAID controller/mdadm setup supports online reshaping) avoids downtime and data migration, but adding a separate new array is often simpler, avoids a lengthy and I/O-intensive reshape/resync operation, and lets you choose a different RAID level for the new capacity.
No — this calculates usable data capacity only. If you want dedicated hot-spare disks for automatic rebuild, add their count on top of the disksNeeded result; they don't contribute to usable capacity in the array itself.