]> sourceware.org Git - lvm2.git/commit
lvcreate: Fix mirror percentage size calculations.
authorAlasdair G Kergon <agk@redhat.com>
Fri, 12 May 2017 01:04:05 +0000 (02:04 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 12 May 2017 01:31:35 +0000 (02:31 +0100)
commitcf73f6cf61793e9d71391bb7a8f35162509898a4
treebed6d0cd0f353024ec0926732a998d5727af1d4b
parentd49a20b7bdc9b741def219be897c5057db5e05ff
lvcreate: Fix mirror percentage size calculations.

Trap cases where the percentage calculation currently leads to an empty
LV and the message:

  Internal error: Unable to create new logical volume with no extents

Additionally convert the calculated number of extents from physical to
logical when creating a mirror using a percentage that is based on
Physical Extents.  Otherwise a command like 'lvcreate -m3 -l80%FREE'
can never leave any free space.

This brings the behaviour closer to that of lvresize.
(A further patch is needed to cover all the raid types.)
WHATS_NEW
tools/lvcreate.c
This page took 0.035908 seconds and 5 git commands to generate.