]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat(lvm): always include all drivers that LVM can use
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 14 Dec 2022 10:44:51 +0000 (11:44 +0100)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Fri, 27 Jan 2023 15:16:35 +0000 (16:16 +0100)
This patch adds all the kernel modules that might be needed by LVM, to avoid
having to rebuild the initrd in hostonly mode after a dynamic change that
requires new drivers to boot.

For example, LVM allows to dynamically convert a linear logical volume to a
RAID-1 type (`lvconvert --type raid1 vg/lv`), which, in hostonly mode, will
require the user to manually rebuild the initrd again to include the new RAID
drivers in use, otherwise the system will fail to boot.

modules.d/90lvm/module-setup.sh

index 7622e4b479be4f49d903cc7a9908ce3ddc09ceb6..7ba4c69b30c56c960d4d52d697e314a835293434 100755 (executable)
@@ -43,7 +43,7 @@ cmdline() {
 }
 
 installkernel() {
-    hostonly='' instmods dm-snapshot
+    hostonly='' dracut_instmods -o -P ".*/(bcache/|md-cluster).*" "=drivers/md"
 }
 
 # called by dracut