From 0db171378dc97fea47f7d536ab92ab363e544127 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 26 Jun 2013 22:31:48 +1000 Subject: [PATCH] Update LVM autoextend config for RHEL6 Cinder clones are slightly larger due to some extra metadata. RHEL6 will not allow auto-extending of LV's without this, leading to clones giving hard-to-track disk I/O errors. See https://bugzilla.redhat.com/show_bug.cgi?id=975052 Change-Id: I09a5e061a9665c5310383f9f9eb281bfdc8e416d --- lib/cinder | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/cinder b/lib/cinder index c572db49d2..f691b384bf 100644 --- a/lib/cinder +++ b/lib/cinder @@ -276,6 +276,19 @@ function configure_cinder() { echo "$CINDER_GLUSTERFS_SHARES" > $CINDER_CONF_DIR/glusterfs_shares fi fi + + if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then + # Cinder clones are slightly larger due to some extra + # metadata. RHEL6 will not allow auto-extending of LV's + # without this, leading to clones giving hard-to-track disk + # I/O errors. + # see https://bugzilla.redhat.com/show_bug.cgi?id=975052 + sudo sed -i~ \ + -e 's/snapshot_autoextend_threshold =.*/snapshot_autoextend_threshold = 80/' \ + -e 's/snapshot_autoextend_percent =.*/snapshot_autoextend_percent = 20/' \ + /etc/lvm/lvm.conf + fi + } # create_cinder_accounts() - Set up common required cinder accounts