flashcache安装使用:
github下载源码:
https://github.com/facebook/flashcache
#yum install dkms gcc make yum-utils kernel-devel
#unzip flashcache-master.zip
#cd flashcache-master/
#make && make install && make clean
#modprobe flashcache
#lsmod | grep flashcache
flashcache 97599 0
dm_mod 99168 4 flashcache,dm_multipath,dm_mirror,dm_log
#fdisk -l --dev/oczpcie_7_0_ssd为SSD,/dev/sdb为SAS 300g机械盘
Disk /dev/oczpcie_7_0_ssd: 480.1 GB, 480136395264 bytes
92 heads, 61 sectors/track, 167100 cylinders
Units = cylinders of 5612 * 512 = 2873344 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006dbf6
Device Boot Start End Blocks Id System
/dev/oczpcie_7_0_ssd1 1 167101 468882174+ 83 Linux
Disk /dev/oczpcie_7_0_ssd1: 480.1 GB, 480135346688 bytes
128 heads, 128 sectors/track, 57236 cylinders
Units = cylinders of 16384 * 512 = 8388608 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sda: 146.8 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a0edb
Device Boot Start End Blocks Id System
/dev/sda1 * 1 4178 33554432 83 Linux
/dev/sda2 4178 5222 8388608 82 Linux swap / Solaris
/dev/sda3 5222 17845 101394496 83 Linux
Partition 3 does not end on cylinder boundary.
Disk /dev/sdb: 300.0 GB, 299966445568 bytes
255 heads, 63 sectors/track, 36468 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e0cbd
Device Boot Start End Blocks Id System
/dev/sdb1 1 36468 292929178+ 83 Linux
#flashcache_create cachedev -p back -b 4k /dev/oczpcie_7_0_ssd /dev/sdb1 --创建cachedev
cachedev cachedev, ssd_devname /dev/oczpcie_7_0_ssd, disk_devname /dev/sdb1 cache mode WRITE_BACK
block_size 8, md_block_size 8, cache_size 0
Flashcache metadata will use 2459MB of your 64414MB main memory
#mount /dev/mapper/cachedev /data01 --挂载使用
参考:http://blog.sina.com.cn/s/blog_5037eacb0102v140.html