Skip to content

Instantly share code, notes, and snippets.

@akihiro
Created February 7, 2015 04:49
Show Gist options
  • Save akihiro/2b5ae2c55b7569f3935e to your computer and use it in GitHub Desktop.
Save akihiro/2b5ae2c55b7569f3935e to your computer and use it in GitHub Desktop.
initramfs-tools lvmcache hooks for / on dm-cache on lvm on dm-crypt on mdadm environment
#!/bin/sh
# original script from http://forums.debian.net/viewtopic.php?f=5&t=119644#p564446
PREREQ="mdadm cryptroot 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
manual_add_modules dm_cache dm_cache_mq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment