Bcache (or block level cache) is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives. It is designed around the performance characteristics of SSDs.
## install $ sudo yum install bcache-tools | sudo apt-get install bcache-tools ## using, assing HDD is /dev/sda and an SSD is /dev/sdb # wipe (from util-linux) devices $ wipefs -a /dev/sda1 ; wipefs -a /dev/sdb1 # format backup/hdd and cache/ssd devices $ make-bcache -B /dev/sda1 ; make-bcache -C /dev/sdb1 # attach the cache device to our bcache device 'bcache0' $ echo C_Set_UUID_VALUE > /sys/block/bcache0/bcache/attach # create and mount fs $ mkfs.ext4 /dev/bcache0 $ mount /dev/bcache0 /mnt # optionally use faster writeback (instead of default writethrough) $ echo writeback > /sys/block/bcache0/bcache/cache_mode # same but permanently $ echo /dev/sda1 > /sys/fs/bcache/register # monitor $ bcache-status -s