~xnox/ubuntu/natty/mdadm/natty-proposed

« back to all changes in this revision

Viewing changes to docs/md_superblock_formats.txt

  • Committer: Dmitrijs Ledkovs
  • Author(s): martin f. krafft
  • Date: 2009-11-06 10:06:03 UTC
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: dmitrijs.ledkovs@canonical.com-20091106100603-q9s0evnzd106mrzt
Tags: 3.0.3-2
* Bumped Standards-Version to 3.8.3 without having to make changes.
* Fixed init dependencies of mdadm daemon init.d script; thanks Petter
  Reinholdtsen (closes: #541396).
* Switched source package to v3-quilt format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# From: http://linux-raid.osdl.org/index.php/RAID_superblock_formats
 
2
 
 
3
RAID superblock formats
 
4
 
 
5
From Linux-raid
 
6
 
 
7
Jump to: navigation, search
 
8
 
 
9
Contents
 
10
 
 
11
  • 1 RAID superblock formats
 
12
      □ 1.1 The version-0.90 Superblock Format
 
13
      □ 1.2 The version-1 Superblock Format
 
14
      □ 1.3 Sub-versions of the version-1 superblock
 
15
      □ 1.4 The version-1 superblock format on-disk layout
 
16
          ☆ 1.4.1 Total Size of superblock
 
17
          ☆ 1.4.2 Section: Superblock/"Magic-Number" Identification area
 
18
          ☆ 1.4.3 Section: Per-Array Identification & Configuration area
 
19
          ☆ 1.4.4 Section: RAID-Reshape In-Process Metadata Storage/Recovery
 
20
            area
 
21
          ☆ 1.4.5 Section: This-Component-Device Information area
 
22
          ☆ 1.4.6 Section: Array-State Information area
 
23
          ☆ 1.4.7 Section: Device-Roles (Positions-in-Array) area
 
24
 
 
25
[edit]
 
26
 
 
27
RAID superblock formats
 
28
 
 
29
Currently, the Linux RAID subsystem recognizes two distinct variant
 
30
superblocks.
 
31
 
 
32
They are known as "version-0.90" and "version-1" Superblock formats.
 
33
 
 
34
[edit]
 
35
 
 
36
The version-0.90 Superblock Format
 
37
 
 
38
The version-0.90 superblock format has several limitations. It limits the
 
39
number of component devices within an array to 28, and limits each component
 
40
device to a maximum size of 2TB.
 
41
 
 
42
[edit]
 
43
 
 
44
The version-1 Superblock Format
 
45
 
 
46
The version-1 superblock format represents a more-expandable format, capable of
 
47
supporting arrays with 384+ devices, with 64-bit sector lengths.
 
48
 
 
49
[edit]
 
50
 
 
51
Sub-versions of the version-1 superblock
 
52
 
 
53
The "version-1" superblock format is currently used in three different
 
54
"sub-versions".
 
55
 
 
56
The sub-versions differ primarily (solely?) in the location on each component
 
57
device at which they actually store the superblock.
 
58
 
 
59
┌───────────┬───────────────────────────────────┐
 
60
│Sub-Version│   Superblock Position on Device   │
 
61
├───────────┼───────────────────────────────────┤
 
62
│1.0        │At the end of the device           │
 
63
├───────────┼───────────────────────────────────┤
 
64
│1.1        │At the beginning of the device     │
 
65
├───────────┼───────────────────────────────────┤
 
66
│1.2        │4K from the beginning of the device│
 
67
└───────────┴───────────────────────────────────┘
 
68
[edit]
 
69
 
 
70
The version-1 superblock format on-disk layout
 
71
 
 
72
[edit]
 
73
 
 
74
Total Size of superblock
 
75
 
 
76
Total Size of superblock: 256 Bytes, plus 2 bytes per device in the array
 
77
 
 
78
[edit]
 
79
 
 
80
Section: Superblock/"Magic-Number" Identification area
 
81
 
 
82
16 Bytes, Offset 0-15 (0x00 - 0x0F)
 
83
 
 
84
┌──────┬──────┬──────┬─────────────┬───────────┬─────┬──────────────────────────┬───────┐
 
85
│Offset│Offset│Length│             │  Usage/   │Data │                          │       │
 
86
│(Hex) │(Dec) │ (in  │ Field Name  │  Meaning  │Type │        Data Value        │ Notes │
 
87
│      │      │bytes)│             │           │     │                          │       │
 
88
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
 
89
│      │      │      │             │"Magic     │     │                          │       │
 
90
│0x00 -│0 - 3 │4     │magic        │Number"    │__u32│0xa92b4efc                │       │
 
91
│0x03  │      │      │             │(Superblock│     │(little-endian)           │       │
 
92
│      │      │      │             │ID)        │     │                          │       │
 
93
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
 
94
│      │      │      │             │Major      │     │                          │       │
 
95
│0x04 -│4 - 7 │4     │major_version│Version    │__u32│1                         │       │
 
96
│0x07  │      │      │             │of the     │     │                          │       │
 
97
│      │      │      │             │Superblock │     │                          │       │
 
98
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
 
99
│      │      │      │             │           │     │0                         │       │
 
100
│      │      │      │             │           │     │Bit-Mapped Field          │       │
 
101
│      │      │      │             │           │     │                          │       │
 
102
│      │      │      │             │           │     │┌─────┬──────────────────┐│       │
 
103
│      │      │      │             │           │     ││ Bit │     Meaning      ││       │
 
104
│      │      │      │             │           │     ││Value│                  ││       │
 
105
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
 
106
│      │      │      │             │           │     ││1    │RAID Bitmap is    ││       │
 
107
│      │      │      │             │           │     ││     │used              ││       │
 
108
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
 
109
│      │      │      │             │Feature Map│     ││     │RAID Recovery is  ││       │
 
110
│      │      │      │             │- which    │     ││2    │in progress       ││       │
 
111
│      │      │      │             │extended   │     ││     │(See              ││       │
 
112
│      │      │      │             │features   │     ││     │"recovery_offset")││       │
 
113
│      │      │      │             │(such as   │     │├─────┼──────────────────┤│       │
 
114
│0x08 -│      │      │             │volume     │     ││4    │RAID Reshape is in││       │
 
115
│0x0B  │8 - 11│4     │feature_map  │bitmaps,   │__u32││     │progress          ││       │
 
116
│      │      │      │             │recovery,  │     │├─────┼──────────────────┤│       │
 
117
│      │      │      │             │or reshape)│     ││8    │undefined/reserved││       │
 
118
│      │      │      │             │are in use │     ││     │(0)               ││       │
 
119
│      │      │      │             │on this    │     │├─────┼──────────────────┤│       │
 
120
│      │      │      │             │array      │     ││16   │undefined/reserved││       │
 
121
│      │      │      │             │           │     ││     │(0)               ││       │
 
122
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
 
123
│      │      │      │             │           │     ││32   │undefined/reserved││       │
 
124
│      │      │      │             │           │     ││     │(0)               ││       │
 
125
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
 
126
│      │      │      │             │           │     ││64   │undefined/reserved││       │
 
127
│      │      │      │             │           │     ││     │(0)               ││       │
 
128
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
 
129
│      │      │      │             │           │     ││128  │undefined/reserved││       │
 
130
│      │      │      │             │           │     ││     │(0)               ││       │
 
131
│      │      │      │             │           │     │└─────┴──────────────────┘│       │
 
132
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
 
133
│      │      │      │             │           │     │                          │Always │
 
134
│0x0C -│12 -  │      │             │Padding    │     │                          │set to │
 
135
│0x0F  │15    │4     │pad0         │Block 0    │__u32│0                         │zero   │
 
136
│      │      │      │             │           │     │                          │when   │
 
137
│      │      │      │             │           │     │                          │writing│
 
138
└──────┴──────┴──────┴─────────────┴───────────┴─────┴──────────────────────────┴───────┘
 
139
 
 
140
 
 
141
[edit]
 
142
 
 
143
Section: Per-Array Identification & Configuration area
 
144
 
 
145
48 Bytes, Offset 16-63 (0x10 - 0x3F)
 
146
 
 
147
┌──────┬──────┬──────┬─────────────┬──────────┬─────┬────────────────┬───────────┐
 
148
│Offset│Offset│Length│             │  Usage/  │Data │                │           │
 
149
│(Hex) │(Dec) │ (in  │ Field Name  │ Meaning  │Type │   Data Value   │   Notes   │
 
150
│      │      │bytes)│             │          │     │                │           │
 
151
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
152
│0x10 -│16 -  │      │             │UUID for  │__u8 │Set by          │           │
 
153
│0x1F  │31    │16    │set_uuid     │the Array │[16] │user-space      │           │
 
154
│      │      │      │             │(?)       │     │formatting util │           │
 
155
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
156
│0x20 -│32 -  │      │             │Name for  │char │Set and used by │           │
 
157
│0x3F  │63    │32    │set_name     │the Array │[32] │user-space utils│Nt         │
 
158
│      │      │      │             │(?)       │     │                │           │
 
159
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
160
│      │      │      │             │          │     │low 40-bits are │           │
 
161
│0x40 -│64 -  │8     │ctime        │Creation  │__u64│seconds         │           │
 
162
│0x47  │71    │      │             │Time(?)   │     │high 24-bits are│           │
 
163
│      │      │      │             │          │     │uSeconds        │           │
 
164
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
165
│      │      │      │             │          │     │┌──┬───────────┐│           │
 
166
│      │      │      │             │          │     ││-4│Multi-Path ││           │
 
167
│      │      │      │             │          │     │├──┼───────────┤│           │
 
168
│      │      │      │             │          │     ││-1│Linear     ││           │
 
169
│      │      │      │             │          │     │├──┼───────────┤│           │
 
170
│      │      │      │             │          │     ││0 │RAID-0     ││           │
 
171
│      │      │      │             │          │     ││  │(Striped)  ││           │
 
172
│      │      │      │             │          │     │├──┼───────────┤│           │
 
173
│      │      │      │             │          │     ││1 │RAID-1     ││           │
 
174
│      │      │      │             │          │     ││  │(Mirrored) ││mdadm      │
 
175
│      │      │      │             │          │     │├──┼───────────┤│versions   │
 
176
│      │      │      │             │          │     ││  │RAID-4     ││(as of     │
 
177
│      │      │      │             │          │     ││  │(Striped   ││v2.6.4)    │
 
178
│0x48 -│72 -  │      │             │RAID Level│     ││4 │with       ││limit      │
 
179
│0x4B  │75    │4     │level        │of the    │__u32││  │Dedicated  ││RAID-6     │
 
180
│      │      │      │             │Array     │     ││  │Block-Level││(creation) │
 
181
│      │      │      │             │          │     ││  │Parity)    ││to 256     │
 
182
│      │      │      │             │          │     │├──┼───────────┤│disks or   │
 
183
│      │      │      │             │          │     ││  │RAID-5     ││less       │
 
184
│      │      │      │             │          │     ││  │(Striped   ││           │
 
185
│      │      │      │             │          │     ││5 │with       ││           │
 
186
│      │      │      │             │          │     ││  │Distributed││           │
 
187
│      │      │      │             │          │     ││  │Parity)    ││           │
 
188
│      │      │      │             │          │     │├──┼───────────┤│           │
 
189
│      │      │      │             │          │     ││  │RAID-6     ││           │
 
190
│      │      │      │             │          │     ││6 │(Striped   ││           │
 
191
│      │      │      │             │          │     ││  │with Dual  ││           │
 
192
│      │      │      │             │          │     ││  │Parity)    ││           │
 
193
│      │      │      │             │          │     │└──┴───────────┘│           │
 
194
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
195
│      │      │      │             │          │     │┌─┬────────────┐│           │
 
196
│      │      │      │             │          │     ││0│left        ││           │
 
197
│      │      │      │             │          │     ││ │asymmetric  ││           │
 
198
│      │      │      │             │          │     │├─┼────────────┤│Controls   │
 
199
│      │      │      │             │          │     ││1│right       ││the        │
 
200
│      │      │      │             │layout of │     ││ │asymmetric  ││relative   │
 
201
│0x4C -│76 -  │4     │layout       │array     │__u32│├─┼────────────┤│arrangement│
 
202
│0x4F  │79    │      │             │(RAID5(and│     ││ │left        ││of data and│
 
203
│      │      │      │             │6?) only) │     ││2│symmetric   ││parity     │
 
204
│      │      │      │             │          │     ││ │(default)   ││blocks on  │
 
205
│      │      │      │             │          │     │├─┼────────────┤│the disks. │
 
206
│      │      │      │             │          │     ││3│right       ││           │
 
207
│      │      │      │             │          │     ││ │symmetric   ││           │
 
208
│      │      │      │             │          │     │└─┴────────────┘│           │
 
209
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
210
│      │      │      │             │          │     │size of         │           │
 
211
│      │      │      │             │used-size │     │component       │           │
 
212
│0x50 -│80 -  │8     │size         │of        │__u64│devices         │           │
 
213
│0x57  │87    │      │             │component │     │(in # of        │           │
 
214
│      │      │      │             │devices   │     │512-byte        │           │
 
215
│      │      │      │             │          │     │sectors)        │           │
 
216
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
217
│      │      │      │             │          │     │                │default is │
 
218
│      │      │      │             │          │     │                │64K? for   │
 
219
│      │      │      │             │          │     │                │raid levels│
 
220
│      │      │      │             │          │     │                │0, 10, 4,  │
 
221
│      │      │      │             │          │     │                │5, and 6   │
 
222
│      │      │      │             │          │     │                │chunksize  │
 
223
│      │      │      │             │          │     │                │not used in│
 
224
│      │      │      │             │          │     │                │raid levels│
 
225
│      │      │      │             │          │     │chunk-size of   │1, linear, │
 
226
│      │      │      │             │chunk-size│     │the array       │and        │
 
227
│0x58 -│88 -  │4     │chunksize    │of the    │__u32│(in # of        │multi-path │
 
228
│0x5B  │91    │      │             │array     │     │512-byte        │           │
 
229
│      │      │      │             │          │     │sectors)        │Note:      │
 
230
│      │      │      │             │          │     │                │During     │
 
231
│      │      │      │             │          │     │                │creation   │
 
232
│      │      │      │             │          │     │                │this       │
 
233
│      │      │      │             │          │     │                │appears to │
 
234
│      │      │      │             │          │     │                │be created │
 
235
│      │      │      │             │          │     │                │as a       │
 
236
│      │      │      │             │          │     │                │multiple of│
 
237
│      │      │      │             │          │     │                │1024 rather│
 
238
│      │      │      │             │          │     │                │than 512.  │
 
239
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
240
│      │      │      │             │          │     │                │raid4      │
 
241
│      │      │      │             │          │     │                │requires a │
 
242
│      │      │      │             │          │     │                │minimum of │
 
243
│      │      │      │             │          │     │                │2 member   │
 
244
│      │      │      │             │          │     │                │devs       │
 
245
│      │      │      │             │          │     │                │raid5      │
 
246
│      │      │      │             │          │     │                │requires a │
 
247
│      │      │      │             │          │     │                │minimum of │
 
248
│      │      │      │             │(?)number │     │                │2 member   │
 
249
│0x5C -│92 -  │4     │raid_disks   │of disks  │__u32│#               │devs       │
 
250
│0x5F  │95    │      │             │in array  │     │                │raid6      │
 
251
│      │      │      │             │(?)       │     │                │requires a │
 
252
│      │      │      │             │          │     │                │minimum of │
 
253
│      │      │      │             │          │     │                │4 member   │
 
254
│      │      │      │             │          │     │                │devs       │
 
255
│      │      │      │             │          │     │                │raid6      │
 
256
│      │      │      │             │          │     │                │limited to │
 
257
│      │      │      │             │          │     │                │a max of   │
 
258
│      │      │      │             │          │     │                │256 member │
 
259
│      │      │      │             │          │     │                │devs       │
 
260
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
 
261
│      │      │      │             │          │     │                │This is    │
 
262
│      │      │      │             │# of      │     │                │only valid │
 
263
│      │      │      │             │sectors   │     │                │if         │
 
264
│      │      │      │             │after     │     │                │feature_map│
 
265
│      │      │      │             │superblock│     │                │[1] is set │
 
266
│      │      │      │             │that      │     │                │           │
 
267
│0x60 -│96 -  │4     │bitmap_offset│bitmap    │__u32│(signed)        │Signed     │
 
268
│0x63  │99    │      │             │starts    │     │                │value      │
 
269
│      │      │      │             │(See note │     │                │allows     │
 
270
│      │      │      │             │about     │     │                │bitmap     │
 
271
│      │      │      │             │signed    │     │                │to appear  │
 
272
│      │      │      │             │value)    │     │                │before     │
 
273
│      │      │      │             │          │     │                │superblock │
 
274
│      │      │      │             │          │     │                │on the disk│
 
275
└──────┴──────┴──────┴─────────────┴──────────┴─────┴────────────────┴───────────┘
 
276
 
 
277
 
 
278
[edit]
 
279
 
 
280
Section: RAID-Reshape In-Process Metadata Storage/Recovery area
 
281
 
 
282
64 Bytes, Offset 100-163 (0x64 - 0x7F)
 
283
(Note: Only contains valid data if feature_map bit '4' is set)
 
284
 
 
285
┌──────┬──────┬──────┬────────────────┬───────────┬─────┬─────────────┬───────┐
 
286
│Offset│Offset│Length│                │  Usage/   │Data │             │       │
 
287
│(Hex) │(Dec) │ (in  │   Field Name   │  Meaning  │Type │ Data Value  │ Notes │
 
288
│      │      │bytes)│                │           │     │             │       │
 
289
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
 
290
│      │      │      │                │the new    │     │             │       │
 
291
│0x64 -│100 - │4     │new_level       │RAID level │__u32│see level    │       │
 
292
│0x67  │103   │      │                │being      │     │field (above)│       │
 
293
│      │      │      │                │reshaped-to│     │             │       │
 
294
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
 
295
│      │      │      │                │Next       │     │current      │       │
 
296
│0x68 -│104 - │8     │reshape_position│address of │__u64│position of  │       │
 
297
│0x6F  │111   │      │                │the array  │     │the reshape  │       │
 
298
│      │      │      │                │to reshape │     │operation    │       │
 
299
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
 
300
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
 
301
│      │      │      │                │this holds │     │             │       │
 
302
│0x70 -│112 - │4     │delta_disks     │the change │__u32│change in #  │       │
 
303
│0x73  │115   │      │                │in # of    │     │of raid disks│       │
 
304
│      │      │      │                │raid disks │     │             │       │
 
305
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
 
306
│0x74 -│116 - │4     │new_layout      │new layout │__u32│see layout   │       │
 
307
│0x77  │119   │      │                │for array  │     │field (above)│       │
 
308
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
 
309
│0x78 -│120 - │4     │new_chunk       │new chunk  │__u32│see chunksize│       │
 
310
│0x7B  │123   │      │                │size       │     │field (above)│       │
 
311
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
 
312
│      │      │      │                │           │     │             │Always │
 
313
│0x7C -│124 - │      │                │Padding    │__u8 │             │set to │
 
314
│0x7F  │127   │4     │pad1            │Block #1   │[4]  │0            │zero   │
 
315
│      │      │      │                │           │     │             │when   │
 
316
│      │      │      │                │           │     │             │writing│
 
317
└──────┴──────┴──────┴────────────────┴───────────┴─────┴─────────────┴───────┘
 
318
 
 
319
 
 
320
 
 
321
[edit]
 
322
 
 
323
Section: This-Component-Device Information area
 
324
 
 
325
64 Bytes, Offset 128-191 (0x80 - 0xbf)
 
326
 
 
327
┌──────┬──────┬──────┬──────────────────┬────────────┬─────┬────────────────────┬────────────┐
 
328
│Offset│Offset│Length│                  │   Usage/   │Data │                    │            │
 
329
│(Hex) │(Dec) │ (in  │    Field Name    │  Meaning   │Type │     Data Value     │   Notes    │
 
330
│      │      │bytes)│                  │            │     │                    │            │
 
331
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
332
│0x80 -│128 - │      │                  │the sector #│     │sector # where data │            │
 
333
│0x87  │135   │8     │data_offset       │upon which  │__u64│begins              │            │
 
334
│      │      │      │                  │data starts │     │(Often 0)           │            │
 
335
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
336
│      │      │      │                  │sectors in  │     │                    │            │
 
337
│0x88 -│136 - │      │                  │the device  │     │# of sectors that   │            │
 
338
│0x8F  │143   │8     │data_size         │that are    │__u64│can be used for data│            │
 
339
│      │      │      │                  │used for    │     │                    │            │
 
340
│      │      │      │                  │data        │     │                    │            │
 
341
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
342
│      │      │      │                  │# of the    │     │                    │            │
 
343
│0x90 -│144 - │      │                  │sector upon │     │# of the sector upon│            │
 
344
│0x97  │151   │8     │super_offset      │which this  │__u64│which this          │            │
 
345
│      │      │      │                  │superblock  │     │superblock starts   │            │
 
346
│      │      │      │                  │starts      │     │                    │            │
 
347
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
348
│      │      │      │                  │sectors     │     │                    │            │
 
349
│      │      │      │                  │before this │     │                    │            │
 
350
│0x98 -│152 - │      │                  │offset      │     │                    │            │
 
351
│0x9F  │159   │8     │recovery_offset   │(from       │__u64│sector #            │            │
 
352
│      │      │      │                  │data_offset)│     │                    │            │
 
353
│      │      │      │                  │have been   │     │                    │            │
 
354
│      │      │      │                  │recovered   │     │                    │            │
 
355
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
356
│0xA0 -│160 - │      │                  │            │     │Permanent identifier│            │
 
357
│0xA3  │163   │4     │dev_number        │Fm          │__u32│of this device (Not │            │
 
358
│      │      │      │                  │            │     │its role in RAID(?))│            │
 
359
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
360
│      │      │      │                  │Number of   │     │                    │            │
 
361
│0xA4 -│164 - │      │                  │read-errors │     │                    │            │
 
362
│0xA7  │167   │4     │cnt_corrected_read│that were   │__u32│Dv                  │            │
 
363
│      │      │      │                  │corrected by│     │                    │            │
 
364
│      │      │      │                  │re-writing  │     │                    │            │
 
365
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
366
│      │      │      │                  │UUID of the │     │                    │Set by      │
 
367
│0xA8 -│168 - │16    │device_uuid       │component   │__u8 │                    │User-Space  │
 
368
│0xB7  │183   │      │                  │device      │[16] │                    │Ignored by  │
 
369
│      │      │      │                  │            │     │                    │kernel      │
 
370
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
371
│      │      │      │                  │            │     │Bit-Mapped Field    │            │
 
372
│      │      │      │                  │            │     │                    │            │
 
373
│      │      │      │                  │            │     │┌─────┬────────────┐│            │
 
374
│      │      │      │                  │            │     ││ Bit │  Meaning   ││            │
 
375
│      │      │      │                  │            │     ││Value│            ││WriteMostly1│
 
376
│      │      │      │                  │            │     │├─────┼────────────┤│indicates   │
 
377
│      │      │      │                  │            │     ││1    │WriteMostly1││that this   │
 
378
│      │      │      │                  │            │     │├─────┼────────────┤│device      │
 
379
│      │      │      │                  │            │     ││2    │(?)         ││should only │
 
380
│      │      │      │                  │Per-Device  │     │├─────┼────────────┤│be updated  │
 
381
│0xB8  │184   │1     │devflags          │Flags       │__u8 ││4    │(?)         ││on writes,  │
 
382
│      │      │      │                  │(Bit-Mapped │     │├─────┼────────────┤│not read    │
 
383
│      │      │      │                  │Field)      │     ││8    │(?)         ││from.       │
 
384
│      │      │      │                  │            │     │├─────┼────────────┤│(Useful with│
 
385
│      │      │      │                  │            │     ││16   │(?)         ││slow devices│
 
386
│      │      │      │                  │            │     │├─────┼────────────┤│in RAID1    │
 
387
│      │      │      │                  │            │     ││32   │(?)         ││arrays?)    │
 
388
│      │      │      │                  │            │     │├─────┼────────────┤│            │
 
389
│      │      │      │                  │            │     ││64   │(?)         ││            │
 
390
│      │      │      │                  │            │     │├─────┼────────────┤│            │
 
391
│      │      │      │                  │            │     ││128  │(?)         ││            │
 
392
│      │      │      │                  │            │     │└─────┴────────────┘│            │
 
393
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
 
394
│      │      │      │                  │            │     │                    │Always set  │
 
395
│0xB9 -│185 - │7     │pad2              │Padding     │__u8 │0                   │to          │
 
396
│0xBF  │191   │      │                  │block 2     │[7]  │                    │zero when   │
 
397
│      │      │      │                  │            │     │                    │writing     │
 
398
└──────┴──────┴──────┴──────────────────┴────────────┴─────┴────────────────────┴────────────┘
 
399
 
 
400
 
 
401
[edit]
 
402
 
 
403
Section: Array-State Information area
 
404
 
 
405
64 Bytes, Offset 192-255 (0xC0 - 0xFF)
 
406
 
 
407
┌──────┬──────┬──────┬─────────────┬─────────────┬─────┬────────┬─────────────┐
 
408
│Offset│Offset│Length│             │             │Data │  Data  │             │
 
409
│(Hex) │(Dec) │ (in  │ Field Name  │Usage/Meaning│Type │ Value  │    Notes    │
 
410
│      │      │bytes)│             │             │     │        │             │
 
411
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
 
412
│      │      │      │             │             │     │low     │             │
 
413
│      │      │      │             │             │     │40-bits │             │
 
414
│      │      │      │             │             │     │are     │             │
 
415
│0xC0 -│192 - │8     │utime        │Fm           │__u64│seconds │Nt           │
 
416
│0xC7  │199   │      │             │             │     │high    │             │
 
417
│      │      │      │             │             │     │24-bits │             │
 
418
│      │      │      │             │             │     │are     │             │
 
419
│      │      │      │             │             │     │uSeconds│             │
 
420
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
 
421
│      │      │      │             │             │     │        │Updated      │
 
422
│      │      │      │             │             │     │        │whenever the │
 
423
│      │      │      │             │             │     │        │superblock is│
 
424
│      │      │      │             │             │     │        │updated.     │
 
425
│      │      │      │             │             │     │        │Used by mdadm│
 
426
│0xC8 -│200 - │8     │events       │Event Count  │__u64│#       │in           │
 
427
│0xCF  │207   │      │             │for the Array│     │        │re-assembly  │
 
428
│      │      │      │             │             │     │        │to detect    │
 
429
│      │      │      │             │             │     │        │failed/      │
 
430
│      │      │      │             │             │     │        │out-of-sync  │
 
431
│      │      │      │             │             │     │        │component    │
 
432
│      │      │      │             │             │     │        │devices.     │
 
433
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
 
434
│      │      │      │             │Offsets      │     │        │             │
 
435
│      │      │      │             │before this  │     │        │             │
 
436
│      │      │      │             │one (starting│     │        │             │
 
437
│0xD0 -│208 - │8     │resync_offset│from         │__u64│offset #│             │
 
438
│0xD7  │215   │      │             │data_offset) │     │        │             │
 
439
│      │      │      │             │are 'known'  │     │        │             │
 
440
│      │      │      │             │to be in     │     │        │             │
 
441
│      │      │      │             │sync.        │     │        │             │
 
442
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
 
443
│      │      │      │             │             │     │        │This value   │
 
444
│      │      │      │             │Checksum of  │     │        │will be      │
 
445
│0xD8 -│216 - │      │             │this         │     │        │different for│
 
446
│0xDB  │219   │4     │sb_csum      │superblock up│__u32│#       │each         │
 
447
│      │      │      │             │to devs      │     │        │component    │
 
448
│      │      │      │             │[max_dev]    │     │        │device's     │
 
449
│      │      │      │             │             │     │        │superblock.  │
 
450
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
 
451
│      │      │      │             │How many     │     │        │             │
 
452
│0xDC -│220 - │      │             │devices are  │     │        │             │
 
453
│0xDF  │223   │4     │max_dev      │part of (or  │__u32│#       │             │
 
454
│      │      │      │             │related to)  │     │        │             │
 
455
│      │      │      │             │the array    │     │        │             │
 
456
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
 
457
│0xE0 -│224 - │      │             │Padding Block│__u8 │        │Always set to│
 
458
│0xFF  │255   │32    │pad3         │3            │[32] │0       │zero when    │
 
459
│      │      │      │             │             │     │        │writing      │
 
460
└──────┴──────┴──────┴─────────────┴─────────────┴─────┴────────┴─────────────┘
 
461
 
 
462
 
 
463
[edit]
 
464
 
 
465
Section: Device-Roles (Positions-in-Array) area
 
466
 
 
467
Length: Variable number of bytes (but at least 768 bytes?)
 
468
2 Bytes per device in the array, including both spare-devices and
 
469
faulty-devices
 
470
 
 
471
┌──────────────────────────────────────────────────────────────────────────────┐
 
472
│               Section: Device-Roles (Positions-in-Array) area                │
 
473
├──────────────────────────────────────────────────────────────────────────────┤
 
474
│(Variable length - 2 Bytes per Device in Array (including Spares/Faulty-Devs) │
 
475
├──────────────────────────────────────────────────────────────────────────────┤
 
476
│                                                                              │
 
477
├────────┬───────┬──────┬─────────┬────────┬─────┬───────────────────────┬─────┤
 
478
│ Offset │Offset │Length│  Field  │ Usage/ │Data │                       │     │
 
479
│ (Hex)  │ (Dec) │ (in  │  Name   │Meaning │Type │      Data Value       │Notes│
 
480
│        │       │bytes)│         │        │     │                       │     │
 
481
├────────┴───────┴──────┴─────────┴────────┴─────┴───────────────────────┴─────┤
 
482
│                   ?? Bytes, Offset 256-??? (0x100 - 0x???)                   │
 
483
├────────┬───────┬──────┬─────────┬────────┬─────┬───────────────────────┬─────┤
 
484
│        │       │      │         │        │     │Role or Position of    │     │
 
485
│0x100 - │256    │?     │dev_roles│Fm      │__u16│device in the array.   │     │
 
486
│0x???   │- ???  │      │         │        │     │0xFFFF means "spare".  │     │
 
487
│        │       │      │         │        │     │0xFFFE means "faulty". │     │
 
488
└────────┴───────┴──────┴─────────┴────────┴─────┴───────────────────────┴─────┘
 
489
Retrieved from "http://linux-raid.osdl.org/index.php/RAID_superblock_formats"
 
490
 
 
491
Views
 
492
 
 
493
  • Article
 
494
  • Discussion
 
495
  • Edit
 
496
  • History
 
497
 
 
498
Personal tools
 
499
 
 
500
  • Log in / create account
 
501
 
 
502
 
 
503
 
 
504
Navigation
 
505
 
 
506
  • Linux Raid
 
507
  • Community portal
 
508
  • Current events
 
509
  • Recent changes
 
510
  • Random page
 
511
  • Help
 
512
  • Donations
 
513
 
 
514
Search
 
515
 
 
516
[                    ] [Go]  [Search]
 
517
Toolbox
 
518
 
 
519
  • What links here
 
520
  • Related changes
 
521
  • Special pages
 
522
  • Printable version
 
523
  • Permanent link
 
524
 
 
525
MediaWiki
 
526
GNU Free Documentation License 1.2
 
527
 
 
528
  • This page was last modified 04:50, 3 June 2008.
 
529
  • This page has been accessed 5,723 times.
 
530
  • Content is available under GNU Free Documentation License 1.2.
 
531
  • Privacy policy
 
532
  • About Linux-raid
 
533
  • Disclaimers
 
534