facebook/flashcache — Issue #43: All IO uncached when caching a partition
Author: cachemonger
Created: 2011-12-19 23:16:06+00:00
State: open

Hi,

I am trying to use flashcache to cache a partition (/dev/sdb1) using an SSD (/dev/sdd). Creating the cache works just fine, and I mount the new /dev/mapper/flashcache device in place of the original partition (instead of "mount /dev/sdb1 /mnt/target" I use "mount /dev/mapper/flashcache /mnt/target").

I see IO going through the flashcache driver when I watch the stats in /proc/flashcache/../flashcache_stats, but everything is listed as "uncached". I've double checked that I have cache_all enabled, and it is not set to filter sequential IO.

Everything works fine if I use the underlying /dev/sdb device instead (no partitions; create ext4 filesystem on /dev/sdb). If I do this, I see that IO is being cached.

The only thing I can think of is that sdb1 starts on the 63rd sector of sdb, and this is not 4K-aligned. Is this an unsupported configuration, or am I doing something else wrong?

Thanks!