Can't grow md raid, get invalid argument

Red Squirrel

[H]F Junkie
Joined
Nov 29, 2009
Messages
9,223
I'm trying to go from a 5 disk raid5 to a 7 disk raid6 and this is the error I get:

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

This is the command I'm using:

mdadm --grow /dev/md0 --level=6 --raid-disks=7

I already added the two drives to the array (they are spares now).

I tried to just do a conversion to raid 6 without a grow but then it tells me that's not supported without also growing. I don't want to try just a grow since then I wont be able to do raid 6 anymore.
 
Code:
[root@borg localbackups]# cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md_d0 : inactive sdg[0](S)
      976762496 blocks
       
md0 : active raid5 sdi[5](S) sdh[6](S) sdb[0] sdf[4] sde[3] sdd[2] sdc[1]
      3907039744 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]
      
unused devices: <none>
[root@borg localbackups]# 
[root@borg localbackups]# uname -a
Linux borg.loc 2.6.27.25-78.2.56.fc9.x86_64 #1 SMP Thu Jun 18 12:24:37 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@borg localbackups]#

Never noticed that md_d0 device before. No idea what that is or why it's there.
 
Never noticed that md_d0 device before. No idea what that is or why it's there.

This gets created when mdadm trys to assemble an array and fails. Was /dev/sdg in some other array before?
 
Your kernel may be too old to support the non size expanding raid. I will try to look that up.

I know what you want is in 2.6.37 since I am doing a raid5 to raid6 conversion myself at the moment. A word of warning. Use a very fast disk or array for the backup file that it makes you create when it does the reshape.
 
This gets created when mdadm trys to assemble an array and fails. Was sdg in some array before?

Yhe two new drives are h and i, but it kinda explains why g was never being used. I noticed this a while back, that whenever I insert a device such as my backup drives, it goes to sdh and not g. Both drives are brand new from the factory, so they don't have anything on them.
 
Posted, but I'm starting to suspect it's a kernel thing. Everything I read points towards kernel being too old. So I'm probably out of luck and I'll have to stick to raid 5.
 
If you can afford some downtime you could use a livecd to preform the conversion. I recommend sysrescuecd for that.

http://www.sysresccd.org/Main_Page

And if you do that make sure you expand the size while converting. I made the mistake of just converting an 8 drive raid 5 to a 9 drive raid6 and it has taken 2 days already with 8 hours to go. The reason is the required backup file must be itself on a fast array (or possibly ssd) that is not the original array otherwise it will be very slow. I believe the reason is every chunk gets copied to the backup file before getting rearranged on the disks.
 
Last edited:
Hmm I never really thought of that, so if I get a live cd with an updated kernel it should be able to do it. I think I will give that a try. I can afford the downtime as it's not really serving anything other then stuff for me. I can do stuff around the house while it's rebuilding.
 
Back
Top