From 3736cb6b9c48c054a86a7cb768847a44e5fea8e9 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 8 Jun 2009 15:15:40 +0200 Subject: [PATCH] Add a lvm stripecount configure parameter This patch adds a configure-time customizable parameter that will be used to enable stripped LVs. The default of the parameter is 3. Signed-off-by: Iustin Pop Reviewed-by: Guido Trotter --- Makefile.am | 1 + configure.ac | 10 ++++++++++ lib/constants.py | 1 + 3 files changed, 12 insertions(+) diff --git a/Makefile.am b/Makefile.am index bacdc3d..da7c689 100644 --- a/Makefile.am +++ b/Makefile.am @@ -316,6 +316,7 @@ lib/_autoconf.py: Makefile stamp-directories echo "KVM_PATH = '$(KVM_PATH)'"; \ echo "KVM_MIGRATION_PORT = '$(KVM_MIGRATION_PORT)'"; \ echo "SOCAT_PATH = '$(SOCAT_PATH)'"; \ + echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)" ; \ } > $@ $(REPLACE_VARS_SED): Makefile stamp-directories diff --git a/configure.ac b/configure.ac index 58de2f3..c04ad5e 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,16 @@ AC_ARG_WITH([socat-path], [socat_path="/usr/bin/socat"]) AC_SUBST(SOCAT_PATH, $socat_path) +# ---with-lvm-stripecount=... +AC_ARG_WITH([lvm-stripecount], + [AS_HELP_STRING([--with-lvm-stripecount=NUM], + [the number of stripes to use for LVM volumes] + [ (default is 3)] + )], + [lvm_stripecount="$withval"], + [lvm_stripecount="3"]) +AC_SUBST(LVM_STRIPECOUNT, $lvm_stripecount) + # Check common programs AC_PROG_INSTALL AC_PROG_LN_S diff --git a/lib/constants.py b/lib/constants.py index d9edc13..3949f56 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -245,6 +245,7 @@ DEFAULT_VG = "xenvg" BIND_ADDRESS_GLOBAL = "0.0.0.0" MIN_VG_SIZE = 20480 DEFAULT_MAC_PREFIX = "aa:00:00" +LVM_STRIPECOUNT = _autoconf.LVM_STRIPECOUNT # RPC constants (RPC_ENCODING_NONE, -- 1.7.10.4