1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib
Heinz Mauelshagen 8ab0725077 lvchange: reject writemostly/writebehind on raid1 during resync
The MD kernel raid1 personality does no use any writemostly leg as the primary.

In case a previous linear LV holding data gets upconverted to
raid1 it becomes the primary leg of the new raid1 LV and a full
resynchronization is started to update the new legs.

No writemostly and/or writebehind setting may be allowed during
this initial, full synchronization period of this new raid1 LV
(using the lvchange(8) command), because that would change the
primary (i.e the previous linear LV) thus causing data loss.

lvchange has a bug not preventing this scenario.

Fix rejects setting writemostly and/or writebehind on resychronizing raid1 LVs.

Once we have status in the lvm2 metadata about the linear -> raid upconversion,
we may relax this constraint for other types of resynchronization
(e.g. for user requested "lvchange --resync ").

New lvchange-raid1-writemostly.sh test is added to the test suite.

Resolves: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855895
2017-02-23 15:09:29 +01:00
..
activate activation: trust 'pending' status reported by dmeventd 2017-02-14 00:04:26 +01:00
cache cleanup: drop assign before use 2016-10-03 17:49:55 +02:00
cache_segtype lvchange: allow change of cache mode 2016-05-19 18:40:14 +02:00
commands command struct: remove command name refs 2017-02-13 08:20:10 -06:00
config args: use arg parsing function for region size 2017-02-13 08:21:58 -06:00
datastruct datastruct: Add str_list_wipe. 2016-04-29 19:47:15 +01:00
device devices: Recognise Veritas Dynamic Multipathing 2017-01-10 22:23:23 +00:00
display cleanup: warns from older gcc 2016-07-01 00:44:48 +02:00
error activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
filters cleanup: log_info to log_error 2016-11-03 17:49:07 +01:00
format1 cleanup: more use of lvseg_name 2017-01-03 14:55:16 +01:00
format_pool cleanup: more lv_is_ usage 2016-12-13 22:07:52 +01:00
format_text backup: show warning once per command 2016-12-18 19:38:30 +01:00
freeseg doc: change fsf address 2016-01-21 12:11:37 +01:00
label log_info to log_very_verbose 2016-11-03 17:49:07 +01:00
locking cleanup: more lv_is_ usage 2016-12-13 22:07:52 +01:00
log cleanup: add 'static' for local struct 2016-11-03 12:43:09 +01:00
lvmpolld doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata lvchange: reject writemostly/writebehind on raid1 during resync 2017-02-23 15:09:29 +01:00
mirror activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
misc coverity: remove unneeded header files 2017-02-11 21:17:27 +01:00
mm cleanup: compile fixes for --disable-devmapper 2016-06-03 12:46:43 +02:00
notify dbus: also recognize error state for missing service that comes from original D-Bus 2016-11-15 10:09:11 +01:00
properties doc: change fsf address 2016-01-21 12:11:37 +01:00
raid lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it 2017-02-05 00:56:27 +01:00
replicator doc: change fsf address 2016-01-21 12:11:37 +01:00
report lv: always check status type 2016-12-05 17:03:38 +01:00
snapshot activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
striped striped: implement compatible target name 2016-12-05 17:02:01 +01:00
thin macros: Use is_power_of_2. 2016-06-30 17:59:44 +01:00
unknown doc: change fsf address 2016-01-21 12:11:37 +01:00
uuid cleanup :drop unneeded header file 2016-10-03 17:49:56 +02:00
zero activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
Makefile.in lib: Move lcm and gcd to lib/misc for wider use. 2016-08-18 14:06:13 +01:00