Re: Any way to Increase MD_SB_DISKS=27 ? I need 31 devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter, after looking at the code after i sent the email, I more or less figured out what you put below, i'm wondering though, will changing the structures here affect anything else? other than the mdadm tool.. what about mkfs.ext3/xfs and possibly mount?

Thanks,
Tyler.

Peter T. Breuer wrote:

Tyler <pml@xxxxxxxx> wrote:


I'd like to build a Raid-6 array using 31 drives, is there a patch available or an easy way to safely increase the *MD_SB_DISKS*=27 to a higher number? My attempts at patching the source myself were unsuccessful, more than likely because i don't know what/why the limit is 27, and whether that effects other parts of the kernel.



It's 27 because that's how much space there is in some of the structs.

Look in include/linux/raid. md_p.h, for example.

  #define MD_SB_DISKS                     27

and it calculates how much space that needs:

  #define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)
  #define MD_SB_DESCRIPTOR_WORDS          32

and all that is part of what must fit in a "mdp_superblock_s" struct.

          /*
           * Disks information
           */
          mdp_disk_t disks[MD_SB_DISKS];

with the space at the tail of the struct calculated ...


/* * Reserved */ __u32 reserved[MD_SB_RESERVED_WORDS];

... by figuring how much space was used and subtracting from 1K:

      #define MD_SB_RESERVED_WORDS            (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)

and the space used includes the MD_SB_DESCRIPTOR_WORDS conisting of
those 27 32-byte array elements.

To make this number bigger, you would first have to make more room in
the struct, by changing the 1K in the calculation to 4096 (thus
extending the struct by extending its reserved section), then you
could use more of that room by increasing the 27. I presume the max
would now be 3*32+27 = 123.


There might be another such struct in the includes. I haven't looked ...

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html





- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux