Commit 577edf04 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

Adapt striping to the requested number of spindles

Otherwise LVM may use a smaller number of PVs (spindles) to accommodate for
the default stripes.
Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarHelga Velroyen <>
parent 7c848a6a
......@@ -284,9 +284,12 @@ class LogicalVolume(base.BlockDev):
" MB: %d available, %d needed",
size, current_pvs, req_pvs)
assert current_pvs == len(pvlist)
if stripes > current_pvs:
# No warning issued for this, as it's no surprise
stripes = current_pvs
# We must update stripes to be sure to use all the desired spindles
stripes = current_pvs
if stripes > desired_stripes:
# Don't warn when lowering stripes, as it's no surprise
logging.warning("Using %s stripes instead of %s, to be able to use"
" %s spindles", stripes, desired_stripes, current_pvs)
if stripes < desired_stripes:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment