mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Prints a final warning in case of silent error for sync and scrub.
This commit is contained in:
parent
f0a09de900
commit
aee56ba2c7
2 changed files with 13 additions and 9 deletions
|
|
@ -329,9 +329,6 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
error_on_this_block = 1;
|
||||
} else {
|
||||
fprintf(stderr, "Data error in file '%s' at position '%u'\n", handle[j].path, block_file_pos(block));
|
||||
fprintf(stderr, "WARNING! Unexpected data error in a data disk! The block is now marked as bad!\n");
|
||||
fprintf(stderr, "Try with 'snapraid -e fix' to recover!\n");
|
||||
|
||||
++silent_error;
|
||||
silent_error_on_this_block = 1;
|
||||
}
|
||||
|
|
@ -394,9 +391,6 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
error_on_this_block = 1;
|
||||
} else {
|
||||
fprintf(stderr, "Data error in parity '%s' at position '%u'\n", lev_config_name(l), i);
|
||||
fprintf(stderr, "WARNING! Unexpected data error in a parity disk! The block is now marked as bad!\n");
|
||||
fprintf(stderr, "Try with 'snapraid -e fix' to recover!\n");
|
||||
|
||||
++silent_error;
|
||||
silent_error_on_this_block = 1;
|
||||
}
|
||||
|
|
@ -464,6 +458,12 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
|
||||
state_usage_print(state);
|
||||
|
||||
if (silent_error != 0) {
|
||||
fprintf(stderr, "WARNING! Unexpected data errors! The respective blocks are now marked as bad!\n");
|
||||
fprintf(stderr, "Use 'snapraid status' to list the bad blocks.\n");
|
||||
fprintf(stderr, "Use 'snapraid -e fix' to recover.\n");
|
||||
}
|
||||
|
||||
if (error || silent_error || io_error) {
|
||||
printf("\n");
|
||||
printf("%8u file errors\n", error);
|
||||
|
|
|
|||
|
|
@ -756,9 +756,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
continue;
|
||||
} else { /* otherwise it's a BLK with silent error */
|
||||
fprintf(stdlog, "error:%u:%s:%s: Data error at position %u\n", i, disk->name, file->sub, block_file_pos(block));
|
||||
fprintf(stderr, "Data error at file '%s' at position '%u'\n", handle[j].path, block_file_pos(block));
|
||||
fprintf(stderr, "WARNING! Unexpected data error in a data disk! The block is now marked as bad!\n");
|
||||
fprintf(stderr, "Try with 'snapraid -e fix' to recover!\n");
|
||||
fprintf(stderr, "Data error in file '%s' at position '%u'\n", handle[j].path, block_file_pos(block));
|
||||
|
||||
/* save the failed block for the fix */
|
||||
failed[failed_count].index = j;
|
||||
|
|
@ -1072,6 +1070,12 @@ end:
|
|||
|
||||
state_usage_print(state);
|
||||
|
||||
if (silent_error != 0) {
|
||||
fprintf(stderr, "WARNING! Unexpected data errors! The respective blocks are now marked as bad!\n");
|
||||
fprintf(stderr, "Use 'snapraid status' to list the bad blocks.\n");
|
||||
fprintf(stderr, "Use 'snapraid -e fix' to recover.\n");
|
||||
}
|
||||
|
||||
if (error || silent_error || io_error) {
|
||||
printf("\n");
|
||||
printf("%8u file errors\n", error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue