[PATCH] Tell lvcreate not to ask us any questions and do its job. (#1057066)

David Lehman dlehman at redhat.com
Thu Jan 23 21:12:04 UTC 2014


Specifically, new functionality prompts the user whether or not they
would like to wipe detected metadata when creating a new lv. This
tells it to go ahead instead of asking.

This is a global setting for lvcreate, but I think we really do want
to create the new lv in any case, regardless of what lvm might think
we should stop and talk about first.
---
 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 6f4bab2..342b70a 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -409,7 +409,7 @@ def lvorigin(vg_name, lv_name):
 def lvcreate(vg_name, lv_name, size, pvs=[]):
     args = ["lvcreate"] + \
             ["-L", "%dm" % size.convertTo(spec="mib")] + \
-            ["-n", lv_name] + \
+            ["-y", "-n", lv_name] + \
             _getConfigArgs() + \
             [vg_name] + pvs
 
-- 
1.8.5.3



More information about the anaconda-patches mailing list