linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Piszcz <jpiszcz@lucidpixels.com>
To: Rich Walker <rw@shadowrobot.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Removing devices from RAID-5
Date: Thu, 14 Jun 2007 15:33:26 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706141532480.23938@p34.internal.lan> (raw)
In-Reply-To: <Pine.LNX.4.64.0706141515060.23451@p34.internal.lan>

> > > I would think that
> > > mdadm --grow --raid-devices=4 -z max /dev/md1 /dev/hdg2 /dev/hde2
> > > /dev/sda2 /dev/hdk2

Make sure the new device is added as a spare first the -z should not be 
needed, by default it should use all space on the new drive.

On Thu, 14 Jun 2007, Justin Piszcz wrote:

>
>
> On Thu, 14 Jun 2007, Rich Walker wrote:
>
>> Justin Piszcz <jpiszcz@lucidpixels.com> writes:
>> 
>>> On Thu, 14 Jun 2007, Rich Walker wrote:
>> 
>> [snip]
>>>> 
>>>> The array is used as a single PV/VG for LVM.
>>>> 
>>>> What I want to do is to
>>>> (a) reduce the PV/VG so it would fit in 160*3 rather than 160*4
>>>> (b) remove the last 160GB drive, (hdi), taking the array from 4+1 to 4+0
>>>> (c) rearrange the array from 4+0 to 3+1
>>>> (d) grow the array to 250*3
>>>> (e) enlarge the PV/VG again.
>>>> 
>>>> I would think that
>>>> mdadm --grow --raid-devices=4 -z max /dev/md1 /dev/hdg2 /dev/hde2 
>>>> /dev/sda2 /dev/hdk2
>>>> would do steps (b),(c),(d) in one go - is this correct?
>>>> 
>>>> The linux kernel version running is 2.6.21.3 SMP.
>>> 
>>> As far as I know you cannot shrink any md raid in Linux.
>>> 
>>> Justin.
>> 
>> Step (c) shrinks the array, which would be a problem.
>> 
>> But the mdadm command given *should* actually grow the array (from 640GB
>> to 750GB) whilst reducing the number of disks...
>> 
>> Is this likely to work?
>> 
>> mdadm says:
>> 
>> thoth:/--# mdadm --grow --help
>> Usage: mdadm --grow device options
>> 
>> This usage causes mdadm to attempt to reconfigure a running array.
>> This is only possibly if the kernel being used supports a particular
>> reconfiguration.  This version only supports changing the number of
>> devices in a RAID1, and changing the active size of all devices in
>> a RAID1/4/5/6.
>> 
>> Options that are valid with the grow (-G --grow) mode are:
>>  --size=        -z   : Change the active size of devices in an array.
>>                      : This is useful if all devices have been replaced
>>                      : with larger devices.
>>  --raid-disks=  -n   : Change the number of active devices in a RAID1
>>                      : array.
>> thoth:/--# mdadm -V
>> mdadm - v2.5.6 - 9 November 2006
>> thoth:/--#
>> 
>> which makes me think it wouldn't...
>> 
>> cheers, Rich.
>> 
>> -- 
>> rich walker         |  Shadow Robot Company | rw@shadow.org.uk
>> technical director     251 Liverpool Road   |
>> need a Hand?           London  N1 1LX       | +UK 20 7700 2487
>> www.shadowrobot.com/hand/overview.shtml
>> 
>> -
>> 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
>> 
>
> You can try it, otherwise grab the latest version of mdadm and go ahead and 
> grow it.  I have grown a 1.8TB array to 3.3TB and it was a pretty old version 
> of mdadm.
>
> Justin.
> -
> 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
>

  reply	other threads:[~2007-06-14 19:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 18:13 Removing devices from RAID-5 Rich Walker
2007-06-14 18:23 ` Justin Piszcz
2007-06-14 18:56   ` Rich Walker
2007-06-14 19:15     ` Justin Piszcz
2007-06-14 19:33       ` Justin Piszcz [this message]
2007-06-14 19:27 ` Jon Nelson

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=Pine.LNX.4.64.0706141532480.23938@p34.internal.lan \
    --to=jpiszcz@lucidpixels.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=rw@shadowrobot.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 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).