Linux RAID subsystem development
 help / color / mirror / Atom feed
* RAID6 mdadm --grow bug?
@ 2007-09-13  0:39 David Miller
  2007-09-13 10:52 ` Neil Brown
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2007-09-13  0:39 UTC (permalink / raw)
  To: linux-raid



Problem:

The mdadm --grow command fails when trying to add disk to a RAID6.

The man page says it can do this.

"GROW MODE
        The GROW mode is used for changing the size or shape of an  
active array.  For this to  work,
        the  kernel must support the necessary change.  Various types  
of growth are being added dur-
        ing 2.6 development, including restructuring a raid5 array to  
have more active devices.

        Currently the only support available is to

        ·   change the "size" attribute for RAID1, RAID5 and RAID6.

        ·   increase the "raid-disks" attribute of RAID1, RAID5, and  
RAID6.

        ·   add a write-intent bitmap to any array which supports  
these bitmaps, or remove a  write-
            intent bitmap from such an array.
"

So far I have replicated this problem on RHEL5 and Ubuntu 7.04  
running the latest official updates and patches. I have even tried it  
with the most latest version of mdadm 2.6.3 under RHEL5. RHEL5 uses  
version 2.5.4.

How to replicate the problem:

You can either use real physical disks or use the loopback device to  
create fake disks.

Here are the steps using the loopback method as root.

cd /tmp
dd if=/dev/zero of=rd1 bs=10240 count=10240
cp rd1 rd2;cp rd1 rd3;cp rd1 rd4;cp rd1 rd5
losetup /dev/loop1 rd1;losetup /dev/loop2 rd2;losetup /dev/loop3  
rd3;losetup /dev/loop4 rd4;losetup /dev/loop5 rd5
mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/ 
loop1 /dev/loop2 /dev/loop3 /dev/loop4

At this point wait a minute while the raid is being built.

mdadm --add /dev/md0 /dev/loop5
mdadm --grow /dev/md0 --raid-devices=5

You should get the following error

mdadm: Need to backup 384K of critical section..
mdadm: Cannot set device size/shape for /dev/md0: Invalid argument

How to clean up

mdadm --stop /dev/md0
mdadm --remove /dev/md0
losetup -d /dev/loop1;losetup -d /dev/loop2;losetup -d /dev/ 
loop3;losetup -d /dev/loop4;losetup -d /dev/loop5
rm rd1 rd2 rd3 rd4 rd5

David.
-
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-13 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-13  0:39 RAID6 mdadm --grow bug? David Miller
2007-09-13 10:52 ` Neil Brown
2007-09-13 17:17   ` David Miller
2007-09-13 17:49     ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox