Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: "Keith ." <lukano@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Shrink mdadm RAID5 from 6 disks to 5?
Date: Fri, 21 May 2010 08:32:41 +1000	[thread overview]
Message-ID: <20100521083241.43755d02@notabene.brown> (raw)
In-Reply-To: <AANLkTimn5ieodsVPsZY022b7VAnfFNARyb3sQn2LMp7u@mail.gmail.com>

On Thu, 20 May 2010 15:42:23 -0600
"Keith ." <lukano@gmail.com> wrote:

> Thanks for the quick reply Neil,
> 
> I tried the suggested syntax, excluding the array-size in order to
> have mdadm give me the value - but it did not.  I also tried grabbing
> the current array size from df, but I got an error about being unable
> to change array size in the same operation.
> 
> So just to confirm I'm understanding you correctly ;  mdadm -G
> /dev/md127 --raid-devices 5 --backup=/root/backup  - should generate
> an error that provides the array-size value?

Yes.
Actually, you do probably need to change the size first:

  mdadm --grow /dev/md127 --array-size=xxxxx
then once you are sure you haven't lost you data, change the number of
devices.

It might help if you ran the commands with "-v" and reported all the
messages generated, and any kernel log messages.
And maybe
  cat /proc/mdstat

just to give us some more context..
Maybe you have a write-intent-bitmap attached to the array.  You cannot
reshape an array with one of those attached.

NeilBron


> 
> On Thu, May 20, 2010 at 3:34 PM, Neil Brown <neilb@suse.de> wrote:
> > On Thu, 20 May 2010 07:45:23 -0600
> > "Keith ." <lukano@gmail.com> wrote:
> >
> >> Does mdadm 3.1.x not support shrinking the number of disks in a RAID5 array?
> >>
> >> I have successfully converted my 6x1.5tb RAID6 array to a 6x1.5tb
> >> RAID5 array.  The issue that I now face is that one of those 6 drives
> >> is failed / removed, and as a result - the new RAID5 array is down
> >> it's parity drive.
> >>
> >> I knew I was short a disk when I started the process, but I was under
> >> the assumption that mdadm now supported shrinking of RAID5/6 arrays.
> >> Am I mistaken, or can anyone throw some suggestions at me so I can
> >> give it a try?
> >
> > It should work.
> >
> >  mdadm -G /dev/mdX --raid-devices 5 --array-size=XXXXX
> >  --backup=/root/backup-file
> >
> > If you don't give the 'array-size' value mdadm will tell you what it has to
> > be.  You need to be sure that all your data is already within that space.
> >
> > NeilBrown
> >

--
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:[~2010-05-20 22:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20 13:45 Shrink mdadm RAID5 from 6 disks to 5? Keith .
2010-05-20 21:34 ` Neil Brown
2010-05-20 21:42   ` Keith .
2010-05-20 22:32     ` Neil Brown [this message]
     [not found]       ` <AANLkTikQcA98OzjFn93X8ChJanHMLTIdrvrIEMQAU4lA@mail.gmail.com>
     [not found]         ` <AANLkTilJqmd9jwNSdlBxA4G07bB7RLB6XR0AwqFhe5uk@mail.gmail.com>
2010-05-30 22:54           ` Keith .

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=20100521083241.43755d02@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=lukano@gmail.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