Last active
March 23, 2024 12:53
-
-
Save CzBiX/e5aec53a63fc12f7d50e to your computer and use it in GitHub Desktop.
initramfs hook to add modules/files for LVM thin/cache LV into initrd.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# see: https://bugzilla.redhat.com/show_bug.cgi?id=921235 | |
# http://forums.debian.net/viewtopic.php?f=5&t=119644 | |
PREREQ="lvm2" | |
prereqs() | |
{ | |
echo "$PREREQ" | |
} | |
case $1 in | |
prereqs) | |
prereqs | |
exit 0 | |
;; | |
esac | |
if [ ! -x /usr/sbin/cache_check ]; then | |
exit 0 | |
fi | |
. /usr/share/initramfs-tools/hook-functions | |
copy_exec /usr/sbin/cache_check | |
copy_exec /usr/sbin/cache_dump | |
copy_exec /usr/sbin/cache_repair | |
copy_exec /usr/sbin/cache_restore | |
copy_exec /usr/sbin/thin_check | |
copy_exec /usr/sbin/thin_dump | |
copy_exec /usr/sbin/thin_repair | |
copy_exec /usr/sbin/thin_restore | |
for x in dm_cache dm_cache_smq dm_thin_pool; do | |
manual_add_modules ${x} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment