mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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:
+15
-4
@@ -876,6 +876,18 @@ check_replication(nvlist_t *config, nvlist_t *newroot)
|
||||
(u_longlong_t)mirror->zprl_children);
|
||||
ret = -1;
|
||||
}
|
||||
} else if (is_raidz_draid(current, new)) {
|
||||
if (current->zprl_parity != new->zprl_parity) {
|
||||
vdev_error(gettext(
|
||||
"mismatched replication level: pool and "
|
||||
"new vdev with different redundancy, %s "
|
||||
"and %s vdevs, %llu vs. %llu\n"),
|
||||
current->zprl_type,
|
||||
new->zprl_type,
|
||||
(u_longlong_t)current->zprl_parity,
|
||||
(u_longlong_t)new->zprl_parity);
|
||||
ret = -1;
|
||||
}
|
||||
} else if (strcmp(current->zprl_type, new->zprl_type) != 0) {
|
||||
vdev_error(gettext(
|
||||
"mismatched replication level: pool uses %s "
|
||||
@@ -1581,13 +1593,12 @@ construct_spec(nvlist_t *props, int argc, char **argv)
|
||||
is_dedup = is_spare = B_FALSE;
|
||||
}
|
||||
|
||||
if (is_log || is_special || is_dedup) {
|
||||
if (is_log) {
|
||||
if (strcmp(type, VDEV_TYPE_MIRROR) != 0) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("invalid vdev "
|
||||
"specification: unsupported '%s' "
|
||||
"device: %s\n"), is_log ? "log" :
|
||||
"special", type);
|
||||
"specification: unsupported 'log' "
|
||||
"device: %s\n"), type);
|
||||
goto spec_out;
|
||||
}
|
||||
nlogs++;
|
||||
|
||||
Reference in New Issue
Block a user