Installing enhanceio on debian Jessie (Not wheezy or squeez, minimum kernel 3.7 onwards)

Using enhanceio (the flashcache fork)

First, on a debian system, you need to compile enhanceio because debian have not yet released anything for it (2015-05-13)

apt-get install git make gcc pkg-config uuid openssl util-linux uuid-dev libblkid-dev python
apt-get install build-essential
apt-get install linux-headers-$(uname -r)

Now let us download enhanceio

git clone https://github.com/stec-inc/EnhanceIO.git
cd EnhanceIO/Driver/enhanceio/
make && make install

On make install you will see
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64'
install -o root -g root -m 0755 -d /lib/modules/3.16.0-4-amd64/extra/enhanceio/
install -o root -g root -m 0755 enhanceio.ko /lib/modules/3.16.0-4-amd64/extra/enhanceio/
install -o root -g root -m 0755 enhanceio_rand.ko /lib/modules/3.16.0-4-amd64/extra/enhanceio/
install -o root -g root -m 0755 enhanceio_fifo.ko /lib/modules/3.16.0-4-amd64/extra/enhanceio/
install -o root -g root -m 0755 enhanceio_lru.ko /lib/modules/3.16.0-4-amd64/extra/enhanceio/

cd /lib/modules/3.16.0-4-amd64/extra/enhanceio/
insmod enhanceio.ko
insmod enhanceio_fifo.ko
insmod enhanceio_lru.ko

#Now check that it is loaded as a kernel module with (HINT: Will it be there after reboot ?)
lsmod | grep enhanceio

cd ../../CLI/
cp eio_cli /sbin/
cp eio_cli.8 /usr/share/man/man8

Now that we have installed and compiled enhanceio, we will simply use it, we are all done, unlike bcache and dmcache, there is minimal setup for this kind of ssd/flash thumb stick.

Now in my setup, i want sdb to act as an SSD cache for sdc1

eio_cli create -d /dev/sdc1 -s /dev/sdb1 -p lru -m ro -c main_disk_cache

The output of that command was as follows, this result can also be obtained with the command “eio_cli info”, or for super detail “cat /proc/enhanceio/main_disk_cache/stats”

Cache Name       : main_disk_cache
Source Device    : /dev/sdc1
SSD Device       : /dev/sdb1
Policy           : lru
Mode             : Read Only
Block Size       : 4096
Associativity    : 256
ENV{ID_SERIAL}=="WDC_WD1001FALS-00J7B0_WD-WMATV0098355", ATTR{partition}=="1"
ENV{ID_SERIAL}=="INTEL_SSDSA2CW120G3_CVPR1481061P120LGN", ATTR{partition}=="1"
Cache created successfully

Now to see the block size
blockdev –getbsz /dev/sdb1 (512 was the result)

Leave a Reply

Your email address will not be published. Required fields are marked *