linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Marc MERLIN <marc@merlins.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: mdadm --detail works, mdadm --stop says "does not appear to be an md device"
Date: Mon, 20 Mar 2023 15:36:39 +0100	[thread overview]
Message-ID: <20230320153639.0000238d@linux.intel.com> (raw)
In-Reply-To: <20230317173810.GW4049235@merlins.org>

On Fri, 17 Mar 2023 10:38:10 -0700
Marc MERLIN <marc@merlins.org> wrote:

> gargamel:~# cat /proc/mdstat 
> Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
> [multipath] md6 : active raid5 sdn1[3](F) sdt1[0](F) sds1[1](F) sdq1[2](F)
>       23441547264 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/0]
> [_____] gargamel:~# mdadm --stop /dev/md6
> mdadm: /dev/md6 does not appear to be an md device
> gargamel:~# mdadm --detail /dev/md6
> /dev/md6:
>            Version : 1.2
>      Creation Time : Wed Jul  8 10:09:21 2020
>         Raid Level : raid5
>         Array Size : 23441547264 (22355.60 GiB 24004.14 GB)
>      Used Dev Size : 5860386816 (5588.90 GiB 6001.04 GB)
>       Raid Devices : 5
>      Total Devices : 4
>        Persistence : Superblock is persistent
> 
>        Update Time : Fri Mar 17 09:17:28 2023
>              State : clean, FAILED 
>     Active Devices : 0
>     Failed Devices : 4
>      Spare Devices : 0
> 
>             Layout : left-symmetric
>         Chunk Size : 512K
> 
> Consistency Policy : ppl
> 
>     Number   Major   Minor   RaidDevice State
>        -       0        0        0      removed
>        -       0        0        1      removed
>        -       0        0        2      removed
>        -       0        0        3      removed
>        -       0        0        4      removed
> 
> 
> How do I clear this without a reboot?
> 
> gargamel:~# uname -r
> 5.19.7
> 
> 

Hi,
mdadm is unable to complete this task because it cannot ensure that it is safe
to stop the array. It cannot open the array with O_EXCL.
If it is mounted then it may hang if filesystem needs to flush some data.

Please, try umount the array if it mounted somewhere and then try:

# echo inactive > /sys/block/md6/md/array_state
# echo clear > /sys/block/md6/md/array_state

Thanks,
Mariusz

  reply	other threads:[~2023-03-20 14:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 17:38 mdadm --detail works, mdadm --stop says "does not appear to be an md device" Marc MERLIN
2023-03-20 14:36 ` Mariusz Tkaczyk [this message]
2023-03-20 14:50   ` Marc MERLIN
2023-03-20 15:16     ` Mariusz Tkaczyk
2023-03-21  2:01       ` Marc MERLIN
2023-03-22  7:11         ` Mariusz Tkaczyk
2023-03-22 18:59           ` Jes Sorensen
2023-03-28 16:47             ` Marc MERLIN

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=20230320153639.0000238d@linux.intel.com \
    --to=mariusz.tkaczyk@linux.intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=marc@merlins.org \
    /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).