mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvcreate: ensure striped raid region size is at least stripe size
The kernel MD runtime requires region size to be larger than stripe size on striped raid layouts, thus the dm-raid target's constructor rejects such request. This causes e.g. an 'lvcreate --type raid10 -i3 -I4096 -R2048 -n lv vg' to fail. Avoid failing late in the kernel by enforcing region size to be larger or equal to stripe size. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1698225
This commit is contained in:
parent
2037476008
commit
29db9c6325
@ -1,5 +1,6 @@
|
||||
Version 2.03.07 -
|
||||
===================================
|
||||
Ensure minimum required region size on striped RaidLV creation.
|
||||
Fix resize of thin-pool with data and metadata of different segtype.
|
||||
Improve mirror type leg splitting.
|
||||
Fix activation order when removing merged snapshot.
|
||||
|
@ -575,6 +575,13 @@ static int _read_raid_params(struct cmd_context *cmd,
|
||||
log_error("Minimum recovery rate cannot be higher than maximum.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lp->region_size < lp->stripe_size) {
|
||||
log_print_unless_silent("Adjusting %s %s region size to required minimum of stripe size %s.",
|
||||
lp->segtype->name, display_size(cmd, (uint64_t)lp->region_size),
|
||||
display_size(cmd, (uint64_t)lp->stripe_size));
|
||||
lp->region_size = lp->stripe_size;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user