Overview of operation
Flashcache is a block cache for Linux, built as a kernel module, using the device mapper. Flashcache supports writeback, writethrough and writearound caching modes. See flashcache_create(8) for a description of caching modes.
Flascache allows one to use a fast block device such as Solid State Drives (SSD) as cache to accelerate a slower drive used as backstore.
Originally, Flashcache was built as a block device cache for I/O intensive database applications, for example to run an accelerated InnoDB store for mysqld(8), but it can be used as general purpose backend for filesystems as well.
Before using Flashcache, it might be a good idea to check if device mapper works properly. Assuming the partition /dev/md0p1 shall be used as flash cache, one may try to create a linear device with following command:
echo 0 1024 linear /dev/md0p1 0 | dmsetup create tmpdisk
It this works, flashcache_create should be able to create its device.
Remove tmpdisk with command:
dmsetup remove tmpdisk
Before creating a flashcache device using the flashcache_create command, the deivce must not be mounted.
README and other documents in /usr/share/doc/flashcache-utils. In particular, see flashcache-sa-guide.txt for configuring the flashcache kernel module through its /proc interface.
The flashcache source code and all documentation may be downloaded from <https://github.com/facebook/flashcache/>.