On 2015-11-13 19:54, Qu Wenruo wrote:
Um, no, unless you have a device scan on a cron job, you will only scan at boot (and the disk will usually be running then anyway, because most firmware spins up all disks at boot), because using mkfs or (I assume) registering the hot spare the first time automatically registers it with the kernel module.在 2015年11月13日 18:20, Anand Jain 写道:Thanks for commenting.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.Agreed, just as Ducan said. Although only one spare device is supported yet.You can add more than one spare device currently.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)OK, that's also right, if no one is calling btrfs dev scan with a interval.Not too sure what you mean about the scan part.Btrfs device scan will need to read the sb of the device. So the hot spare device won't really sleep for a long time as each time btrfs scan devices, it will wakeup the device.
That depends on the type of hot spare. Most soft raid systems use a similar policy to this patch-set (let the hot spare sit there until we need, then auto-replace when a device fails), but some use it actively in the set without counting it as part of the capacity (I see this mostly in RAID6 setups, where it just reshapes the array online to exclude the failed device).Not sure about soft raid hot spare. Maybe they won't cause any IO on the device? Or just the same with btrfs hot spare.
smime.p7s
Description: S/MIME Cryptographic Signature
