From a2cb0484b970f2f58c4cc3e0057976b6a4daf64a Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 27 Jan 2015 16:59:15 +0000 Subject: lvm: Use lvmetad by default, and generally fix LVM in Baserock We now install the necessary LVM systemd units and enable lvmetad by default. Also, the udev rules are installed to the correct place so that /dev is correctly populated. --- strata/lvm/lvm2.morph | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/strata/lvm/lvm2.morph b/strata/lvm/lvm2.morph index 49c166dc..791894df 100644 --- a/strata/lvm/lvm2.morph +++ b/strata/lvm/lvm2.morph @@ -1,6 +1,31 @@ name: lvm2 kind: chunk build-system: autotools + configure-commands: -- ./configure --prefix="$PREFIX" --enable-applib --enable-cmdlib --enable-pkgconfig - --enable-dmeventd --enable-udev_sync +# We specify --sbindir explicitly due to a bug in .service file generation: +# if left to the default, @sbindir@ is expanded to the literal string +# '${exec_prefix}/sbin' in the generated .service files. +# +# udev rules *must* go in /lib, they'll be ignored if they go in /usr/lib. +- > + ./configure --prefix="$PREFIX" \ + --sbindir="$PREFIX"/sbin \ + --with-udev-prefix=/lib \ + --with-systemdsystemunitdir="$PREFIX"/lib/systemd/system \ + --enable-applib --enable-cmdlib --enable-pkgconfig --enable-lvmetad \ + --enable-dmeventd --enable-udev_sync + +install-commands: +- make DESTDIR="$DESTDIR" install +- make DESTDIR="$DESTDIR" install_system_dirs +- make DESTDIR="$DESTDIR" install_systemd_generators +- make DESTDIR="$DESTDIR" install_systemd_units +- make DESTDIR="$DESTDIR" install_tmpfiles_configuration + +# Use lvmetad by default. This means we don't have to use the +# `lvm2-activation-generator` systemd generator, which is a good thing +# because I have seen it cause systems to completely fail to boot. Fedora +# does something similar, see: +# http://pkgs.fedoraproject.org/cgit/lvm2.git/tree/lvm2-enable-lvmetad-by-default.patch +- sed -e 's/use_lvmetad = 0/use_lvmetad = 1/' -i "$DESTDIR"/etc/lvm/lvm.conf -- cgit v1.2.1