[rhel6-branch 26/30] Allow passing KiB values to vgcreate -s option

mulkieran installerbot-noreply at redhat.com
Thu May 28 21:04:31 UTC 2015


From: Timothy Asir Jeyasingh <tjeyasin at redhat.com>

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.

Cherry-picked from commit d65c64a17ab39031cd1bad04dcd7191f68e99394.

Resolves: rhbz#1198568
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin at redhat.com>
---
 blivet/devicelibs/lvm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
index 290e64d..7b18e9c 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -331,7 +331,7 @@ def pvinfo(device=None):
 def vgcreate(vg_name, pv_list, pe_size):
     argv = ["vgcreate"]
     if pe_size:
-        argv.extend(["-s", "%dm" % pe_size.convertTo(MiB)])
+        argv.extend(["-s", "%dk" % pe_size.convertTo(KiB)])
     argv.append(vg_name)
     argv.extend(pv_list)
 


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/504138e8642414ee5e3273455aa3a4a7a2738c51


More information about the anaconda-patches mailing list