linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm won't remove drive from array
@ 2014-02-24 10:51 Caspar Smit
  2014-02-24 11:05 ` Mikael Abrahamsson
  2014-02-24 21:54 ` NeilBrown
  0 siblings, 2 replies; 5+ messages in thread
From: Caspar Smit @ 2014-02-24 10:51 UTC (permalink / raw)
  To: Linux RAID

Hi all,

I'm having trouble removing a failed drive from an array.

#cat /proc/mdstat

md5 : active raid6 sdn[14](S) sdm[13](S) sdad[12] sdl[11] sdba[10]
sde[0](F) sdd[9] sdc[8] sdk[7] sdj[6] sdi[5] sdh[3] sdg[2]
      15628103680 blocks super 1.2 level 6, 512k chunk, algorithm 2
[10/10] [UUUUUUUUUU]

The drive in question is sde

#mdadm --remove /dev/md5 /dev/sde
mdadm: cannot find /dev/sde: No such file or directory

The drive crashed so hard it is not visible to the kernel anymore.

# cat /proc/partitions |grep sde
<no output>

Normally in such case i do:

#mdadm --remove /dev/md5 detached
<no output>

The drive remains in the array.

Is there any other way to remove this detached drive from the array
without having to stop/start the array or is this a (known) bug?

# mdadm -V
mdadm - v3.1.4 - 31st August 2010

# uname -a
Linux supernas01 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.39-2~bpo60+1
x86_64 GNU/Linux

Kind regards,
Caspar Smit

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm won't remove drive from array
  2014-02-24 10:51 mdadm won't remove drive from array Caspar Smit
@ 2014-02-24 11:05 ` Mikael Abrahamsson
  2014-02-24 13:46   ` Caspar Smit
  2014-02-24 21:54 ` NeilBrown
  1 sibling, 1 reply; 5+ messages in thread
From: Mikael Abrahamsson @ 2014-02-24 11:05 UTC (permalink / raw)
  To: Caspar Smit; +Cc: Linux RAID

On Mon, 24 Feb 2014, Caspar Smit wrote:

> #mdadm --remove /dev/md5 /dev/sde
> mdadm: cannot find /dev/sde: No such file or directory

Accordig to mdadm manpage the syntax is:

mdadm [mode] <raiddevice> [options] <component-devices>

Could you please verify if "mdadm --manage /dev/md5 --remove /dev/sde"

gives the same behaviour.

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm won't remove drive from array
  2014-02-24 11:05 ` Mikael Abrahamsson
@ 2014-02-24 13:46   ` Caspar Smit
  0 siblings, 0 replies; 5+ messages in thread
From: Caspar Smit @ 2014-02-24 13:46 UTC (permalink / raw)
  To: Linux RAID

Hi Mikael,

# mdadm --manage /dev/md5 --remove /dev/sde
mdadm: cannot find /dev/sde: No such file or directory

# mdadm --manage /dev/md5 --remove detached
<no output>

So this doesn't make any difference.

Kind regards,
Caspar Smit

2014-02-24 12:05 GMT+01:00 Mikael Abrahamsson <swmike@swm.pp.se>:
> On Mon, 24 Feb 2014, Caspar Smit wrote:
>
>> #mdadm --remove /dev/md5 /dev/sde
>> mdadm: cannot find /dev/sde: No such file or directory
>
>
> Accordig to mdadm manpage the syntax is:
>
> mdadm [mode] <raiddevice> [options] <component-devices>
>
> Could you please verify if "mdadm --manage /dev/md5 --remove /dev/sde"
>
> gives the same behaviour.
>
> --
> Mikael Abrahamsson    email: swmike@swm.pp.se

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm won't remove drive from array
  2014-02-24 10:51 mdadm won't remove drive from array Caspar Smit
  2014-02-24 11:05 ` Mikael Abrahamsson
@ 2014-02-24 21:54 ` NeilBrown
  2014-02-25  9:18   ` Caspar Smit
  1 sibling, 1 reply; 5+ messages in thread
From: NeilBrown @ 2014-02-24 21:54 UTC (permalink / raw)
  To: Caspar Smit; +Cc: Linux RAID

[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]

On Mon, 24 Feb 2014 11:51:00 +0100 Caspar Smit <c.smit@truebit.nl> wrote:

> Hi all,
> 
> I'm having trouble removing a failed drive from an array.
> 
> #cat /proc/mdstat
> 
> md5 : active raid6 sdn[14](S) sdm[13](S) sdad[12] sdl[11] sdba[10]
> sde[0](F) sdd[9] sdc[8] sdk[7] sdj[6] sdi[5] sdh[3] sdg[2]
>       15628103680 blocks super 1.2 level 6, 512k chunk, algorithm 2
> [10/10] [UUUUUUUUUU]
> 
> The drive in question is sde
> 
> #mdadm --remove /dev/md5 /dev/sde
> mdadm: cannot find /dev/sde: No such file or directory
> 
> The drive crashed so hard it is not visible to the kernel anymore.
> 
> # cat /proc/partitions |grep sde
> <no output>
> 
> Normally in such case i do:
> 
> #mdadm --remove /dev/md5 detached
> <no output>
>
> The drive remains in the array.

Odd.  This suggests that /dev/sde has been removed (presumably by udev) but
that if you create a device with the appropriate major/minor numbers, the
device can be opened.  Maybe udev got confused....

> 
> Is there any other way to remove this detached drive from the array
> without having to stop/start the array or is this a (known) bug?

Try
   mdadm /dev/md5 --remove faulty

that will remove all devices marked as 'faulty'.
You could all use

   mdadm -If sde

NeilBrown


> 
> # mdadm -V
> mdadm - v3.1.4 - 31st August 2010
> 
> # uname -a
> Linux supernas01 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.39-2~bpo60+1
> x86_64 GNU/Linux
> 
> Kind regards,
> Caspar Smit
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm won't remove drive from array
  2014-02-24 21:54 ` NeilBrown
@ 2014-02-25  9:18   ` Caspar Smit
  0 siblings, 0 replies; 5+ messages in thread
From: Caspar Smit @ 2014-02-25  9:18 UTC (permalink / raw)
  To: Linux RAID

2014-02-24 22:54 GMT+01:00 NeilBrown <neilb@suse.de>:
> On Mon, 24 Feb 2014 11:51:00 +0100 Caspar Smit <c.smit@truebit.nl> wrote:
>
>> Hi all,
>>
>> I'm having trouble removing a failed drive from an array.
>>
>> #cat /proc/mdstat
>>
>> md5 : active raid6 sdn[14](S) sdm[13](S) sdad[12] sdl[11] sdba[10]
>> sde[0](F) sdd[9] sdc[8] sdk[7] sdj[6] sdi[5] sdh[3] sdg[2]
>>       15628103680 blocks super 1.2 level 6, 512k chunk, algorithm 2
>> [10/10] [UUUUUUUUUU]
>>
>> The drive in question is sde
>>
>> #mdadm --remove /dev/md5 /dev/sde
>> mdadm: cannot find /dev/sde: No such file or directory
>>
>> The drive crashed so hard it is not visible to the kernel anymore.
>>
>> # cat /proc/partitions |grep sde
>> <no output>
>>
>> Normally in such case i do:
>>
>> #mdadm --remove /dev/md5 detached
>> <no output>
>>
>> The drive remains in the array.
>
> Odd.  This suggests that /dev/sde has been removed (presumably by udev) but
> that if you create a device with the appropriate major/minor numbers, the
> device can be opened.  Maybe udev got confused....
>
>>
>> Is there any other way to remove this detached drive from the array
>> without having to stop/start the array or is this a (known) bug?
>

Hi Neil,

Thanks for your answer(s)

> Try
>    mdadm /dev/md5 --remove faulty
>
> that will remove all devices marked as 'faulty'.

# mdadm /dev/md5 --remove faulty
<no output>

> You could all use
>
>    mdadm -If sde

# mdadm -If sde
mdadm: set sde faulty in md5
mdadm: hot removed sde from md5

#cat /proc/mdstat

md5 : active raid6 sdn[14](S) sdm[13](S) sdad[12] sdl[11] sdba[10]
sdd[9] sdc[8] sdk[7] sdj[6] sdi[5] sdh[3] sdg[2]
      15628103680 blocks super 1.2 level 6, 512k chunk, algorithm 2
[10/10] [UUUUUUUUUU]

Finally that did the trick, it's gone! Thank you very much!

Kind regards,
Caspar

>
> NeilBrown
>
>
>>
>> # mdadm -V
>> mdadm - v3.1.4 - 31st August 2010
>>
>> # uname -a
>> Linux supernas01 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.39-2~bpo60+1
>> x86_64 GNU/Linux
>>
>> Kind regards,
>> Caspar Smit
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-25  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-24 10:51 mdadm won't remove drive from array Caspar Smit
2014-02-24 11:05 ` Mikael Abrahamsson
2014-02-24 13:46   ` Caspar Smit
2014-02-24 21:54 ` NeilBrown
2014-02-25  9:18   ` Caspar Smit

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).