On 2017-09-01 11:00, Juan Orti Alcaine wrote:


El 1 sept. 2017 15:59, "Austin S. Hemmelgarn" <ahferro...@gmail.com <mailto:ahferro...@gmail.com>> escribió:

    If you are going to use bcache, you don't need separate caches for
    each device (and in fact, you're probably better off sharing a cache
    across devices).


But, if I mix all the backing devices, I'll only get one bcache device, so I won't be able to do btrfs RAID1 on that.
No, that's not what I'm talking about. You always get one bcache device per backing device, but multiple bcache devices can use the same physical cache device (that is, backing devices map 1:1 to bcache devices, but cache devices can map 1:N to bcache devices). So, in other words, the layout I'm suggesting looks like this:

/dev/sda1: Backing device.
/dev/sdb1: Backing device.
/dev/sdc1: Backing device.
/dev/sdd1: Backing device.
/dev/sde1: SSD cache device.
/dev/bcache0: Corresponds to /dev/sda1, uses /dev/sde1 as cache
/dev/bcache1: Corresponds to /dev/sdb1, uses /dev/sde1 as cache
/dev/bcache2: Corresponds to /dev/sdc1, uses /dev/sde1 as cache
/dev/bcache3: Corresponds to /dev/sdd1, uses /dev/sde1 as cache

This is actually simpler to manage for multiple reasons, and will avoid wasting space on the cache device because of random choices made by BTRFS when deciding where to read data.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to