summaryrefslogtreecommitdiff
path: root/md_superblock_formats.txt
blob: f9c3eb81d211c38208597f0be84dd5f4f6317b83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
# From: http://linux-raid.osdl.org/index.php/RAID_superblock_formats

RAID superblock formats

From Linux-raid

Jump to: navigation, search

Contents

  • 1 RAID superblock formats
      □ 1.1 The version-0.90 Superblock Format
      □ 1.2 The version-1 Superblock Format
      □ 1.3 Sub-versions of the version-1 superblock
      □ 1.4 The version-1 superblock format on-disk layout
          ☆ 1.4.1 Total Size of superblock
          ☆ 1.4.2 Section: Superblock/"Magic-Number" Identification area
          ☆ 1.4.3 Section: Per-Array Identification & Configuration area
          ☆ 1.4.4 Section: RAID-Reshape In-Process Metadata Storage/Recovery
            area
          ☆ 1.4.5 Section: This-Component-Device Information area
          ☆ 1.4.6 Section: Array-State Information area
          ☆ 1.4.7 Section: Device-Roles (Positions-in-Array) area

[edit]

RAID superblock formats

Currently, the Linux RAID subsystem recognizes two distinct variant
superblocks.

They are known as "version-0.90" and "version-1" Superblock formats.

[edit]

The version-0.90 Superblock Format

The version-0.90 superblock format has several limitations. It limits the
number of component devices within an array to 28, and limits each component
device to a maximum size of 2TB.

[edit]

The version-1 Superblock Format

The version-1 superblock format represents a more-expandable format, capable of
supporting arrays with 384+ devices, with 64-bit sector lengths.

[edit]

Sub-versions of the version-1 superblock

The "version-1" superblock format is currently used in three different
"sub-versions".

The sub-versions differ primarily (solely?) in the location on each component
device at which they actually store the superblock.

┌───────────┬───────────────────────────────────┐
│Sub-Version│   Superblock Position on Device   │
├───────────┼───────────────────────────────────┤
│1.0        │At the end of the device           │
├───────────┼───────────────────────────────────┤
│1.1        │At the beginning of the device     │
├───────────┼───────────────────────────────────┤
│1.2        │4K from the beginning of the device│
└───────────┴───────────────────────────────────┘
[edit]

The version-1 superblock format on-disk layout

[edit]

Total Size of superblock

Total Size of superblock: 256 Bytes, plus 2 bytes per device in the array

[edit]

Section: Superblock/"Magic-Number" Identification area

16 Bytes, Offset 0-15 (0x00 - 0x0F)

┌──────┬──────┬──────┬─────────────┬───────────┬─────┬──────────────────────────┬───────┐
│Offset│Offset│Length│             │  Usage/   │Data │                          │       │
│(Hex) │(Dec) │ (in  │ Field Name  │  Meaning  │Type │        Data Value        │ Notes │
│      │      │bytes)│             │           │     │                          │       │
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
│      │      │      │             │"Magic     │     │                          │       │
│0x00 -│0 - 3 │4     │magic        │Number"    │__u32│0xa92b4efc                │       │
│0x03  │      │      │             │(Superblock│     │(little-endian)           │       │
│      │      │      │             │ID)        │     │                          │       │
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
│      │      │      │             │Major      │     │                          │       │
│0x04 -│4 - 7 │4     │major_version│Version    │__u32│1                         │       │
│0x07  │      │      │             │of the     │     │                          │       │
│      │      │      │             │Superblock │     │                          │       │
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
│      │      │      │             │           │     │0                         │       │
│      │      │      │             │           │     │Bit-Mapped Field          │       │
│      │      │      │             │           │     │                          │       │
│      │      │      │             │           │     │┌─────┬──────────────────┐│       │
│      │      │      │             │           │     ││ Bit │     Meaning      ││       │
│      │      │      │             │           │     ││Value│                  ││       │
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
│      │      │      │             │           │     ││1    │RAID Bitmap is    ││       │
│      │      │      │             │           │     ││     │used              ││       │
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
│      │      │      │             │Feature Map│     ││     │RAID Recovery is  ││       │
│      │      │      │             │- which    │     ││2    │in progress       ││       │
│      │      │      │             │extended   │     ││     │(See              ││       │
│      │      │      │             │features   │     ││     │"recovery_offset")││       │
│      │      │      │             │(such as   │     │├─────┼──────────────────┤│       │
│0x08 -│      │      │             │volume     │     ││4    │RAID Reshape is in││       │
│0x0B  │8 - 11│4     │feature_map  │bitmaps,   │__u32││     │progress          ││       │
│      │      │      │             │recovery,  │     │├─────┼──────────────────┤│       │
│      │      │      │             │or reshape)│     ││8    │undefined/reserved││       │
│      │      │      │             │are in use │     ││     │(0)               ││       │
│      │      │      │             │on this    │     │├─────┼──────────────────┤│       │
│      │      │      │             │array      │     ││16   │undefined/reserved││       │
│      │      │      │             │           │     ││     │(0)               ││       │
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
│      │      │      │             │           │     ││32   │undefined/reserved││       │
│      │      │      │             │           │     ││     │(0)               ││       │
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
│      │      │      │             │           │     ││64   │undefined/reserved││       │
│      │      │      │             │           │     ││     │(0)               ││       │
│      │      │      │             │           │     │├─────┼──────────────────┤│       │
│      │      │      │             │           │     ││128  │undefined/reserved││       │
│      │      │      │             │           │     ││     │(0)               ││       │
│      │      │      │             │           │     │└─────┴──────────────────┘│       │
├──────┼──────┼──────┼─────────────┼───────────┼─────┼──────────────────────────┼───────┤
│      │      │      │             │           │     │                          │Always │
│0x0C -│12 -  │      │             │Padding    │     │                          │set to │
│0x0F  │15    │4     │pad0         │Block 0    │__u32│0                         │zero   │
│      │      │      │             │           │     │                          │when   │
│      │      │      │             │           │     │                          │writing│
└──────┴──────┴──────┴─────────────┴───────────┴─────┴──────────────────────────┴───────┘


[edit]

Section: Per-Array Identification & Configuration area

48 Bytes, Offset 16-63 (0x10 - 0x3F)

┌──────┬──────┬──────┬─────────────┬──────────┬─────┬────────────────┬───────────┐
│Offset│Offset│Length│             │  Usage/  │Data │                │           │
│(Hex) │(Dec) │ (in  │ Field Name  │ Meaning  │Type │   Data Value   │   Notes   │
│      │      │bytes)│             │          │     │                │           │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│0x10 -│16 -  │      │             │UUID for  │__u8 │Set by          │           │
│0x1F  │31    │16    │set_uuid     │the Array │[16] │user-space      │           │
│      │      │      │             │(?)       │     │formatting util │           │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│0x20 -│32 -  │      │             │Name for  │char │Set and used by │           │
│0x3F  │63    │32    │set_name     │the Array │[32] │user-space utils│Nt         │
│      │      │      │             │(?)       │     │                │           │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│      │      │      │             │          │     │low 40-bits are │           │
│0x40 -│64 -  │8     │ctime        │Creation  │__u64│seconds         │           │
│0x47  │71    │      │             │Time(?)   │     │high 24-bits are│           │
│      │      │      │             │          │     │uSeconds        │           │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│      │      │      │             │          │     │┌──┬───────────┐│           │
│      │      │      │             │          │     ││-4│Multi-Path ││           │
│      │      │      │             │          │     │├──┼───────────┤│           │
│      │      │      │             │          │     ││-1│Linear     ││           │
│      │      │      │             │          │     │├──┼───────────┤│           │
│      │      │      │             │          │     ││0 │RAID-0     ││           │
│      │      │      │             │          │     ││  │(Striped)  ││           │
│      │      │      │             │          │     │├──┼───────────┤│           │
│      │      │      │             │          │     ││1 │RAID-1     ││           │
│      │      │      │             │          │     ││  │(Mirrored) ││mdadm      │
│      │      │      │             │          │     │├──┼───────────┤│versions   │
│      │      │      │             │          │     ││  │RAID-4     ││(as of     │
│      │      │      │             │          │     ││  │(Striped   ││v2.6.4)    │
│0x48 -│72 -  │      │             │RAID Level│     ││4 │with       ││limit      │
│0x4B  │75    │4     │level        │of the    │__u32││  │Dedicated  ││RAID-6     │
│      │      │      │             │Array     │     ││  │Block-Level││(creation) │
│      │      │      │             │          │     ││  │Parity)    ││to 256     │
│      │      │      │             │          │     │├──┼───────────┤│disks or   │
│      │      │      │             │          │     ││  │RAID-5     ││less       │
│      │      │      │             │          │     ││  │(Striped   ││           │
│      │      │      │             │          │     ││5 │with       ││           │
│      │      │      │             │          │     ││  │Distributed││           │
│      │      │      │             │          │     ││  │Parity)    ││           │
│      │      │      │             │          │     │├──┼───────────┤│           │
│      │      │      │             │          │     ││  │RAID-6     ││           │
│      │      │      │             │          │     ││6 │(Striped   ││           │
│      │      │      │             │          │     ││  │with Dual  ││           │
│      │      │      │             │          │     ││  │Parity)    ││           │
│      │      │      │             │          │     │└──┴───────────┘│           │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│      │      │      │             │          │     │┌─┬────────────┐│           │
│      │      │      │             │          │     ││0│left        ││           │
│      │      │      │             │          │     ││ │asymmetric  ││           │
│      │      │      │             │          │     │├─┼────────────┤│Controls   │
│      │      │      │             │          │     ││1│right       ││the        │
│      │      │      │             │layout of │     ││ │asymmetric  ││relative   │
│0x4C -│76 -  │4     │layout       │array     │__u32│├─┼────────────┤│arrangement│
│0x4F  │79    │      │             │(RAID5(and│     ││ │left        ││of data and│
│      │      │      │             │6?) only) │     ││2│symmetric   ││parity     │
│      │      │      │             │          │     ││ │(default)   ││blocks on  │
│      │      │      │             │          │     │├─┼────────────┤│the disks. │
│      │      │      │             │          │     ││3│right       ││           │
│      │      │      │             │          │     ││ │symmetric   ││           │
│      │      │      │             │          │     │└─┴────────────┘│           │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│      │      │      │             │          │     │size of         │           │
│      │      │      │             │used-size │     │component       │           │
│0x50 -│80 -  │8     │size         │of        │__u64│devices         │           │
│0x57  │87    │      │             │component │     │(in # of        │           │
│      │      │      │             │devices   │     │512-byte        │           │
│      │      │      │             │          │     │sectors)        │           │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│      │      │      │             │          │     │                │default is │
│      │      │      │             │          │     │                │64K? for   │
│      │      │      │             │          │     │                │raid levels│
│      │      │      │             │          │     │                │0, 10, 4,  │
│      │      │      │             │          │     │                │5, and 6   │
│      │      │      │             │          │     │                │chunksize  │
│      │      │      │             │          │     │                │not used in│
│      │      │      │             │          │     │                │raid levels│
│      │      │      │             │          │     │chunk-size of   │1, linear, │
│      │      │      │             │chunk-size│     │the array       │and        │
│0x58 -│88 -  │4     │chunksize    │of the    │__u32│(in # of        │multi-path │
│0x5B  │91    │      │             │array     │     │512-byte        │           │
│      │      │      │             │          │     │sectors)        │Note:      │
│      │      │      │             │          │     │                │During     │
│      │      │      │             │          │     │                │creation   │
│      │      │      │             │          │     │                │this       │
│      │      │      │             │          │     │                │appears to │
│      │      │      │             │          │     │                │be created │
│      │      │      │             │          │     │                │as a       │
│      │      │      │             │          │     │                │multiple of│
│      │      │      │             │          │     │                │1024 rather│
│      │      │      │             │          │     │                │than 512.  │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│      │      │      │             │          │     │                │raid4      │
│      │      │      │             │          │     │                │requires a │
│      │      │      │             │          │     │                │minimum of │
│      │      │      │             │          │     │                │2 member   │
│      │      │      │             │          │     │                │devs       │
│      │      │      │             │          │     │                │raid5      │
│      │      │      │             │          │     │                │requires a │
│      │      │      │             │          │     │                │minimum of │
│      │      │      │             │(?)number │     │                │2 member   │
│0x5C -│92 -  │4     │raid_disks   │of disks  │__u32│#               │devs       │
│0x5F  │95    │      │             │in array  │     │                │raid6      │
│      │      │      │             │(?)       │     │                │requires a │
│      │      │      │             │          │     │                │minimum of │
│      │      │      │             │          │     │                │4 member   │
│      │      │      │             │          │     │                │devs       │
│      │      │      │             │          │     │                │raid6      │
│      │      │      │             │          │     │                │limited to │
│      │      │      │             │          │     │                │a max of   │
│      │      │      │             │          │     │                │256 member │
│      │      │      │             │          │     │                │devs       │
├──────┼──────┼──────┼─────────────┼──────────┼─────┼────────────────┼───────────┤
│      │      │      │             │          │     │                │This is    │
│      │      │      │             │# of      │     │                │only valid │
│      │      │      │             │sectors   │     │                │if         │
│      │      │      │             │after     │     │                │feature_map│
│      │      │      │             │superblock│     │                │[1] is set │
│      │      │      │             │that      │     │                │           │
│0x60 -│96 -  │4     │bitmap_offset│bitmap    │__u32│(signed)        │Signed     │
│0x63  │99    │      │             │starts    │     │                │value      │
│      │      │      │             │(See note │     │                │allows     │
│      │      │      │             │about     │     │                │bitmap     │
│      │      │      │             │signed    │     │                │to appear  │
│      │      │      │             │value)    │     │                │before     │
│      │      │      │             │          │     │                │superblock │
│      │      │      │             │          │     │                │on the disk│
└──────┴──────┴──────┴─────────────┴──────────┴─────┴────────────────┴───────────┘


[edit]

Section: RAID-Reshape In-Process Metadata Storage/Recovery area

64 Bytes, Offset 100-163 (0x64 - 0x7F)
(Note: Only contains valid data if feature_map bit '4' is set)

┌──────┬──────┬──────┬────────────────┬───────────┬─────┬─────────────┬───────┐
│Offset│Offset│Length│                │  Usage/   │Data │             │       │
│(Hex) │(Dec) │ (in  │   Field Name   │  Meaning  │Type │ Data Value  │ Notes │
│      │      │bytes)│                │           │     │             │       │
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
│      │      │      │                │the new    │     │             │       │
│0x64 -│100 - │4     │new_level       │RAID level │__u32│see level    │       │
│0x67  │103   │      │                │being      │     │field (above)│       │
│      │      │      │                │reshaped-to│     │             │       │
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
│      │      │      │                │Next       │     │current      │       │
│0x68 -│104 - │8     │reshape_position│address of │__u64│position of  │       │
│0x6F  │111   │      │                │the array  │     │the reshape  │       │
│      │      │      │                │to reshape │     │operation    │       │
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
│      │      │      │                │this holds │     │             │       │
│0x70 -│112 - │4     │delta_disks     │the change │__u32│change in #  │       │
│0x73  │115   │      │                │in # of    │     │of raid disks│       │
│      │      │      │                │raid disks │     │             │       │
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
│0x74 -│116 - │4     │new_layout      │new layout │__u32│see layout   │       │
│0x77  │119   │      │                │for array  │     │field (above)│       │
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
│0x78 -│120 - │4     │new_chunk       │new chunk  │__u32│see chunksize│       │
│0x7B  │123   │      │                │size       │     │field (above)│       │
├──────┼──────┼──────┼────────────────┼───────────┼─────┼─────────────┼───────┤
│      │      │      │                │           │     │             │Always │
│0x7C -│124 - │      │                │Padding    │__u8 │             │set to │
│0x7F  │127   │4     │pad1            │Block #1   │[4]  │0            │zero   │
│      │      │      │                │           │     │             │when   │
│      │      │      │                │           │     │             │writing│
└──────┴──────┴──────┴────────────────┴───────────┴─────┴─────────────┴───────┘



[edit]

Section: This-Component-Device Information area

64 Bytes, Offset 128-191 (0x80 - 0xbf)

┌──────┬──────┬──────┬──────────────────┬────────────┬─────┬────────────────────┬────────────┐
│Offset│Offset│Length│                  │   Usage/   │Data │                    │            │
│(Hex) │(Dec) │ (in  │    Field Name    │  Meaning   │Type │     Data Value     │   Notes    │
│      │      │bytes)│                  │            │     │                    │            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│0x80 -│128 - │      │                  │the sector #│     │sector # where data │            │
│0x87  │135   │8     │data_offset       │upon which  │__u64│begins              │            │
│      │      │      │                  │data starts │     │(Often 0)           │            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│      │      │      │                  │sectors in  │     │                    │            │
│0x88 -│136 - │      │                  │the device  │     │# of sectors that   │            │
│0x8F  │143   │8     │data_size         │that are    │__u64│can be used for data│            │
│      │      │      │                  │used for    │     │                    │            │
│      │      │      │                  │data        │     │                    │            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│      │      │      │                  │# of the    │     │                    │            │
│0x90 -│144 - │      │                  │sector upon │     │# of the sector upon│            │
│0x97  │151   │8     │super_offset      │which this  │__u64│which this          │            │
│      │      │      │                  │superblock  │     │superblock starts   │            │
│      │      │      │                  │starts      │     │                    │            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│      │      │      │                  │sectors     │     │                    │            │
│      │      │      │                  │before this │     │                    │            │
│0x98 -│152 - │      │                  │offset      │     │                    │            │
│0x9F  │159   │8     │recovery_offset   │(from       │__u64│sector #            │            │
│      │      │      │                  │data_offset)│     │                    │            │
│      │      │      │                  │have been   │     │                    │            │
│      │      │      │                  │recovered   │     │                    │            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│0xA0 -│160 - │      │                  │            │     │Permanent identifier│            │
│0xA3  │163   │4     │dev_number        │Fm          │__u32│of this device (Not │            │
│      │      │      │                  │            │     │its role in RAID(?))│            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│      │      │      │                  │Number of   │     │                    │            │
│0xA4 -│164 - │      │                  │read-errors │     │                    │            │
│0xA7  │167   │4     │cnt_corrected_read│that were   │__u32│Dv                  │            │
│      │      │      │                  │corrected by│     │                    │            │
│      │      │      │                  │re-writing  │     │                    │            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│      │      │      │                  │UUID of the │     │                    │Set by      │
│0xA8 -│168 - │16    │device_uuid       │component   │__u8 │                    │User-Space  │
│0xB7  │183   │      │                  │device      │[16] │                    │Ignored by  │
│      │      │      │                  │            │     │                    │kernel      │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│      │      │      │                  │            │     │Bit-Mapped Field    │            │
│      │      │      │                  │            │     │                    │            │
│      │      │      │                  │            │     │┌─────┬────────────┐│            │
│      │      │      │                  │            │     ││ Bit │  Meaning   ││            │
│      │      │      │                  │            │     ││Value│            ││WriteMostly1│
│      │      │      │                  │            │     │├─────┼────────────┤│indicates   │
│      │      │      │                  │            │     ││1    │WriteMostly1││that this   │
│      │      │      │                  │            │     │├─────┼────────────┤│device      │
│      │      │      │                  │            │     ││2    │(?)         ││should only │
│      │      │      │                  │Per-Device  │     │├─────┼────────────┤│be updated  │
│0xB8  │184   │1     │devflags          │Flags       │__u8 ││4    │(?)         ││on writes,  │
│      │      │      │                  │(Bit-Mapped │     │├─────┼────────────┤│not read    │
│      │      │      │                  │Field)      │     ││8    │(?)         ││from.       │
│      │      │      │                  │            │     │├─────┼────────────┤│(Useful with│
│      │      │      │                  │            │     ││16   │(?)         ││slow devices│
│      │      │      │                  │            │     │├─────┼────────────┤│in RAID1    │
│      │      │      │                  │            │     ││32   │(?)         ││arrays?)    │
│      │      │      │                  │            │     │├─────┼────────────┤│            │
│      │      │      │                  │            │     ││64   │(?)         ││            │
│      │      │      │                  │            │     │├─────┼────────────┤│            │
│      │      │      │                  │            │     ││128  │(?)         ││            │
│      │      │      │                  │            │     │└─────┴────────────┘│            │
├──────┼──────┼──────┼──────────────────┼────────────┼─────┼────────────────────┼────────────┤
│      │      │      │                  │            │     │                    │Always set  │
│0xB9 -│185 - │7     │pad2              │Padding     │__u8 │0                   │to          │
│0xBF  │191   │      │                  │block 2     │[7]  │                    │zero when   │
│      │      │      │                  │            │     │                    │writing     │
└──────┴──────┴──────┴──────────────────┴────────────┴─────┴────────────────────┴────────────┘


[edit]

Section: Array-State Information area

64 Bytes, Offset 192-255 (0xC0 - 0xFF)

┌──────┬──────┬──────┬─────────────┬─────────────┬─────┬────────┬─────────────┐
│Offset│Offset│Length│             │             │Data │  Data  │             │
│(Hex) │(Dec) │ (in  │ Field Name  │Usage/Meaning│Type │ Value  │    Notes    │
│      │      │bytes)│             │             │     │        │             │
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
│      │      │      │             │             │     │low     │             │
│      │      │      │             │             │     │40-bits │             │
│      │      │      │             │             │     │are     │             │
│0xC0 -│192 - │8     │utime        │Fm           │__u64│seconds │Nt           │
│0xC7  │199   │      │             │             │     │high    │             │
│      │      │      │             │             │     │24-bits │             │
│      │      │      │             │             │     │are     │             │
│      │      │      │             │             │     │uSeconds│             │
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
│      │      │      │             │             │     │        │Updated      │
│      │      │      │             │             │     │        │whenever the │
│      │      │      │             │             │     │        │superblock is│
│      │      │      │             │             │     │        │updated.     │
│      │      │      │             │             │     │        │Used by mdadm│
│0xC8 -│200 - │8     │events       │Event Count  │__u64│#       │in           │
│0xCF  │207   │      │             │for the Array│     │        │re-assembly  │
│      │      │      │             │             │     │        │to detect    │
│      │      │      │             │             │     │        │failed/      │
│      │      │      │             │             │     │        │out-of-sync  │
│      │      │      │             │             │     │        │component    │
│      │      │      │             │             │     │        │devices.     │
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
│      │      │      │             │Offsets      │     │        │             │
│      │      │      │             │before this  │     │        │             │
│      │      │      │             │one (starting│     │        │             │
│0xD0 -│208 - │8     │resync_offset│from         │__u64│offset #│             │
│0xD7  │215   │      │             │data_offset) │     │        │             │
│      │      │      │             │are 'known'  │     │        │             │
│      │      │      │             │to be in     │     │        │             │
│      │      │      │             │sync.        │     │        │             │
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
│      │      │      │             │             │     │        │This value   │
│      │      │      │             │Checksum of  │     │        │will be      │
│0xD8 -│216 - │      │             │this         │     │        │different for│
│0xDB  │219   │4     │sb_csum      │superblock up│__u32│#       │each         │
│      │      │      │             │to devs      │     │        │component    │
│      │      │      │             │[max_dev]    │     │        │device's     │
│      │      │      │             │             │     │        │superblock.  │
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
│      │      │      │             │How many     │     │        │             │
│0xDC -│220 - │      │             │devices are  │     │        │             │
│0xDF  │223   │4     │max_dev      │part of (or  │__u32│#       │             │
│      │      │      │             │related to)  │     │        │             │
│      │      │      │             │the array    │     │        │             │
├──────┼──────┼──────┼─────────────┼─────────────┼─────┼────────┼─────────────┤
│0xE0 -│224 - │      │             │Padding Block│__u8 │        │Always set to│
│0xFF  │255   │32    │pad3         │3            │[32] │0       │zero when    │
│      │      │      │             │             │     │        │writing      │
└──────┴──────┴──────┴─────────────┴─────────────┴─────┴────────┴─────────────┘


[edit]

Section: Device-Roles (Positions-in-Array) area

Length: Variable number of bytes (but at least 768 bytes?)
2 Bytes per device in the array, including both spare-devices and
faulty-devices

┌──────────────────────────────────────────────────────────────────────────────┐
│               Section: Device-Roles (Positions-in-Array) area                │
├──────────────────────────────────────────────────────────────────────────────┤
│(Variable length - 2 Bytes per Device in Array (including Spares/Faulty-Devs) │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
├────────┬───────┬──────┬─────────┬────────┬─────┬───────────────────────┬─────┤
│ Offset │Offset │Length│  Field  │ Usage/ │Data │                       │     │
│ (Hex)  │ (Dec) │ (in  │  Name   │Meaning │Type │      Data Value       │Notes│
│        │       │bytes)│         │        │     │                       │     │
├────────┴───────┴──────┴─────────┴────────┴─────┴───────────────────────┴─────┤
│                   ?? Bytes, Offset 256-??? (0x100 - 0x???)                   │
├────────┬───────┬──────┬─────────┬────────┬─────┬───────────────────────┬─────┤
│        │       │      │         │        │     │Role or Position of    │     │
│0x100 - │256    │?     │dev_roles│Fm      │__u16│device in the array.   │     │
│0x???   │- ???  │      │         │        │     │0xFFFF means "spare".  │     │
│        │       │      │         │        │     │0xFFFE means "faulty". │     │
└────────┴───────┴──────┴─────────┴────────┴─────┴───────────────────────┴─────┘
Retrieved from "http://linux-raid.osdl.org/index.php/RAID_superblock_formats"

Views

  • Article
  • Discussion
  • Edit
  • History

Personal tools

  • Log in / create account

 

Navigation

  • Linux Raid
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
  • Donations

Search

[                    ] [Go]  [Search]
Toolbox

  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link

MediaWiki
GNU Free Documentation License 1.2

  • This page was last modified 04:50, 3 June 2008.
  • This page has been accessed 5,723 times.
  • Content is available under GNU Free Documentation License 1.2.
  • Privacy policy
  • About Linux-raid
  • Disclaimers