On Tue, Jun 24, 2014 at 2:34 PM, Kai Krakow <hurikha...@gmail.com> wrote:
> I'm not sure if multiple partitions can share the same cache device
> partition but more or less that's it: Initialize bcache, then attach your
> backing devices, then add those bcache devices to your btrfs.

Ah, if you are stuck with one bcache partition per cached device then
that will be fairly painful to manage.

> Yes, it will write double the data to the cache then - but only if btrfs
> also did actually read both copies (which it probably does not because it
> has checksums and does not need to compare data, and lets just ignore the
> case that another process could try to read the same data from the other
> raid member later, that case should become optimized-out by the OS cache).

I didn't realize you were proposing read caching only.  If you're only
caching reads then obviously that is much safer.  I think with btrfs
in raid1 mode with only two devices you can tell it to prefer a
particular device for reading in which case you could just bcache that
drive.  It would only read from the other drive if the cache failed.

However, I don't think btrfs lets you manually arrange drives into
array-like structures.  It auto-balances everything which is usually a
plus, but if you have 30 disks you can't tell it to treat them as 6x
5-disk RAID5s vs one 30-disk raid5 (I think).

Rich

Reply via email to