You can use RAID 5 or RAID 6 erasure coding to protect against data loss and increase storage efficiency.

Erasure coding can provide the same level of data protection as mirroring (RAID 1), while using less storage capacity. RAID 5 or RAID 6 erasure coding enables vSAN to tolerate the failure of up to two capacity devices in the datastore. You can configure RAID 5 on all-flash clusters with four or more fault domains. You can configure RAID 5 or RAID 6 on all-flash clusters with six or more fault domains.

RAID 5 or RAID 6 erasure coding requires less additional capacity to protect your data than RAID 1 mirroring. For example, a VM protected by a Failures to tolerate value of 1 with RAID 1 requires twice the virtual disk size, but with RAID 5 it requires 1.33 times the virtual disk size. The following table shows a general comparison between RAID 1 and RAID 5 or RAID 6.

Table 1. Capacity Required to Store and Protect Data at Different RAID Levels
RAID Configuration Failures to Tolerate Data Size Capacity Required
RAID 1 (mirroring) 1 100 GB 200 GB
RAID 5 or RAID 6 (erasure coding) with four fault domains 1 100 GB 133 GB
RAID 1 (mirroring) 2 100 GB 300 GB
RAID 5 or RAID 6 (erasure coding) with six fault domains 2 100 GB 150 GB

RAID 5 or RAID 6 erasure coding is a policy attribute that you can apply to virtual machine components. To use RAID 5, set Failure tolerance method to RAID-5/6 (Erasure Coding) and Failures to tolerate to 1. To use RAID 6, set Failure tolerance method to RAID-5/6 (Erasure Coding) and Failures to tolerate to 2. RAID 5 or RAID 6 erasure coding does not support a Failures to tolerate value of 3.

To use RAID 1, set Failure tolerance method to RAID-1 (Mirroring). RAID 1 mirroring requires fewer I/O operations to the storage devices, so it can provide better performance. For example, a cluster resynchronization takes less time to complete with RAID 1.

Note: In a vSAN stretched cluster, the Failure tolerance method of RAID-5/6 (Erasure Coding) applies only to the Site disaster tolerance setting.
Note: For a vSAN Express Storage Architecture cluster, depending on the number of fault domains that you use, the number of components listed under RAID 5 ( Monitor > vSAN> Virtual Objects> testVM > View Placement Details) will vary. If six or more fault domains are available in the cluster, then five components will be listed under RAID 5. If five or fewer fault domains are available, then three components will be listed.

For more information about configuring policies, see Using vSAN Policies.