On Sat, 01 Mar 2014 00:23:59 +1100 Eyal Lebedinsky wrote: > Thanks Piergiorgio, > > I did search before, unsuccessfully. I repeated now with different keywords and found > this entry in the kernel wiki > https://raid.wiki.kernel.org/index.php/RAID_superblock_formats > > It documents the initial fixed fields of the superblock. I still do not know how > the intent bitmap is laid out. I can see that it starts 4KB into the superblock: > Internal Bitmap : 8 sectors from superblock > but did not yet find its size (which I expect depends on the array size). > > I guess I can calculate it from the sys/block/md127/md items > component_size * 1024 / 'bitmap/chunksize' / 8 > which comes up to 7452 bytes which is still a small fraction of the 128MB header size. > > What else is there? bad blocks list? Reading an old blog (from Neil) suggests that it > is not larger than 32KB (but is only 4KB now), so still "small" in this context. > Don't know where it resides though. > > I need to understand the full layout of the header and so far I do not see anything that > says what the area past the initial 16KB is used (is always zero when I inspect it). > I started a heavy file copy on the raid and watched the header and never saw any change. > I expected to see at least some activity in the bitmap but none encountered. > > My simple question is: is it the case that the reserved header space after 16KB is > actually still unused in header version 1.2? My bad sector is practically at the end > of this 128MB area. A trivial question to answer for someone with expert knowledge > of md. > > Anyone? The location of the superblock is reported by "mdadm --exmamine". The size is 4K (Though most of that is unsed). The location of the bitmap (if present) is reported by "mdadm --examine" as an offset from the superblock. It size can be deduced from the output of "mdadm --examine-bitmap". Take the number of bits, divide by 8, add 256 and round up to a multiple of 512. This number is bytes. The location of the bad-block-log (if present) is reported by "mdadm --examine" as an offset from the superblocks. It's size if 4K. Any other space outside of the data region is currently unused by md. NeilBrown