On Tue, Aug 01, 2017 at 10:56:39AM -0600, Liu Bo wrote: > On Tue, Aug 01, 2017 at 05:28:57PM +0000, Hugo Mills wrote: > > Hi, > > > > Great to see something addressing the write hole at last. > > > > On Tue, Aug 01, 2017 at 10:14:23AM -0600, Liu Bo wrote: > > > This aims to fix write hole issue on btrfs raid5/6 setup by adding a > > > separate disk as a journal (aka raid5/6 log), so that after unclean > > > shutdown we can make sure data and parity are consistent on the raid > > > array by replaying the journal. > > > > What's the behaviour of the FS if the log device dies during use? > > > > Error handling on IOs is still under construction (belongs to known > limitations). > > If the log device dies suddenly, I think we could skip the writeback > to backend raid arrays and follow the rule in btrfs, filp FS to > readonly as it may expose data loss. What do you think?
I think the key thing for me is that the overall behaviour of the redundancy in the FS is not compromised by the logging solution. That is, the same guarantees still hold: For RAID-5, you can lose up to one device of the FS (*including* any log devices), and the FS will continue to operate normally, but degraded. For RAID-6, you can lose up to two devices without losing any capabilities of the FS. Dropping to read-only if the (single) log device fails would break those guarantees. I quite like the idea of embedding the log chunks into the allocated structure of the FS -- although as pointed out, this is probably going to need a new chunk type, and (to retain the guarantees of the RAID-6 behaviour above) the ability to do 3-way RAID-1 on those chunks. You'd also have to be able to balance the log structures while in flight. It sounds like a lot more work for you, though. Hmm... if 3-way RAID-1 (3c) is available, then you could also have RAID-1*3 on metadata, RAID-6 on data, and have 2-device redundancy throughout. That's also a very attractive configuration in many respects. (Analagous to RAID-1 metadata and RAID-5 data). Hugo. -- Hugo Mills | That's not rain, that's a lake with slots in it. hugo@... carfax.org.uk | http://carfax.org.uk/ | PGP: E2AB1DE4 |
signature.asc
Description: Digital signature