Skip to content

Commit

Permalink
Allow passing KiB values to vgcreate -s option
Browse files Browse the repository at this point in the history
Currently blivet exepects pesize parm of the vgcreate function
should be in MiB. Any given value will be converted to MiB format
and omits any fractional part. That means, if any KiB values are
passed to pesize parm, it becomes 0 and the actual lvm lvcreate
faild to create the vg and returns an error.
This limits passing any KiB values for pesize to create a vg.
This patch fixes the issue by accepting the given value in KiB.

Bug url: https://bugzilla.redhat.com/show_bug.cgi?id=1198568
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin@redhat.com>
  • Loading branch information
TimothyAsirJeyasing committed Mar 6, 2015
1 parent f39db67 commit b2bd1c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blivet/devicelibs/lvm.py
Expand Up @@ -339,7 +339,7 @@ def pvinfo(device=None):
def vgcreate(vg_name, pv_list, pe_size):
argv = ["vgcreate"]
if pe_size:
argv.extend(["-s", "%sm" % pe_size.convertTo(spec="mib")])
argv.extend(["-s", "%sm" % pe_size.convertTo(spec="KiB")])
argv.extend(_getConfigArgs())
argv.append(vg_name)
argv.extend(pv_list)
Expand Down

0 comments on commit b2bd1c3

Please sign in to comment.