diff --git a/raid.h b/raid.h index 5ced7529..1e21cb63 100644 --- a/raid.h +++ b/raid.h @@ -59,6 +59,7 @@ /** * Minimum number of data disks. * Some optimizations require at least two disks. + * It's anyway allowed to have a single data disk with a sigle parity. */ #define RAID_DATA_MIN 2 diff --git a/state.c b/state.c index bfac0bf4..2d385331 100644 --- a/state.c +++ b/state.c @@ -895,7 +895,7 @@ static void state_map(struct snapraid_state* state) exit(EXIT_FAILURE); } /* some raid functions assume at least two data disk */ - if (diskcount < RAID_DATA_MIN) { + if (state->level > 1 && diskcount < RAID_DATA_MIN) { fprintf(stderr, "Too few data disks. You must define at least %u.\n", RAID_DATA_MIN); exit(EXIT_FAILURE); }