1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/metadata
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
..
cache_manip.c cleanup: more use of lvseg_name 2017-01-03 14:55:16 +01:00
lv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lv_manip.c snapshot: improve removal of active origin volume 2017-02-22 15:35:04 +01:00
lv.c lv: fix lock holder for external origin 2016-12-18 19:25:25 +01:00
lv.h lv: introduce lvseg_percent_with_info_and_seg_status 2016-05-27 15:47:24 +02:00
merge.c lvconvert: add segtype raid5_n and conversions to/from it (cleanup) 2017-02-07 12:25:26 +01:00
metadata-exported.h lvchange: reject writemostly/writebehind on raid1 during resync 2017-02-23 15:09:29 +01:00
metadata.c lvmlockd: test mode doesn't work 2017-02-13 08:20:10 -06:00
metadata.h thin: enforce there is some free space in thin pool metadata 2016-09-19 14:00:56 +02:00
mirror.c cleanup: use NAME_LEN stack buffer 2016-12-11 23:24:19 +01:00
pool_manip.c debug: better verbose message 2016-08-29 20:51:16 +02:00
pv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_manip.c lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00
pv_map.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_map.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv.c lvmcache: add optional dev arg to lvmcache_info_from_pvid 2016-06-07 15:15:47 -05:00
pv.h pv: add is_used_pv fn 2016-02-15 12:44:46 +01:00
raid_manip.c lvchange: reject writemostly/writebehind on raid1 during resync 2017-02-23 15:09:29 +01:00
replicator_manip.c lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00
segtype.c segtypes: Further segtype macros. 2016-08-05 14:00:40 +01:00
segtype.h lvconvert: add conversion from/to raid10 2017-02-10 19:13:02 +01:00
snapshot_manip.c cleanup: more lv_is_ usage 2016-12-13 22:07:52 +01:00
takeover_matrix.h lvconvert: add conversion from/to raid10 2017-02-10 19:13:02 +01:00
thin_manip.c commands: new method for defining commands 2017-02-13 08:20:10 -06:00
vg.c macros: Use is_power_of_2. 2016-06-30 17:59:44 +01:00
vg.h lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00