RAID superblock formats

From Linux Raid Wiki
(Difference between revisions)
Jump to: navigation, search
(RAID Superblock Formats)
 
Line 174: Line 174:
 
<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>(Only valid if<br>feature bit '4'<br>is set)</td>
 +
<tr>
 
</tr>
 
</tr>
 
<td>0xa0</td>
 
<td>0xa0</td>
Line 184: Line 185:
 
<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>
 +
<tr>
 
<td>0xa4</td>
 
<td>0xa4</td>
 
<td>116</td>
 
<td>116</td>
Line 193: Line 195:
 
<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>
 +
<tr>
 
<td>0xa8</td>
 
<td>0xa8</td>
 
<td>120</td>
 
<td>120</td>

Revision as of 18:39, 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
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
Personal tools