From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Abrahamsson Subject: Re: Filesystem corruption on RAID1 Date: Sun, 20 Aug 2017 09:14:27 +0200 (CEST) Message-ID: References: <20170713214856.4a5c8778@natsu> <592f19bf608e9a959f9445f7f25c5dad@assyoma.it> <770b09d3-cff6-b6b2-0a51-5d11e8bac7e9@thelounge.net> <9eea45ddc0f80f4f4e238b5c2527a1fa@assyoma.it> <7ca98351facca6e3668d3271422e1376@assyoma.it> <5995D377.9080100@youngman.org.uk> <83f4572f09e7fbab9d4e6de4a5257232@assyoma.it> <59961DD7.3060208@youngman.org.uk> <784bec391a00b9e074744f31901df636@assyoma.it> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: Gionatan Danti Cc: Roger Heflin , Wols Lists , Reindl Harald , Roman Mamedov , Linux RAID List-Id: linux-raid.ids On Fri, 18 Aug 2017, Gionatan Danti wrote: > So while many (old) mismatch_cnt reports on RAID1/10 arrays where > dismissed as "don't bother, it's a harmless RAID1 thing", I really think > than some were genuine corruptions due to micro powerlosses and similar > causes. After a non-clean poweroff and possible mismatch now between the RAID1 drives, and now fsck runs. It reads from the drives and fixes problem. However because the RAID1 drives contain different information, some of the errors are not fixed. Next time anything comes along, it might read from a different drive than what fsck read from, and now we have corruption. Wouldn't it make sense for an option where fsck can do its reads and the md layer would run "repair" on all stripes that fsck touches? Whatever information is handed off to fsck, then parity is always checked (and repaired) if there is a mismatch. The problem here with issuing a "repair" action is that it might actually copy data from the drive that fsck didn't read from, so now even though fsck thought it had made everything clean in the fs, it's no longer clean because md "repair" copied non-clean inforamation to the drive that fsck looked at and deemed to be ok? -- Mikael Abrahamsson email: swmike@swm.pp.se