Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Re: Re: Re: [Gentoo-User] emerge --sync likely to kill SSD?
Date: Tue, 24 Jun 2014 20:01:27
Message-Id: CAGfcS_=2gwUi-kFvoQ0gKinJg+i19Yq9kwJYU870bpYATL6hEw@mail.gmail.com
In Reply to: [gentoo-user] Re: Re: Re: Re: [Gentoo-User] emerge --sync likely to kill SSD? by Kai Krakow
1 On Tue, Jun 24, 2014 at 2:34 PM, Kai Krakow <hurikhan77@×××××.com> wrote:
2 > I'm not sure if multiple partitions can share the same cache device
3 > partition but more or less that's it: Initialize bcache, then attach your
4 > backing devices, then add those bcache devices to your btrfs.
5
6 Ah, if you are stuck with one bcache partition per cached device then
7 that will be fairly painful to manage.
8
9 > Yes, it will write double the data to the cache then - but only if btrfs
10 > also did actually read both copies (which it probably does not because it
11 > has checksums and does not need to compare data, and lets just ignore the
12 > case that another process could try to read the same data from the other
13 > raid member later, that case should become optimized-out by the OS cache).
14
15 I didn't realize you were proposing read caching only. If you're only
16 caching reads then obviously that is much safer. I think with btrfs
17 in raid1 mode with only two devices you can tell it to prefer a
18 particular device for reading in which case you could just bcache that
19 drive. It would only read from the other drive if the cache failed.
20
21 However, I don't think btrfs lets you manually arrange drives into
22 array-like structures. It auto-balances everything which is usually a
23 plus, but if you have 30 disks you can't tell it to treat them as 6x
24 5-disk RAID5s vs one 30-disk raid5 (I think).
25
26 Rich