My Ubuntu 17.04 (64 bit) box has:
- 1 x SSD (used for the OS)
- 2 x HDD (used for data, such as
/homeand 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?
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: