From: Kevin W Monroe <kwmonroe@linux.vnet.ibm.com>
To: linux-raid@vger.kernel.org
Subject: mdadm --grow on raid1 returns nonzero
Date: Wed, 12 Oct 2011 18:27:46 -0500 [thread overview]
Message-ID: <4E962272.8020003@linux.vnet.ibm.com> (raw)
Hi folks,
I'm trying to grow a raid1 array of 2 loop devices as a test. I created
the array and successfully grew it, but mdadm --grow exits with a
non-zero return code (1). I see the following in Grow.c's analyse_change():
if (info->new_level == 1) {
if (info->delta_disks == UnSet)
/* Don't know what to do */
return "no change requested for Growing RAID1";
re->level = 1;
re->backup_blocks = 0;
re->parity = 0;
return NULL;
}
So my situation happens because info->delta_disks is UnSet. Is growing a
raid1 array on the same underlying devices not a valid use case? Here's
my setup/results:
[root@test-lpar01 ~]# mdadm --version
mdadm - v3.2.1 - 28th March 2011
[root@test-lpar01 ~]# dd if=/dev/zero of=1 bs=1024 count=10000
10000+0 records in
10000+0 records out
10240000 bytes (10 MB) copied, 0.341808 s, 30.0 MB/s
[root@test-lpar01 ~]# dd if=/dev/zero of=2 bs=1024 count=10000
10000+0 records in
10000+0 records out
10240000 bytes (10 MB) copied, 0.351076 s, 29.2 MB/s
[root@test-lpar01 ~]# losetup --show -f 1
/dev/loop0
[root@test-lpar01 ~]# losetup --show -f 2
/dev/loop1
[root@test-lpar01 ~]# mdadm -Cv /dev/md0 -l1 -n2 -z 5000 /dev/loop0
/dev/loop1
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: largest drive (/dev/loop0) exceeds size (5000K) by more than 1%
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
[root@test-lpar01 ~]# cat /proc/mdstat
Personalities : [raid0] [raid1]
md0 : active raid1 loop1[1] loop0[0]
5000 blocks super 1.2 [2/2] [UU]
unused devices: <none>
[root@test-lpar01 ~]# mdadm --grow -z 7500 /dev/md0
mdadm: component size of /dev/md0 has been set to 7500K
mdadm: no change requested for Growing RAID1
[root@test-lpar01 ~]# echo $?
1
[root@test-lpar01 ~]# cat /proc/mdstat
Personalities : [raid0] [raid1]
md0 : active raid1 loop1[1] loop0[0]
7500 blocks super 1.2 [2/2] [UU]
unused devices: <none>
You can see the array has grown, so I'm curious if the message "no
change requested for Growing RAID1" from analyse_change should really be
returned. Thanks,
--
Kevin Monroe
reply other threads:[~2011-10-12 23:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4E962272.8020003@linux.vnet.ibm.com \
--to=kwmonroe@linux.vnet.ibm.com \
--cc=linux-raid@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.