mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Restore the -D, --force-device option to ignore the same device error
This commit is contained in:
parent
29ed19174f
commit
a37d3439b4
3 changed files with 13 additions and 6 deletions
6
HISTORY
6
HISTORY
|
|
@ -29,6 +29,12 @@ SnapRAID HISTORY
|
|||
identify files. The 'status' command recommends to run 'touch' if
|
||||
required.
|
||||
|
||||
9.4 2016/02
|
||||
===========
|
||||
* Restores the functionality of the -D, --force-device option when used to
|
||||
workaround the use of the same disk for two logical data drives when
|
||||
running the 'fix' command.
|
||||
|
||||
9.3 2016/01
|
||||
===========
|
||||
* Fixes an invalid assumption in the copy detection mechanism that
|
||||
|
|
|
|||
|
|
@ -867,6 +867,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
switch (operation) {
|
||||
case OPERATION_FIX :
|
||||
case OPERATION_CHECK :
|
||||
break;
|
||||
default :
|
||||
if (opt.force_device) {
|
||||
|
|
|
|||
|
|
@ -273,9 +273,9 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
|
|||
struct snapraid_disk* other = j->data;
|
||||
if (disk->device == other->device) {
|
||||
if (state->opt.force_device) {
|
||||
/* mark disks to be skipped */
|
||||
disk->skip_access = 1;
|
||||
other->skip_access = 1;
|
||||
/* note tha we just ignore the issue */
|
||||
/* and we DON'T mark the disk to be skipped */
|
||||
/* because we want to use these disks */
|
||||
if (!state->opt.no_warnings)
|
||||
log_fatal("DANGER! Ignoring that disks '%s' and '%s' are on the same device\n", disk->name, other->name);
|
||||
} else {
|
||||
|
|
@ -354,9 +354,9 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
|
|||
for (j = l + 1; j < state->level; ++j) {
|
||||
if (state->parity[l].device == state->parity[j].device) {
|
||||
if (state->opt.force_device) {
|
||||
/* mark disks to be skipped */
|
||||
state->parity[l].skip_access = 1;
|
||||
state->parity[j].skip_access = 1;
|
||||
/* note tha we just ignore the issue */
|
||||
/* and we DON'T mark the disk to be skipped */
|
||||
/* because we want to use these disks */
|
||||
if (!state->opt.no_warnings)
|
||||
log_fatal("DANGER! Skipping parities '%s' and '%s' on the same device\n", lev_config_name(l), lev_config_name(j));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue