diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-01-27 16:59:15 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-01-27 18:17:33 +0000 |
commit | a2cb0484b970f2f58c4cc3e0057976b6a4daf64a (patch) | |
tree | 6601889908dbcf5be745b94b0d58b2736d3dafe5 /strata/lvm | |
parent | 398c914624a25bcd2f7cca0d7002d127d6e5aa76 (diff) | |
download | definitions-a2cb0484b970f2f58c4cc3e0057976b6a4daf64a.tar.gz |
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.
Diffstat (limited to 'strata/lvm')
-rw-r--r-- | strata/lvm/lvm2.morph | 29 |
1 files 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 |