OPTION(osd_min_down_reports, OPT_INT, 3), // number of times a down OSD must be reported for it to count
OPTION(osd_replay_window, OPT_INT, 45),
OPTION(osd_preserve_trimmed_log, OPT_BOOL, true),
+ OPTION(osd_auto_mark_unfound_lost, OPT_BOOL, false),
OPTION(osd_recovery_delay_start, OPT_FLOAT, 15),
OPTION(osd_recovery_max_active, OPT_INT, 5),
OPTION(osd_recovery_max_chunk, OPT_U64, 1<<20), // max size of push chunk
int osd_min_down_reports;
int osd_replay_window;
bool osd_preserve_trimmed_log;
+ bool osd_auto_mark_unfound_lost;
float osd_recovery_delay_start;
int osd_recovery_max_active;
if (g_conf.osd_check_for_log_corruption)
pg->check_log_for_corruption(pg->osd->store);
- if (pg->missing.num_missing() > pg->missing_loc.size()) {
- if (pg->all_unfound_are_lost(pg->osd->osdmap)) {
+ int unfound = pg->missing.num_missing() - pg->missing_loc.size();
+ if (unfound > 0 &&
+ pg->all_unfound_are_lost(pg->osd->osdmap)) {
+ if (g_conf.osd_auto_mark_unfound_lost) {
+ pg->osd->clog.error() << pg->info.pgid << " has " << unfound
+ << " objects unfound and apparently lost, automatically marking lost\n";
pg->mark_all_unfound_as_lost(*context< RecoveryMachine >().get_cur_transaction());
- }
+ } else
+ pg->osd->clog.error() << pg->info.pgid << " has " << unfound << " objects unfound and apparently lost\n";
}
if (!pg->snap_trimq.empty() &&