LVM: 2 mirrored log monitor fixes
PATCH 1/1 LVM: 2 mirrored log monitor fixes
Patch name: lvm2-mirrored-log-monitor-fixes.patch
If an event is received on a mirrored LV which also happens to be the log of a mirror, strip off the '_mlog' component extension of the name and pass the encapsulating LV to 'lvconvert --repair'.
daemons/dmeventd/plugins/mirror/dmeventd_mirror.c +5 -0
@@ -148,6 +148,11 @@ static int _remove_failed_devices(constreturn -ENOMEM ;/* FIXME Replace with generic error return - reason for failure has already got logged */ } +/* strip off the mirror component designations */ + layer =strstr (lv,"_mlog" ); +if (layer) + layer ='\0' ; +/* FIXME Is any sanity-checking required on %s? */ if (CMD_SIZE <=snprintf (cmd_str,CMD_SIZE ,"lvconvert --config devices{ignore_suspended_devices=1} --repair --use-policies %s/%s" , vg, lv)) {/* this error should be caught above, but doesn't hurt to check again */
PATCH 1/1 LVM: 2 mirrored log monitor fixes
Quoted 12 lines · Jonathan Brassow
Patch name: lvm2-mirrored-log-monitor-fixes.patch
If an event is received on a mirrored LV which also happens to be the log of a mirror, strip off the '
_mlog' component extension of the name and pass the encapsulating LV to 'lvconvert --repair'.Index:
LVM2/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
===================================================================
daemons/dmeventd/plugins/mirror/dmeventd_mirror.c static int _remove_failed_devices(const · line 154
Quoted 7 lines
daemons/dmeventd/plugins/mirror/dmeventd_mirror.c +4
-0@@ -148,6 +148,11 @@ static int _remove_failed_devices(constreturn -ENOMEM ;/* FIXME Replace with generic error return - reason for failure has already got logged */ } +/* strip off the mirror component designations */ + layer =strstr (lv,"_mlog" ); +if (layer) + layer ='\0' ;
Typo? :)
*layer = '\0';
Thanks,
Taka
PATCH 1/1 LVM: 2 mirrored log monitor fixes
Quoted 23 lines · Takahiro Yasui
Quoted 16 lines · Jonathan Brassow
Patch name: lvm2-mirrored-log-monitor-fixes.patch
If an event is received on a mirrored LV which also happens to be the log of a mirror, strip off the '
_mlog' component extension of the name and pass the encapsulating LV to 'lvconvert --repair'.Index:
LVM2/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
===================================================================daemons/dmeventd/plugins/mirror/dmeventd_mirror.c +0
-0@@ -148,6 +148,11 @@ static int _remove_failed_devices(constreturn -ENOMEM ;/* FIXME Replace with generic error return - reason for failure has already got logged */
}daemons/dmeventd/plugins/mirror/dmeventd_mirror.c static int _remove_failed_devices(const · line 154
Quoted 4 lines
daemons/dmeventd/plugins/mirror/dmeventd_mirror.c +4
-0+/* strip off the mirror component designations */ + layer =strstr (lv,"_mlog" ); +if (layer) + layer ='\0' ;Typo? :)
Quoted 3 lines
*layer = '\0';Thanks,
Good catch, thank-you.
brassow