linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: "Guilherme G. Piccoli" <gpiccoli@canonical.com>
Cc: Song Liu <liu.song.a23@gmail.com>,
	linux-raid <linux-raid@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	Jay Vosburgh <jay.vosburgh@canonical.com>,
	NeilBrown <neilb@suse.com>
Subject: Re: [PATCH v2 1/2] md raid0/linear: Introduce new array state 'broken'
Date: Wed, 21 Aug 2019 19:22:43 +0000	[thread overview]
Message-ID: <EB40716A-CD63-46B1-97B8-B8C039E08548@fb.com> (raw)
In-Reply-To: <d0a3709e-c3a9-c0b1-c3c1-bf5a6d6932af@canonical.com>



> On Aug 21, 2019, at 12:10 PM, Guilherme G. Piccoli <gpiccoli@canonical.com> wrote:
> 
> On 21/08/2019 13:14, Song Liu wrote:
>> [...] 
>> 
>> 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
>> 
>> Thanks,
>> Song
>> 
> 
> Song, I've tried the first procedure (without the --stop) and failed to
> make it work on linear/raid0 arrays, even trying in vanilla kernel.
> What I could do is:
> 
> 1) Mount an array and while writing, remove a member (nvme1n1 in my
> case); "mdadm --detail md0" will either show 'clean' state or 'broken'
> if we have my patch;
> 
> 2) Unmount the array and run: "mdadm -If nvme1n1 --path
> pci-0000:00:08.0-nvme-1"
> This will result: "mdadm: set device faulty failed for nvme1n1:  Device
> or resource busy"
> Despite the error, md0 device is gone.
> 
> 3) echo 1 > /sys/bus/pci/rescan [nvme1 device is back]
> 
> 4) mdadm -A --scan [md0 is back, with both devices and 'clean' state]
> 
> So, either if we "--stop" or if we incremental fail a member of the
> array, when it's back the state will be 'clean' and not 'broken'.
> Hence, I don't see a point in clearing the MD_BROKEN flag for
> raid0/linear arrays, nor I see where we could do it.

I think this makes sense. Please send the patch and we can discuss
further while looking at the code. 

Thanks,
Song



  reply	other threads:[~2019-08-21 19:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 13:40 [PATCH v2 1/2] md raid0/linear: Introduce new array state 'broken' Guilherme G. Piccoli
2019-08-16 13:41 ` [PATCH v2 2/2] mdadm: Introduce new array state 'broken' for raid0/linear Guilherme G. Piccoli
2019-08-19 18:10 ` [PATCH v2 1/2] md raid0/linear: Introduce new array state 'broken' Song Liu
2019-08-19 18:30   ` Guilherme G. Piccoli
2019-08-19 18:57     ` Song Liu
2019-08-19 19:11       ` Guilherme G. Piccoli
2019-08-19 21:57         ` Song Liu
2019-08-21 14:16           ` Guilherme G. Piccoli
2019-08-21 16:14             ` Song Liu
2019-08-21 18:06               ` Song Liu
2019-08-21 19:10               ` Guilherme G. Piccoli
2019-08-21 19:22                 ` Song Liu [this message]
2019-08-22 16:16                   ` Guilherme G. Piccoli
2019-08-22  8:49 ` Guoqing Jiang
2019-08-22 15:35   ` Guilherme G. Piccoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EB40716A-CD63-46B1-97B8-B8C039E08548@fb.com \
    --to=songliubraving@fb.com \
    --cc=dm-devel@redhat.com \
    --cc=gpiccoli@canonical.com \
    --cc=jay.vosburgh@canonical.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=liu.song.a23@gmail.com \
    --cc=neilb@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).