Skip to contentSkip to conversation

resizing array devices not working?

DISCUSSION Phillip Susi 2 participants 2 messages Jun 21, 2012 – Jun 26, 2012 MD RAID

lore
Share & tools
lore
#0 lore raw

I was trying to do a little experiment with resizing devices. I created two 1g logical volumes and built a raid1 array out of them, then lvresized the volumes to 2g, then ran:

mdadm -G -z max /dev/md1

That SHOULD expand the array to use the extra space right? It keeps telling me that it set the size to just 1g.

#1 lore raw
Quoted 8 lines · On Thu, 21 Jun 2012 11:19:37 -0400 Phillip Susi <[email protected]> wrote:

I was trying to do a little experiment with resizing devices. I created two 1g logical volumes and built a raid1 array out of them, then lvresized the volumes to 2g, then ran:

mdadm -G -z max /dev/md1

That SHOULD expand the array to use the extra space right? It keeps telling me that it set the size to just 1g.

Maybe you need a newer mdadm - 3.2.2 or newer might be required. but you didn't say which version you were using, or which kernel.

Or maybe you have 0.90 metadata and a kernel earlier than 3.1 that imposed some limits, but I think that allows up-to 2GB, not upto 1, so that can't be the problem.

Maybe you can just
for i in /sys/block/md1/md/dev-*
do echo 0 > $i/size
done

and try again. '0' means 'max' in this context.

NeilBrown