All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Mateusz Kusiak <mateusz.kusiak@linux.intel.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: MD: drive removal hangs with freshly created partition
Date: Wed, 3 Jul 2024 10:09:16 +0200	[thread overview]
Message-ID: <20240703100916.000035d8@linux.intel.com> (raw)
In-Reply-To: <5db667c7-56dc-4283-9205-9bfde1affd5d@linux.intel.com>

On Tue, 2 Jul 2024 16:57:38 +0200
Mateusz Kusiak <mateusz.kusiak@linux.intel.com> wrote:

> Hello,
> I'm back with another regression found in SLES15SP6.
> 
> The scenario is as follows:
> 1.Create RAID 1 volume with native metadata.
> # mdadm -CR /dev/md126 -l1 -n2 /dev/nvme[0-1]n1 --assume-clean --size=5G
> 
> 2. Create partition and filesystem on raid volume.
> # parted -a optimal /dev/md126 mktable gpt mkpart primary ext4 0% 100% -s
> # mkfs.ext4 -F /dev/md126p1
> 
> 3. Remove device via "--incremental --fail".
> # mdadm -If nvme0n1
> 
> Result:
> Mdadm hangs and hung task info from mutliple components starts appearing on
> serial.
> 
> Few notes:
> * Issue does not reproduce without creating partition and filesystem.
> * If array is stopped and reassembled before step 3, the issue does not
> reproduce.
> * If partition is "reused" (metadata was cleared, new raid volume created,
> partition left in tact, no recreating partition) the issue does not reproduce.
> * If "--set-faulty" and then "--remove" used (instead of "--incremental
> --fail") "--set-faulty" succeeds, "--remove" hangs.
> * I verified this is not mdadm issue by installing mdadm-4.2 (SLES15SP6 has
> mdadm-4.3 inbox) and rerunning the test. Outcome is the same.
> * Writing "remove" to sysfs directly has same result.
> 
> Thanks,
> Mateusz
> 

More info:
As Mateusz said echo "remove" >/sys/block/md126/md/rd0/state hangs. Same hang
is observed with HOT_REMOVE_DISK ioctl. We can simulate the scenario by:

echo "faulty" >/sys/block/md126/md/rd0/state
echo "remove" >/sys/block/md126/md/rd0/state

This is really interesting that it is only happening with partitions and only
after their creation.

Mariusz

  reply	other threads:[~2024-07-03  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 14:57 MD: drive removal hangs with freshly created partition Mateusz Kusiak
2024-07-03  8:09 ` Mariusz Tkaczyk [this message]
2024-07-04  9:42 ` Mateusz Kusiak

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=20240703100916.000035d8@linux.intel.com \
    --to=mariusz.tkaczyk@linux.intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=mateusz.kusiak@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.