EnhanceIO makes it possible to use an SSD as a caching device for any other type of block device storage (HDD, Network, you name it) with almost zero configuration. Based on Flashcache is it much simpler to set up. Unlike Bcache there is no need to convert file systems.
Install AUR.AUR from the
/dev/sdawill be used to indicate the slow drive and
/dev/sdbwill be used to indicate the fast drive. Be sure to change these examples to match your setup.
Setting up the module and drives
The EnhanceIO command line interface (eio_cli) is used to manage your setup. Set up caching on your fast ssd for your slow hdd like so:
# eio_cli create -d /dev/sda -s /dev/sdb -c my_first_enhanceio
This will use the default options which are safe, if you want to enhance speed even further you might want to add
-m wb to enable WriteBack mode instead of WriteThrough. This might put data itegrity at risk though.
The cache drive is persistent now, which means even after a reboot it will still be used. If you want to deactive it first set the cache into read-only mode to not lose any yet unwritten blocks
# eio_cli edit -c my_first_enhanceio -m ro
Then wait until
$ grep nr_dirty /proc/enhanceio/enchanceio_test/stats
returns 0. Now all the blocks have been written to your slow hdd and it's safe to delete the caching device:
# eio_cli delete -c my_first_enhanceio
Getting information on caches
To get basic information on caches in use try
# eio_cli info
To get detailed information use
$ cat /proc/enhanceio/my_first_enhanceio/stats