From mboxrd@z Thu Jan 1 00:00:00 1970 From: Song Liu Subject: Re: [PATCH v2 1/2] md raid0/linear: Introduce new array state 'broken' Date: Wed, 21 Aug 2019 18:06:10 +0000 Message-ID: References: <20190816134059.29751-1-gpiccoli@canonical.com> <1f16110b-b798-806f-638b-57bbbedfea49@canonical.com> <1725F15D-7CA2-4B8D-949A-4D8078D53AA9@fb.com> <4c95f76c-dfbc-150c-2950-d34521d1e39d@canonical.com> <8E880472-67DA-4597-AFAD-0DAFFD223620@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Content-ID: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: "Guilherme G. Piccoli" Cc: "linux-block@vger.kernel.org" , Song Liu , NeilBrown , linux-raid , "dm-devel@redhat.com" , Jay Vosburgh List-Id: linux-raid.ids > On Aug 21, 2019, at 9:14 AM, Song Liu wrote: > > > >> On Aug 21, 2019, at 7:16 AM, Guilherme G. Piccoli wrote: >> >> On 19/08/2019 18:57, Song Liu wrote: >>> [...] >>> How about we test this when we do clear_bit(Faulty..)? And maybe also in >>> add_new_disk()? >>> >>> Thanks, >>> Song >>> >> >> Song, thanks for the suggestions. I've been working in the refactor, so >> far it's working fine. But I cannot re-add a member to raid0/linear >> without performing a full stop (with "mdadm --stop"), and in this case >> md_clean() will clear the flag. Restarting array this way works fine. >> >> If I try writing 'inactive' to array_state, I cannot reinsert the member >> to the array. That said, I don't think we need to worry in clearing >> MD_BROKEN for RAID0/LINEAR, and it makes things far easier. >> Are you ok with that? I'll submit V3 after our discussion. >> > > What do you mean by "not clear MD_BROKEN"? Do you mean we need to restart > the array? > > IOW, the following won't work: > > mdadm --fail /dev/md0 /dev/sdx > mdadm --remove /dev/md0 /dev/sdx > mdadm --add /dev/md0 /dev/sdx > > And we need the following instead: > > mdadm --fail /dev/md0 /dev/sdx > mdadm --remove /dev/md0 /dev/sdx > mdadm --stop /dev/md0 /dev/sdx > mdadm --add /dev/md0 /dev/sdx > mdadm --run /dev/md0 /dev/sdx Btw, the MD_BROKEN patch conflicts with one of Neil's patches. Please rebase your work on top of https://git.kernel.org/pub/scm/linux/kernel/git/song/md.git/tree/?h=md-next Thanks, Song