[PATCH] Allow user-specified values for data alignment of new lvm pvs. (#1178705)
Brian C. Lane
bcl at redhat.com
Sat Jan 17 00:50:50 UTC 2015
On Fri, Jan 16, 2015 at 12:09:43PM -0600, David Lehman wrote:
> ---
> blivet/devicelibs/lvm.py | 7 +++++--
> blivet/formats/lvmpv.py | 11 +++++++----
> tests/devicelibs_test/lvm_test.py | 29 +++++++++++++++++++++++++++++
> 3 files changed, 41 insertions(+), 6 deletions(-)
>
> diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
> index efca4c8..269b9c3 100644
> --- a/blivet/devicelibs/lvm.py
> +++ b/blivet/devicelibs/lvm.py
> @@ -233,8 +233,11 @@ def lvm(args, capture=False, ignore_errors=False):
> if capture:
> return strip_lvm_warnings(out)
>
> -def pvcreate(device):
> - args = ["pvcreate", device]
> +def pvcreate(device, data_alignment=None):
> + args = ["pvcreate"]
> + if data_alignment is not None:
> + args.extend(["--dataalignment", "%dk" % data_alignment.convertTo(KiB)])
> + args.append(device)
This could use a docstring so we know it is in KiB.
Ack other than that.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list