From: NeilBrown <neilb@suse.de>
To: Alex <mysqlstudent@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Converting RAID1 to RAID5
Date: Fri, 16 Sep 2011 05:57:27 +0200 [thread overview]
Message-ID: <20110916055727.2cd356cc@notabene.brown> (raw)
In-Reply-To: <CAB1R3siia=7u0fa=9Z02kXANW6z=KzRD2Fqfz9+e6=1Q5F9HPw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2255 bytes --]
On Thu, 15 Sep 2011 19:50:08 -0400 Alex <mysqlstudent@gmail.com> wrote:
> Hi,
>
> Last week you were helping me with trying to convert a RAID1 volume to
> RAID5. I've put together a server to test, and have made some
> progress, but have a few questions.
>
> > then try some things. e.g.
> >
> > mdadm /dev/md0 --add /dev/loop2
> > mdadm --grow /dev/md0 --level=5 --raid-devices=3
> >
> > Try failing a device during the reshape. Check if the data is still OK.
> > Try it as two separate steps and see if it makes a difference.
>
> I partitioned a third disk in the same way as the other two, and
> successfully added them to their existing respective volumes as
> spares.
>
> I was able to grow md0, which is mounted on /boot, and it resynced it
> and successfully converted it to RAID5.
>
> When I try to grow the other two partitions (/ and /home), it fails
> with device busy:
>
> # mdadm --grow /dev/md2 --level=5 --raid-devices=3
> mdadm: level of /dev/md2 changed to raid5
> mdadm: Need to backup 128K of critical section..
> mdadm: Cannot set device shape for /dev/md2: Device or resource busy
> Bitmap must be removed before shape can be changed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> mdadm: aborting level change
>
> # cat /proc/mdstat
> Personalities : [raid1] [raid6] [raid5] [raid4]
> md2 : active raid1 sdc3[2](S) sda3[0] sdb3[1]
> 186366908 blocks super 1.1 [2/2] [UU]
> bitmap: 1/2 pages [4KB], 65536KB chunk
>
> md1 : active raid1 sdc2[2](S) sda2[0] sdb2[1]
> 51198908 blocks super 1.1 [2/2] [UU]
> bitmap: 1/1 pages [4KB], 65536KB chunk
You need to remove those bitmaps first. Put them back after the reshape
completes.
(mdadm --grow --bitmap=none ; mdadm --grow --bitmap=internal)
>
> md0 : active raid5 sdc1[2] sda1[0] sdb1[1]
> 1023976 blocks super 1.0 level 5, 4k chunk, algorithm 2 [3/3] [UUU]
>
> unused devices: <none>
>
> /dev/md2 (/home) isn't mounted.
>
> When the conversion to RAID5 is complete, how can I regenerate the
> mdadm.conf to properly reflect the change?
I would use an editor.
The output of "mdadm -Ds" could be a helpful guide.
NeilBrown
>
> Thanks,
> Alex
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2011-09-16 3:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-11 3:38 Converting RAID1 to RAID5 Alex
2011-09-11 3:57 ` NeilBrown
2011-09-11 15:40 ` Alex
2011-09-15 23:50 ` Alex
2011-09-16 3:57 ` NeilBrown [this message]
2011-09-16 13:56 ` Alex
2011-09-16 15:10 ` Robin Hill
[not found] ` <27910711.10376.1316131253095.JavaMail.mobile-sync@iagt29>
2011-09-16 2:54 ` Jérôme Poulin
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=20110916055727.2cd356cc@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=mysqlstudent@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;
as well as URLs for NNTP newsgroup(s).