On 2015-11-11 21:15, Qu Wenruo wrote:
Hi Anand,

Nice work.
But I have some small questions about it.

Anand Jain wrote on 2015/11/09 18:56 +0800:
These set of patches provides btrfs hot spare and auto replace support
for you review and comments.

First, here below are the simple example steps to configure the same:

Add a spare device:
     btrfs spare add /dev/sde -f

I'm sorry but I didn't quite see the benefit of a spare device.
Aside from what Duncan said (and I happen to agree with him), there is also the fact that hot-spares are (at least traditionally in most RAID systems) usually used with RAID5 or RAID6 (or some other parity scheme).

So, to summarize:
1. Hot spares are more useful for most users in global context, and in that case only if they have more than one filesystem.
2. A pool of hot spares is even more useful.
3. Assuming whole disk usage (as opposed to partitioning), the hot spare will have no load on it until it gets used, at which point it will almost always be in better physical condition than the device it replaced (which is important for HA systems, in such cases you replace the disk that failed, and make the new disk a hot spare) 4. Hot spares are more often used (at least from what I've seen) on parity based raid systems than raid1.

In the rather limited case you outlined, I would probably just use raid1 across all three devices myself (unless they were whole disks and not individual partitions, in which case I'd use a hot spare), but looking beyond that at my actual usage of BTRFS (multiple filesystems with multiple different raid profiles, spread across various disks), hot spares are definitely useful (although they would be more useful if I could specify that a given hot spare be used only for a given set of filesystems).


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to