linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. David Beutel" <jdb@getsu.com>
To: Richard Scobie <richard@sauce.co.nz>
Cc: Linux RAID Mailing List <linux-raid@vger.kernel.org>
Subject: Re: reducing the number of disks a RAID1 expects
Date: Sun, 09 Sep 2007 21:31:54 -1000	[thread overview]
Message-ID: <46E4F2EA.3020901@getsu.com> (raw)
In-Reply-To: <46E4AC1A.3010509@sauce.co.nz>

Richard Scobie wrote:
> Have a look at the "Grow Mode" section of the mdadm man page.

Thanks!  I overlooked that, although I did look at the man page before 
posting.

> It looks as though you should just need to use the same command you 
> used to grow it to 3 drives, except specify only 2 this time.

I think I hot-added it.  Anyway, --grow looks like what I need, but I'm 
having some difficulty with it.  The man page says, "Change the size or 
shape of an active array."  But I got:

[root@samue ~]# mdadm --grow /dev/md5 -n2
mdadm: Cannot set device size/shape for /dev/md5: Device or resource busy
[root@samue ~]# umount /dev/md5
[root@samue ~]# mdadm --grow /dev/md5 -n2
mdadm: Cannot set device size/shape for /dev/md5: Device or resource busy

So I tried stopping it, but got:

[root@samue ~]# mdadm --stop /dev/md5
[root@samue ~]# mdadm --grow /dev/md5 -n2
mdadm: Cannot get array information for /dev/md5: No such device
[root@samue ~]# mdadm --query /dev/md5 --scan
/dev/md5: is an md device which is not active
/dev/md5: is too small to be an md component.
[root@samue ~]# mdadm --grow /dev/md5 --scan -n2
mdadm: option s not valid in grow mode

Am I trying the right thing, but running into some limitation of my 
version of mdadm or the kernel?  Or am I overlooking something 
fundamental yet again?  md5 looked like this in /proc/mdstat before I 
stopped it:

md5 : active raid1 hdc8[2] hdg8[1]
      58604992 blocks [3/2] [_UU]

For -n the man page says, "This  number can only be changed using --grow 
for RAID1 arrays, and only on kernels which provide necessary support."

Grow mode says, "Various types of growth may be added during 2.6  
development, possibly  including  restructuring  a  raid5 array to have 
more active devices. Currently the only support available is to change 
the "size" attribute for  arrays  with  redundancy,  and  the raid-disks 
attribute of RAID1 arrays.  ...  When  reducing the number of devices in 
a RAID1 array, the slots which are to be removed from the array must 
already be vacant.  That is, the devices that which were in those slots 
must be failed and removed."

I don't know how I overlooked all that the first time, but I can't see 
what I'm overlooking now.

mdadm - v1.6.0 - 4 June 2004
Linux 2.6.12-1.1381_FC3 #1 Fri Oct 21 03:46:55 EDT 2005 i686 athlon i386 
GNU/Linux

Cheers,
11011011

  reply	other threads:[~2007-09-10  7:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10  1:10 reducing the number of disks a RAID1 expects J. David Beutel
2007-09-10  2:29 ` Richard Scobie
2007-09-10  7:31   ` J. David Beutel [this message]
2007-09-10  9:55     ` Iustin Pop
2007-09-11 13:33       ` Bill Davidsen
2007-09-11 14:04       ` Neil Brown
2007-09-15 21:13         ` J. David Beutel
2007-09-16 22:09           ` Goswin von Brederlow

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=46E4F2EA.3020901@getsu.com \
    --to=jdb@getsu.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=richard@sauce.co.nz \
    /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).