Skip to content

Instantly share code, notes, and snippets.

@CzBiX
Last active March 23, 2024 12:53
Show Gist options
  • Save CzBiX/e5aec53a63fc12f7d50e to your computer and use it in GitHub Desktop.
Save CzBiX/e5aec53a63fc12f7d50e to your computer and use it in GitHub Desktop.

Revisions

  1. CzBiX revised this gist Oct 23, 2015. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions thin-provisioning-tools.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    #!/bin/sh
    # see: https://bugzilla.redhat.com/show_bug.cgi?id=921235
    # http://forums.debian.net/viewtopic.php?f=5&t=119644

    PREREQ="lvm2"
    @@ -15,6 +16,10 @@ prereqs)
    ;;
    esac

    if [ ! -x /usr/sbin/cache_check ]; then
    exit 0
    fi

    . /usr/share/initramfs-tools/hook-functions

    copy_exec /usr/sbin/cache_check
    @@ -25,7 +30,7 @@ copy_exec /usr/sbin/thin_check
    copy_exec /usr/sbin/thin_dump
    copy_exec /usr/sbin/thin_repair
    copy_exec /usr/sbin/thin_restore
    copy_exec /sbin/dmeventd

    manual_add_modules dm_cache_mq
    manual_add_modules dm_thin_pool
    for x in dm_cache dm_cache_smq dm_thin_pool; do
    manual_add_modules ${x}
    done
  2. CzBiX revised this gist Aug 3, 2015. No changes.
  3. CzBiX created this gist Aug 3, 2015.
    31 changes: 31 additions & 0 deletions thin-provisioning-tools.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    #!/bin/sh
    # http://forums.debian.net/viewtopic.php?f=5&t=119644

    PREREQ="lvm2"

    prereqs()
    {
    echo "$PREREQ"
    }

    case $1 in
    prereqs)
    prereqs
    exit 0
    ;;
    esac

    . /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
    copy_exec /sbin/dmeventd

    manual_add_modules dm_cache_mq
    manual_add_modules dm_thin_pool