0

I've past 4 days trying to activate an ssd cached system. I've Asus k56Cm laptop, with an HDD 500gb and SSD 22gb.

I need to have cached all system, but only have found 3 solutions. - Bcache (but doesn't work with any configuration) - EnhanceIO (but udev rules doesn't work and cache dissapears every boot) - LVMCache (but doesn't boot after reboot)

I need Ubuntu 15.10 for work purposes.

Does anyone have this configuration?

Thanks.

EirisDG
  • 76

1 Answers1

2

I did this on debian 8. sda - 3tb sata. sdb - 256 ssd. Works amazing...

aptitude install thin-provisioning-tools

pvcreate /dev/sdb1
vgextend vg0 /dev/sdb1

lvcreate -n CacheDataLV -l 99%FREE vg0 /dev/sdb1
lvconvert --type cache-pool vg0/CacheDataLV --cachemode writeback
lvconvert --type cache --cachepool vg0/CacheDataLV vg0/root 

vi /etc/initramfs-tools/hooks/dmbootscript

#!/bin/sh

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

manual_add_modules dm_cache dm_cache_mq

and finally: chmod +x /etc/initramfs-tools/hooks/dmbootscript update-initramfs -u -v -k all

dmsetup status vg0-root
dmsetup ls --tree

For sure I run update-initramfs -u -v -k all All the time kernel update.

Ara Saahov
  • 121
  • 2