On Tue, Nov 19, 2019 at 06:41:49PM +0800, Qu Wenruo wrote: > On 2019/11/19 下午6:05, Anand Jain wrote: > > On 11/7/19 2:27 PM, Qu Wenruo wrote: > >> [PROBLEM] > >> Btrfs degraded mount will fallback to SINGLE profile if there are not > >> enough devices: > > > > Its better to keep it like this for now until there is a fix for the > > write hole. Otherwise hitting the write hole bug in case of degraded > > raid1 will be more prevalent. > > Write hole should be a problem for RAID5/6, not the degraded chunk > feature itself. > > Furthermore, this design will try to avoid allocating chunks using > missing devices. > So even for 3 devices RAID5, new chunks will be allocated by using > existing devices (2 devices RAID5), so no new write hole is introduced. That this would allow a 2 device raid5 (from expected 3) is similar to the reduced chunks, but now hidden because we don't have a detailed report for stripes on devices. And rebalance would be needed to make sure that's the filesystem is again 3 devices (and 1 device lost tolerant). This is different to the 1 device missing for raid1, where scrub can fix that (expected), but the balance is IMHO not. I'd suggest to allow allocation from missing devices only from the profiles with redundancy. For now.
