Release topology restrictions on special/dedup

Special vdevs were originally designed as a small blocks storage
for dRAID, for which role RAIDZ/dRAID topologies are not good.
But it is more often used as SSD storage for metadata and hot
data of HDD pools.  In these use cases narrow RAIDZ of SSDs might
be fine, so we should not introduce unnecessary restrictions,
and ZFS internally does not care.

Similar applies to dedup vdevs.  Original DDT used 4KB blocks,
for which anything but mirror was a terrible storage.  But new
FDT implementation uses 32KB blocks by default, which are much
less demanding even including compression, and which could be
increased even higher now, if needed.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #17496
This commit is contained in:
Alexander Motin
2025-07-02 12:33:47 -04:00
committed by GitHub
parent eacf618a65
commit bf846dcb7d
5 changed files with 30 additions and 12 deletions
@@ -41,9 +41,4 @@ log_mustnot zpool create $TESTPOOL $ZPOOL_DISKS special mirror \
log_mustnot display_status $TESTPOOL
log_mustnot zpool destroy -f $TESTPOOL
log_mustnot zpool create $TESTPOOL raidz $ZPOOL_DISKS special raidz \
$CLASS_DISK0 $CLASS_DISK1 $CLASS_DISK2
log_mustnot display_status $TESTPOOL
log_mustnot zpool destroy -f $TESTPOOL
log_pass $claim
@@ -32,7 +32,7 @@ log_onexit cleanup
log_must disk_setup
for type in "" "mirror" "raidz"
for type in "" "mirror" "raidz" "draid"
do
log_must zpool create $TESTPOOL $type $ZPOOL_DISKS
@@ -47,6 +47,12 @@ do
$CLASS_DISK0 $CLASS_DISK1
log_must zpool iostat -H $TESTPOOL $CLASS_DISK0
log_must zpool iostat -H $TESTPOOL $CLASS_DISK1
elif [ "$type" = "draid" ]; then
log_must zpool add $TESTPOOL special raidz \
$CLASS_DISK0 $CLASS_DISK1 $CLASS_DISK2
log_must zpool iostat -H $TESTPOOL $CLASS_DISK0
log_must zpool iostat -H $TESTPOOL $CLASS_DISK1
log_must zpool iostat -H $TESTPOOL $CLASS_DISK2
else
log_must zpool add $TESTPOOL special $CLASS_DISK0
log_must zpool iostat -H $TESTPOOL $CLASS_DISK0
@@ -37,7 +37,7 @@ typeset ac_value
typeset stype=""
typeset sdisks=""
for type in "" "mirror" "raidz"
for type in "" "mirror" "raidz" "draid"
do
if [ "$type" = "mirror" ]; then
stype="mirror"
@@ -45,6 +45,9 @@ do
elif [ "$type" = "raidz" ]; then
stype="mirror"
sdisks="${CLASS_DISK0} ${CLASS_DISK1}"
elif [ "$type" = "draid" ]; then
stype="raidz"
sdisks="${CLASS_DISK0} ${CLASS_DISK1} ${CLASS_DISK2}"
else
stype=""
sdisks="${CLASS_DISK0}"
@@ -36,7 +36,7 @@ typeset stype=""
typeset sdisks=""
typeset props=""
for type in "" "mirror" "raidz"
for type in "" "mirror" "raidz" "draid"
do
if [ "$type" = "mirror" ]; then
stype="mirror"
@@ -45,6 +45,9 @@ do
elif [ "$type" = "raidz" ]; then
stype="mirror"
sdisks="${CLASS_DISK0} ${CLASS_DISK1}"
elif [ "$type" = "draid" ]; then
stype="raidz"
sdisks="${CLASS_DISK0} ${CLASS_DISK1} ${CLASS_DISK2}"
else
stype=""
sdisks="${CLASS_DISK0}"