RAID superblock formats
From Linux Raid Wiki
Currently, the Linux RAID subsystem recognizes two distinct variant superblocks.
They are known as v0.9 and v1.x Superblock formats.
The v1.x Superblock format is as follows:
Offset (Hex) | Offset (Dec) | Length (in bytes) |
Field Name | Usage/Meaning | Data Type | Data Value | Notes | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x00 | 0 | 4 | magic | "Magic Number" (Superblock ID) |
__u32 | 0xa92b4efc (little-endian) |
|||||||||||||
0x04 | 4 | 4 | major_version | Major Version of the Superblock |
__u32 | 1 | |||||||||||||
0x08 | 8 | 4 | feature_map | Feature Map | __u32 | 0 (reserved) |
|||||||||||||
0x0c | 12 | 4 | pad0 | Padding Block | __u32 | 0 | Always set to zero when writing |
||||||||||||
0x10 | 16 | 16 | set_uuid | UUID for the Array(?) | __u8[16] | Set by user-space formatting util |
|||||||||||||
0x20 | 32 | 32 | set_name | Name for the Array(?) | char[32] | Set and used by user-space utils |
Nt | ||||||||||||
0x40 | 64 | 8 | ctime | Creation Time(?) | __u64 | low 40-bits are seconds high 24-bits are uSeconds |
|||||||||||||
0x48 | 72 | 4 | level | RAID Level of the Array |
__u32 |
|
RAID-6 not mentioned in the mdadm source(?) |
||||||||||||
0x4c | 76 | 4 | layout | layout of array (RAID5 only) |
__u32 | (?) | Only used for RAID5 |
||||||||||||
0x50 | 80 | 8 | size | used-size of component devices | __u64 | size of component devices (in # of 512-byte sectors) |
|||||||||||||
0x58 | 88 | 4 | chunksize | chunk-size of the array | __u32 | chunk-size of the array (in # of 512-byte sectors) |
|||||||||||||
0x8c | 92 | 4 | raid_disks | (?)number of disks in array(?) | __u32 | # | |||||||||||||
0x90 | 96 | 4 | bitmap_offset | # of sectors after superblock that bitmap starts (See note about signed value) |
__u32 | (signed) | This is only valid if feature_map[0] is set Signed value allows bitmap to appear before superblock on the disk |
||||||||||||
0x94 | 100 | 4 | new_level | (Used with RESHAPE) |
__u32 | the new level being reshaped-to | (Only valid if feature bit '4' is set) |
||||||||||||
0x98 | 104 | 8 | reshape_position | (Used with RESHAPE) Next address of the array to reshape |
__u64 | current position of the reshape operation | (Only valid if feature bit '4' is set) |
||||||||||||
0xa0 | 112 | 4 | delta_disks | (Used with RESHAPE) this holds the change in # of raid disks |
__u32 | change in # of raid disks | (Only valid if feature bit '4' is set) |
||||||||||||
0xa4 | 116 | 4 | new_layout | (Used with RESHAPE) |
__u32 | new layout for array | (Only valid if feature bit '4' is set) |
||||||||||||
0xa8 | 120 | 4 | new_chunk | (Used with RESHAPE) |
__u32 | new chunk size (See ) |
(Only valid if feature bit '4' is set) |
||||||||||||
Remaining section hasn't been added to the wiki yet | |||||||||||||||||||
Oh | Od | Lb | Fn | Fm | Dt | Dv | Nt |