1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
lvm2/lib
Jonathan Brassow b248ba0a39 mirror: Avoid reading mirrors with failed devices in mirrored log
Commit 9fd7ac7d03 did not handle mirrors
that contained mirrored logs.  This is because the status line of the
mirror does not give an indication of the health of the mirrored log,
as you can see here:
        [root@bp-01 lvm2]# dmsetup status vg-lv vg-lv_mlog
        vg-lv: 0 409600 mirror 2 253:6 253:7 400/400 1 AA 3 disk 253:5 A
        vg-lv_mlog: 0 8192 mirror 2 253:3 253:4 7/8 1 AD 1 core
Thus, the possibility for LVM commands to hang still persists when mirror
have mirrored logs.  I discovered this while performing some testing that
does polling with 'pvs' while doing I/O and killing devices.  The 'pvs'
managed to get between the mirrored log device failure and the attempt
by dmeventd to repair it.  The result was a very nasty block in LVM
commands that is very difficult to remove - even for someone who knows
what is going on.  Thus, it is absolutely essential that the log of a
mirror be recursively checked for mirror devices which may be failed
as well.

Despite what the code comment says in the aforementioned commit...
+ * _mirrored_transient_status().  FIXME: It is unable to handle mirrors
+ * with mirrored logs because it does not have a way to get the status of
+ * the mirror that forms the log, which could be blocked.
... it is possible to get the status of the log because the log device
major/minor is given to us by the status output of the top-level mirror.
We can use that to query the log device for any DM status and see if it
is a mirror that needs to be bypassed.  This patch does just that and is
now able to avoid reading from mirrors that have failed devices in a
mirrored log.
2012-10-25 00:42:45 -05:00
..
activate mirror: Avoid reading mirrors with failed devices in mirrored log 2012-10-25 00:42:45 -05:00
cache lvmetad: Only print scanning messages when scanning 1 device. 2012-10-15 12:45:50 +02:00
commands debug: do not play with fds with valgring 2012-10-12 17:02:30 +02:00
config cleanup: swap return values 2012-10-17 15:37:26 +02:00
datastruct Switch to return void 2012-02-08 12:52:58 +00:00
device cleanup: switch log_error to log_warn 2012-10-17 15:41:35 +02:00
display buffering: use unbuffered silent mode for liblvm 2012-08-26 00:15:45 +01:00
error cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
filters Implement devices/global_filter. 2012-09-26 14:49:15 +02:00
format1 cleanup: format1 test whether PV was found 2012-08-23 14:37:52 +02:00
format_pool cleanup: uint64_t casts 2012-08-23 14:37:21 +02:00
format_text cleanup: switch log_error to log_warn 2012-10-17 15:41:35 +02:00
freeseg cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
label The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in 2012-02-23 13:11:07 +00:00
locking locking: clarify read-only locking error message v2 2012-07-25 14:37:22 +02:00
log config: add silent mode 2012-08-25 20:35:48 +01:00
metadata mirror/raid: Move 'copy_percent' to common code (mirror.c -> lv_manip.c) 2012-10-23 20:33:54 -05:00
mirror cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
misc python: Add bindings for liblvm2app. 2012-10-12 02:08:47 +01:00
mm comments: misc updates 2012-08-07 18:34:30 +01:00
raid RAID: Add support for RAID10 2012-08-24 15:34:19 -05:00
replicator cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
report RAID: Make RAID 4/5/6 display sync status under heading s/Copy%/Cpy%Sync 2012-10-23 21:19:27 -05:00
snapshot Differentiate between snapshot status of "Invalid" and "Merge failed". 2012-01-20 22:02:04 +00:00
striped Add activation/use_linear_target enabled by default. (prajnoha) 2011-11-28 20:37:51 +00:00
thin thin: raise required version to 1.4 2012-10-11 14:09:07 +02:00
unknown cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
uuid Revert the #include changes. Need to fix this at the #include site for now, and 2011-07-18 14:34:33 +00:00
zero cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
Makefile.in cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00