linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Reduce number of active RAID1 devices
@ 2012-01-30 18:40 Jan Ceuleers
  2012-01-30 18:53 ` Jérôme Poulin
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Ceuleers @ 2012-01-30 18:40 UTC (permalink / raw)
  To: linux-raid

Hi

I have a 4-device RAID1 set (with one device missing), which I want to 
bring down to two active devices and a spare.

When I try to do so with the latest mdadm on my current kernel, it fails 
simply with "mdadm: failed to set raid disks".

root@zotac:~# mdadm /dev/md0 --grow --raid-devices=2
mdadm: failed to set raid disks
root@zotac:~# mdadm /dev/md0 --grow --raid-devices=2 -x 1
mdadm: option -x not valid in grow mode
root@zotac:~# mdadm -V
mdadm - v3.2.3 - 23rd December 2011
root@zotac:~# uname -a
Linux zotac 2.6.35-32-generic #64-Ubuntu SMP Tue Jan 3 00:47:07 UTC 2012 
x86_64 GNU/Linux
root@zotac:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] 
[raid4] [raid10]
md1 : active raid1 sdb3[3] sde2[2] sdd2[0]
       487861824 blocks [4/3] [U_UU]

md0 : active raid1 sdb2[3] sde1[2] sdd1[0]
       521984 blocks [4/3] [U_UU]

unused devices: <none>


Is it possible to do this without taking the array offline?

Thank you.

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

* Re: Reduce number of active RAID1 devices
  2012-01-30 18:40 Reduce number of active RAID1 devices Jan Ceuleers
@ 2012-01-30 18:53 ` Jérôme Poulin
  2012-01-30 19:06   ` Jan Ceuleers
  0 siblings, 1 reply; 3+ messages in thread
From: Jérôme Poulin @ 2012-01-30 18:53 UTC (permalink / raw)
  To: Jan Ceuleers; +Cc: linux-raid

On Mon, Jan 30, 2012 at 1:40 PM, Jan Ceuleers <jan.ceuleers@computer.org> wrote:
>
> md0 : active raid1 sdb2[3] sde1[2] sdd1[0]
>      521984 blocks [4/3] [U_UU]

You must first fail and remove a device from the array, reduce to 2
components and add back the spare which will appear as sdxN (S). You
can do this online.
--
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] 3+ messages in thread

* Re: Reduce number of active RAID1 devices
  2012-01-30 18:53 ` Jérôme Poulin
@ 2012-01-30 19:06   ` Jan Ceuleers
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Ceuleers @ 2012-01-30 19:06 UTC (permalink / raw)
  To: Jérôme Poulin; +Cc: linux-raid

On 01/30/2012 07:53 PM, Jérôme Poulin wrote:
> On Mon, Jan 30, 2012 at 1:40 PM, Jan Ceuleers<jan.ceuleers@computer.org>  wrote:
>> md0 : active raid1 sdb2[3] sde1[2] sdd1[0]
>>       521984 blocks [4/3] [U_UU]
> You must first fail and remove a device from the array, reduce to 2
> components and add back the spare which will appear as sdxN (S). You
> can do this online.
>
That works, thank you very much.

root@zotac:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] 
[raid4] [raid10]
md1 : active raid1 sdb3[2](S) sde2[1] sdd2[0]
       487861824 blocks [2/2] [UU]

md0 : active raid1 sdb2[2](S) sde1[1] sdd1[0]
       521984 blocks [2/2] [UU]

unused devices: <none>


--
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] 3+ messages in thread

end of thread, other threads:[~2012-01-30 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 18:40 Reduce number of active RAID1 devices Jan Ceuleers
2012-01-30 18:53 ` Jérôme Poulin
2012-01-30 19:06   ` Jan Ceuleers

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