mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Allows again to use a single data disk with single parity.
This commit is contained in:
parent
e4938013a3
commit
7e89583088
2 changed files with 2 additions and 1 deletions
1
raid.h
1
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
|
||||
|
||||
|
|
|
|||
2
state.c
2
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue