master - lvconvert: Don't allow --repair on raid0 LVs.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=88e6abc5a091bbe8d826968eafe27936df0e260c Commit: 88e6abc5a091bbe8d826968eafe27936df0e260c Parent: bf0eaafa6b81a271d40031b337c614bb9b56159a Author: Alasdair G Kergon <[email protected]> AuthorDate: Fri Aug 19 23:42:01 2016 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Fri Aug 19 23:42:01 2016 +0100
lvconvert: Don't allow --repair on raid0 LVs.
--- WHATS_NEW | 1 + tools/lvconvert.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.165 - =================================== + Don't allow lvconvert --repair on raid0 devices. No longer adjust incorrect number of raid stripes supplied to lvcreate. Move lcm and gcd to lib/misc. Suppress some unnecessary --stripesize parameter warnings.
tools/lvconvert.c +7 -1
@@ -1963,7 +1963,13 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *lreturn 0 ; } -if (!seg_is_striped (seg) && !lv_raid_percent (lv, &sync_percent)) { +if (seg_is_striped (seg)) { +log_error ("Cannot repair LV %s of type raid0." , +display_lvname (lv)); +return 0 ; + } + +if (!lv_raid_percent (lv, &sync_percent)) {log_error ("Unable to determine sync status of %s." ,display_lvname (lv));return 0 ;