mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
RAID: Fail RAID4/5/6 creation if PE size is less than STRIPE_SIZE_MIN
The maximum stripe size is equal to the volume group PE size. If that size falls below the STRIPE_SIZE_MIN, the creation of RAID 4/5/6 volumes becomes impossible. (The kernel will fail to load a RAID 4/5/6 mapping table with a stripe size less than STRIPE_SIZE_MIN.) So, we report an error if it is attempted. This is very rare because reducing the PE size down that far limits the size of the PV below that of modern devices.
This commit is contained in:
parent
42e07d2bce
commit
4d45302e25
@ -1,5 +1,6 @@
|
||||
Version 2.02.110 -
|
||||
==================================
|
||||
Cleanly error when creating RAID with stripe size < PAGE_SIZE.
|
||||
Print name of LV which on activation triggers delayed snapshot merge.
|
||||
Add lv_layout and lv_type LV reporting fields.
|
||||
Properly display lvs lv_attr volume type and target type bit for cache origin.
|
||||
|
@ -6364,6 +6364,21 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
|
||||
}
|
||||
|
||||
if (lp->stripe_size > vg->extent_size) {
|
||||
if (segtype_is_raid(lp->segtype) &&
|
||||
(vg->extent_size < STRIPE_SIZE_MIN)) {
|
||||
/*
|
||||
* FIXME: RAID will simply fail to load the table if
|
||||
* this is the case, but we should probably
|
||||
* honor the stripe minimum for regular stripe
|
||||
* volumes as well. Avoiding doing that now
|
||||
* only to minimize the change.
|
||||
*/
|
||||
log_error("The extent size in volume group %s is too"
|
||||
" small to support striped RAID volumes.",
|
||||
vg->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
log_print_unless_silent("Reducing requested stripe size %s to maximum, "
|
||||
"physical extent size %s.",
|
||||
display_size(cmd, (uint64_t) lp->stripe_size),
|
||||
|
Loading…
Reference in New Issue
Block a user