There are 2x1.92TB drives in the system, which we use for Intel VROC. When we try to create a RAID volume, it says not enough devices with space to create array.
The available space for RAID volumes is determined by the usable space of the member disks.
If for example, our goal is to create a RAID 1 volume with two 1.92 TB drives, we can run the following command to know what the real available size that we can use is: # mdadm --detail /dev/nvme1n1
In the above command, the drive /dev/nvme1n1 is a member disk of a container that was previously created (/dev/md/imsm0). The output of this command looks like the one below:
# mdadm --examine /dev/nvme1n1
/dev/nvme1n1:
[more information]
Disk00 Serial : xxxxxxxxxxxxxxx
State : active
Id : 00000000
Usable Size : 3750738446 (1788.49 GiB 1920.38 GB)
[more information]
Notice the line that says Usable Size. This line confirms the available space of this drive. In this example, the size shown is 1920.38 GB; however, the actual value to be used is 1788.49 GiB. This is because the mdadm utility assumes the value size is entered in XiB format (KiB, MiB, GiB, TiB, etc.)
Following this example, if we want to create a RAID 1 volume of size 1800 GB, we should really create it for 1676 GiB, as shown in the following command: # mdadm --create /dev/md/md0 /dev/md/imsm0 --raid-devices 2 --level=1 --size=1676G
After the RAID volume is created, the total array size and used size can be checked with the command: #mdadm --detail /dev/md/md0