typeset VDEV_MAX_MB=$(( floor(4 * MINVDEVSIZE * 0.75 / 1024 / 1024) ))
typeset VDEV_MIN_MB=$(( floor(4 * MINVDEVSIZE * 0.30 / 1024 / 1024) ))
-for type in "" "mirror" "raidz2"; do
+for type in "" "mirror" "raidz2" "draid"; do
if [[ "$type" = "" ]]; then
VDEVS="$TRIM_VDEV1"
elif [[ "$type" = "mirror" ]]; then
VDEVS="$TRIM_VDEV1 $TRIM_VDEV2"
- else
+ elif [[ "$type" = "raidz2" ]]; then
VDEVS="$TRIM_VDEV1 $TRIM_VDEV2 $TRIM_VDEV3"
+ elif [[ "$type" = "draid" ]]; then
+ VDEVS="$TRIM_VDEV1 $TRIM_VDEV2 $TRIM_VDEV3 $TRIM_VDEV4"
+
+ # The per-vdev utilization is lower due to the capacity
+ # resilverd for the distributed spare.
+ VDEV_MAX_MB=$(( floor(4 * MINVDEVSIZE * 0.50 / 1024 / 1024) ))
fi
log_must truncate -s $((4 * MINVDEVSIZE)) $VDEVS