Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/metadata/mirror.c

PATCH [email protected] 1 participant 1 message Jul 9, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow at sourceware.org 2010-07-09 15:08:15

Modified files:
. : WHATS_NEW
lib/metadata : mirror.c

Log message:
Finish fix for bug 607347: failing both redundant mirror log legs...

A previous check-in added logic to handle the case where both images of a mirrored log failed. It solved the problem by simply removing the log entirely - leaving the parent mirror with a 'core' log. This worked for most cases. However, if there was a small delay between the failures of the two mirrored log devices, the mirror would hang, LVM would hang, and no additional LVM commands could be issued.

When the first leg of the log fails, it signals the need for repair. Before 'lvconvert --repair' is run by dmeventd, the second leg fails. 'lvconvert' would see both devices as failed and try to remove the log entirely. When it came time to suspend the parent mirror to update the configuration, the suspend would hang because it couldn't get any I/O through the mirrored log, which was plugged waiting for corrective action. The solution is to replace the log with an error target to clear any pending writes before removing it. This allows the parent mirror to suspend and make the proper changes.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1659&r2=1.1660
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.122&r2=1.123

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.71 -
 ===============================
+  Fix possible hang when all mirror images of a mirrored log fail.
   Do not log backtrace in valid _lv_resume() code path.
   Cleanup help strings in configure.in.
   Prompt if metadataignore with vgextend or pvchange would adjust vg_mda_copies.
lib/metadata/mirror.c +64 -1

73 lines not on this page · raw message