More than 255 raid devices

Neil Brown neilb at suse.de
Mon Sep 4 21:58:07 UTC 2006


On Monday September 4, info at contextshift.co.uk wrote:
> > No, there wouldn't be...
> > The 256 is a hard codes limit in include/linux/raid/md_k.h
> > #define MAX_MD_DEVS  256	/* Max number of md dev */
> > 
> > It could safely be increased to about 8192 I think and probably made
> > to go a little higher with a bit of care.
> > But I'm afraid it will need a recompile of the kernel.
> > 
> > I'll see about fixing this properly for 2.6.19.
> 
> being that in 2.6.* kernels the minor number is 20bits in length, is
> there any reason an upper limit of 1048576 wouldn't work?
> 

MAX_MD_DEVS cannot be set that high because
  MAX_MD_DEVS << MdpMinorShift
cannot exceed 20 bits. so MAX_MD_DEVS cannot exceed 14 bits.
I rounded down to 8192 to be safe.

But when I 'fix' it, I'll remove MAX_MD_DEVS and you, 1048576 md
devices will be possible.

NeilBrown



More information about the pkg-mdadm-devel mailing list