From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Wilck Subject: Re: MD array keeps resyncing after rebooting Date: Sat, 24 Aug 2013 20:54:31 +0200 Message-ID: <52190167.10107@arcor.de> References: <51EED0DA.3020901@arcor.de> <51EED102.4020503@arcor.de> <51EEF3D3.7020305@arcor.de> <51F1754B.5000905@arcor.de> <51FAA5C3.8030109@arcor.de> <51FBF830.5060606@arcor.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: Francis Moreau Cc: linux-raid@vger.kernel.org List-Id: linux-raid.ids Hi Francis, > On Fri, Aug 2, 2013 at 8:19 PM, Martin Wilck wrote: >> On 08/02/2013 02:46 PM, Francis Moreau wrote: >> >>>> >>>> # mdadm -E /dev/sda | egrep "state" >>>> state[0] : Optimal, Consistent >>>> init state[0] : Fully Initialised >> >> This would correspond to "00 02", and it's what we should see after >> initialization. On my system the BIOS sets "00 01" (Optimal, consistent, >> Quick Init in progress) when it first creates an array, because the BIOS >> doesn't do a full initialization. But "not initialized" is weird. The >> mdadm DDF code won't set this by itself, AFAIK. Please make sure again >> that the "before" data matches what mdadm/mdmon wrote just after >> stopping during shutdown. > > I did it again and got the same result: both disks have: > > 00000860 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > > and I checked again that "mdadm -E" reported an initialized state. > > Moreover this time I did a "sync" before dumping the ddf headers. > > So I'm quite lost, I can see only 2 cases: > > - with my HW setup some metadata are not written to disks by the > kernel but stood somewhere in RAM (cache) > > - the state is not stored at address 00000860 (very unlikely) > > - the dumps are incorrect > > How can I debug this more ? > > Thanks for your help. have you got any further insight? I have LSI DDF fake RAID with mdadm running on my system right now, and it seems to work nicely; no problems over reboots. You may want to retry with my latest patch set. In particular, "DDF: container_content_ddf: set safe_mode_delay > 0" might help. Martin