Skip to content

Commit 8c55296

Browse files
author
Paul Dagnelie
committed
Allow mixing anyraid and mirrors
Signed-off-by: Paul Dagnelie <[email protected]>
1 parent 46d5b1f commit 8c55296

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

cmd/zpool/zpool_vdev.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ is_raidz_mirror(replication_level_t *a, replication_level_t *b,
458458
{
459459
if ((strcmp(a->zprl_type, "raidz") == 0 ||
460460
strcmp(a->zprl_type, "draid") == 0) &&
461-
strcmp(b->zprl_type, "mirror") == 0) {
461+
(strcmp(b->zprl_type, "mirror") == 0 ||
462+
strcmp(b->zprl_type, "anyraid") == 0)) {
462463
*raidz = a;
463464
*mirror = b;
464465
return (B_TRUE);
@@ -749,19 +750,6 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
749750
else
750751
return (NULL);
751752
}
752-
} else if (strcmp(lastrep.zprl_type, rep.zprl_type) !=
753-
0) {
754-
if (ret != NULL)
755-
free(ret);
756-
ret = NULL;
757-
if (fatal)
758-
vdev_error(gettext(
759-
"mismatched replication level: "
760-
"both %s and %s vdevs are "
761-
"present\n"),
762-
lastrep.zprl_type, rep.zprl_type);
763-
else
764-
return (NULL);
765753
} else if (lastrep.zprl_parity != rep.zprl_parity) {
766754
if (ret)
767755
free(ret);

0 commit comments

Comments
 (0)