RAID superblock formats

From Linux Raid Wiki
(Difference between revisions)
Jump to: navigation, search
Line 154: Line 154:
 
<td>(signed)</td>
 
<td>(signed)</td>
 
<td>This is only valid if<br>feature_map[0] is set<br><br>Signed value allows bitmap<br>to appear before<br>superblock on the disk</td>
 
<td>This is only valid if<br>feature_map[0] is set<br><br>Signed value allows bitmap<br>to appear before<br>superblock on the disk</td>
 +
</tr>
 +
<tr><td colspan="8">&nbsp;</td></tr>
 +
<tr>
 +
<td colspan="8">Special Section: for RAID-Reshape</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 160: Line 164:
 
<td>4</td>
 
<td>4</td>
 
<td>new_level</td>
 
<td>new_level</td>
<td>(Used with RESHAPE)<br></td>
+
<td>(Used with RESHAPE)<br>the new RAID level being reshaped-to</td>
 
<td>__u32</td>
 
<td>__u32</td>
<td>the new level being reshaped-to</td>
+
<td>See field named<br>"level" above</td>
 
<td>(Only valid if<br>feature bit '4'<br>is set)</td>
 
<td>(Only valid if<br>feature bit '4'<br>is set)</td>
 
</tr>
 
</tr>
Line 215: Line 219:
 
<td>Always set to<br>zero when writing</td>
 
<td>Always set to<br>zero when writing</td>
 
</tr>
 
</tr>
 
+
<tr><td colspan="8">&nbsp;</td></tr>
 
<tr><td>Remaining section hasn't been added to the wiki yet</td></tr>
 
<tr><td>Remaining section hasn't been added to the wiki yet</td></tr>
 
<tr>
 
<tr>

Revision as of 18:51, 22 February 2008

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:

</tr>

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
-4Multi-Path
-1Linear
0RAID-0 (Striping)
1RAID-1 (Mirroring)
4RAID-4 (Striping with
Dedicated Parity)
5RAID-5 (Striping with
Distributed Parity)
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
 
Special Section: for RAID-Reshape
0x94 100 4 new_level (Used with RESHAPE)
the new RAID level being reshaped-to
__u32 See field named
"level" above
(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)
0xac 124 4 pad1 Padding Block #1 __u8[4] 0 Always set to
zero when writing
 
Remaining section hasn't been added to the wiki yet
Oh Od Lb Fn Fm Dt Dv Nt
Personal tools