niels segers

Bcache - DIY Hybrid Disks

cover

Sep 30, 2020

Most Linux users that employ Solid State Drives (SSDs) build their systems with the smaller SSDs holding the operating system and the larger, slower, much cheaper HDD drives holding their data. When you’re trying to create the fastest system possible, though, you want to get that data drive up to the speeds of your far-faster SSD. Problem is, very large SSDs can be cost-prohibitive. So, what can you do? With the help of bcache, you can use a smaller SSD as a caching drive for the larger, slower HDD. With this set up, you have the best of both worlds.

  • A lightning fast SSD housing your operating system.
  • A bcache-enabled SSD that caches for your large HDD data drive.

As of kernel 3.10, bcache is available with minimal installation and work. I will walk you through the process of getting the bcache data “drive” up and running (assuming you already have a working Linux system running on your faster SSD drive).

Although you can set this up on an existing system (with existing data), I highly recommend you not do so. The chance of losing data is high, so let’s start out with a fresh SSD (for caching) and a fresh HDD (for storage – or “backing”).

Read more about it here.

For more detailed configuration you can check here and here.