HTGWA: Use bcache for SSD caching on a Raspberry Pi
This is a simple guide, part of a series I'll call 'How-To Guide Without Ads'. In it, I'm going to document how I set up bcache
on a Raspberry Pi, so I could use an SSD as a cache in front of a RAID array.
Getting bcache
bcache
is sometimes used on Linux devices to allow a more efficient SSD cache to run in front of a single or multiple slower hard drives—typically in a storage array.
In my case, I have three SATA hard drives: /dev/sda
, /dev/sdb
, and /dev/sdc
. And I have one NVMe SSD: /dev/nvme0n1
.
I created a RAID5 array with mdadm
for the three hard drives, and had the raid device /dev/md0
.
I then installed bcache-tools
:
$ sudo apt-get install bcache-tools
And used make-bcache
to create the backing and cache devices: