From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gionatan Danti Subject: Re: Filesystem corruption on RAID1 Date: Mon, 21 Aug 2017 07:57:17 +0200 Message-ID: <04f4fabc549393c4be0d39913821d4bc@assyoma.it> 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 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: Chris Murphy Cc: Mikael Abrahamsson , Roger Heflin , Wols Lists , Reindl Harald , Roman Mamedov , Linux RAID , chris@colorremedies.com List-Id: linux-raid.ids Il 21-08-2017 01:22 Chris Murphy ha scritto: > Another way is to split the mirror (make one device faulty), and then > fix the remaining drive (now degraded). If that goes well, the 2nd > device can be re-added. Here's a caveat thought: how it resync's will > depend on the write-intent bitmap being present. I have no idea if > write-intent bitmaps on two drives can get out of sync and what the > ensuing behavior is, but I'd like to think md will discover the fixed > drive event count is higher than the re-added one, and if necessary > does a full resync, rather than possibly re-introducing any > corruption. On the corruption I am replicating (brief SATA power interruptions), the event count of both drives where identical, and so was the write bitmap (not always, thought). To be 100% sure to completly copy from the mirror device, you had to re-add the corrupted driver as a spare, by using "--add-spare". From the man page: "--add-spare Add a device as a spare. This is similar to --add except that it does not attempt --re-add first. The device will be added as a spare even if it looks like it could be an recent member of the array." Regards. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@assyoma.it - info@assyoma.it GPG public key ID: FF5F32A8