1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

lvconvert: Don't allow --repair on raid0 LVs.

This commit is contained in:
Alasdair G Kergon 2016-08-19 23:42:01 +01:00
parent bf0eaafa6b
commit 88e6abc5a0
2 changed files with 8 additions and 1 deletions

View File

@ -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.

View File

@ -1963,7 +1963,13 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
return 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;