I am regarding to question: Improving IO with FlashCache
I have setup a RAID1 (/dev/md0) LVM (/dev/vg_xen) and executed following command:
flashcache_create -p thru flashcache0 /dev/sdc /dev/md0
Then I started a XEN PV guest, which uses /dev/vg_xen/vm0 as hard disk. After using it a while
cat /proc/flashcache/sdc\+md0/flashcache_stats
shows me
reads=0 writes=0
So, it does not work. What did I do wrong?
You should make sure that your LVM is using the
/dev/mapper/flashcache0
device as its physical volume instead of using /dev/md0 directly (in the latter case flashcache would not be involved in the I/O code path at all).See http://sf-alpha.bjgang.org/wordpress/2012/11/flashcache-initscripts/ for a handy script on how to set this up, if you have not done so yet. The basic outline would be:
filter = [ "r|/dev/md0|" ]
and commenting out or removingfilter = [ "a/.*/" ]
(if present) from thedevices{}
section of your/etc/lvm/lvm.conf
flashcache_create
(orflashcache_load
if using write-back caching mode) command to create your flashcache-backed devicevgscan
to discover your volume group and activate it by issuingvgchange -ay vg_xen
For details on flashcache configuration, refer to the admin guide which came with your flashcache download.