1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmeventd: improve more raid status reporting

When we want to report primary leg failure, check for intial 'a',
since otherwice 'Aa idle' is normally visible.

Also reset array of bit flags marking dead devices, once
plugin detects raid is in sync.
This commit is contained in:
Zdenek Kabelac 2017-06-24 00:06:12 +02:00
parent 2a50a28f3e
commit 0016b79c8b
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.141 -
===============================
Reset array with dead rimage devices once raid gets in sync.
Drop unneeded --config option from raid dmeventd plugin.
dm_get_status_raid() handle better some incosistent md statuses.
Accept truncated files in calls to dm_stats_update_regions_from_fd().

View File

@ -68,7 +68,8 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
* This is simply the way the kernel works...
*/
if (!strcmp(status->sync_action, "idle") &&
strchr(status->dev_health, 'a')) {
(status->dev_health[0] == 'a') &&
(status->insync_regions < status->total_regions)) {
log_error("Primary sources for new RAID, %s, have failed.",
device);
dead = 1; /* run it through LVM repair */
@ -97,6 +98,8 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
}
} else {
state->failed = 0;
if (status->insync_regions == status->total_regions)
memset(&state->raid_devs, 0, sizeof(state->raid_devs));
log_info("%s array, %s, is %s in-sync.",
status->raid_type, device,
(status->insync_regions == status->total_regions) ? "now" : "not");