Home > Linux > Flashcache initscripts

Flashcache initscripts

Just want to share my initscripts for flashcache.

Download [ here ].

Flashcache initscripts from original git repo is full of crap. And intend for use in only one scenario where it use as writeback and need to be mount. So I decided to rewrite the script to fit my requirements. This script can also use writeback/writethrugh mode and optionally can setup LVM and mount it.

In my setup I use flashcache as libvirt datastore backend based on LVM. The script will setup flashcache in writethough mode then run vgscan and vgchange on the configured volume group.

CAUTION!

IF YOU WANT TO USE LVM PV ON TOP OF FLASHCACHE.
MAKE SURE YOU EXCLUDE BACKEND/CACHE DEVICES FROM LVM SCANNING
BY EDIT /etc/lvm/lvm.conf.

For CentOS, add this line in devices {} section. In this example /dev/sda3 is backend device and /dev/sdb is SSD cache.

filter = [ "r|/dev/sda3|","r|/dev/sdb|" ]

and comment

# filter = [ "a/.*/" ]
ANOTHER CAUTION!

qemu/kvm with flashcache backend have problems about data corruption on flashcache. If data get writes to disk with ‘cache=none’ on qemu/kvm with windows guests. Don’t use cache=none on windows guests. This seems to related to DirectIO or FUA which bypass cache mechanism used by flashcache that causes corruption.

, , , , ,

Leave a Reply

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

Trackbacks:0

Listed below are links to weblogs that reference
Flashcache initscripts from SF-Alpha o_O!
TOP