RAID superblock formats

From Linux Raid Wiki
(Difference between revisions)
Jump to: navigation, search
Line 157: Line 157:
 
<tr><td colspan="8">&nbsp;</td></tr>
 
<tr><td colspan="8">&nbsp;</td></tr>
 
<tr>
 
<tr>
<td colspan="8">Special Section: for RAID-Reshape</td>
+
<td colspan="8">Special Section: for RAID-Reshape (Only valid if feature_map bit '4' is set)</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 167: Line 167:
 
<td>__u32</td>
 
<td>__u32</td>
 
<td>See field named<br>"level" above</td>
 
<td>See field named<br>"level" above</td>
<td>(Only valid if<br>feature bit '4'<br>is set)</td>
+
<td>&nbsp;</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 177: Line 177:
 
<td>__u64</td>
 
<td>__u64</td>
 
<td>current position of the reshape operation</td>
 
<td>current position of the reshape operation</td>
<td>(Only valid if<br>feature bit '4'<br>is set)</td>
+
<td>&nbsp;</td>
 
<tr>
 
<tr>
 
</tr>
 
</tr>
Line 187: Line 187:
 
<td>__u32</td>
 
<td>__u32</td>
 
<td>change in # of raid disks</td>
 
<td>change in # of raid disks</td>
<td>(Only valid if<br>feature bit '4'<br>is set)</td>
+
<td>&nbsp;</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 197: Line 197:
 
<td>__u32</td>
 
<td>__u32</td>
 
<td>new layout for array</td>
 
<td>new layout for array</td>
<td>(Only valid if<br>feature bit '4'<br>is set)</td>
+
<td>&nbsp;</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 207: Line 207:
 
<td>__u32</td>
 
<td>__u32</td>
 
<td>new chunk size<br>(See )</td>
 
<td>new chunk size<br>(See )</td>
<td>(Only valid if<br>feature bit '4'<br>is set)</td>
+
<td>&nbsp;</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 220: Line 220:
 
</tr>
 
</tr>
 
<tr><td colspan="8">&nbsp;</td></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 sections haven't been added to the wiki yet</td></tr>
 
<tr>
 
<tr>
 
<td>Oh</td>
 
<td>Oh</td>

Revision as of 18:54, 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 (Only valid if feature_map bit '4' is set)
0x94 100 4 new_level (Used with RESHAPE)
the new RAID level being reshaped-to
__u32 See field named
"level" above
 
0x98 104 8 reshape_position (Used with RESHAPE)
Next address of the array to reshape
__u64 current position of the reshape operation  
0xa0 112 4 delta_disks (Used with RESHAPE)
this holds the change
in # of raid disks
__u32 change in # of raid disks  
0xa4 116 4 new_layout (Used with RESHAPE)
__u32 new layout for array  
0xa8 120 4 new_chunk (Used with RESHAPE)
__u32 new chunk size
(See )
 
0xac 124 4 pad1 Padding Block #1 __u8[4] 0 Always set to
zero when writing
 
Remaining sections haven't been added to the wiki yet
Oh Od Lb Fn Fm Dt Dv Nt
Personal tools