3

My Ubuntu 17.04 (64 bit) box has:

  • 1 x SSD (used for the OS)
  • 2 x HDD (used for data, such as /home and backups etc.)
  • 8GB RAM

If I shrink my SSD and create an empty partition for caching my HDD(s), is it possible to setup bcache without losing any existing data first?

The FAQ section of the bcache website says it is possible but does not demonstrate how.

Can I use bcache with an existing device, without reformatting?

There is a conversion step, which can often be done in place. The extra step comes from the need for a bcache specific superblock on the backing device - so that bcache can keep the devices in sync and so you can't accidentally mount and use the backing device without going through the bcache driver. Without any such superblock, you could accidentally use your device in non bcache mode making the cache invalid/corrupt without bcache knowing about it (if you were using bcache in writethrough mode) - or worse, if you were using it in writeback mode the filesystem on the backing device would appear to be completely corrupted.

The following tutorials require reformatting all drives involved first:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.