summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/mdadm.doc-base.faq9
-rw-r--r--debian/mdadm.doc-base.md-txt11
-rw-r--r--debian/mdadm.doc-base.raid5-vs-1011
-rw-r--r--debian/mdadm.doc-base.recipes9
-rw-r--r--debian/mdadm.doc-base.superblock-formats10
-rw-r--r--debian/mdadm.docs1
-rw-r--r--md.txt185
-rw-r--r--md_superblock_formats.txt534
8 files changed, 732 insertions, 38 deletions
diff --git a/debian/mdadm.doc-base.faq b/debian/mdadm.doc-base.faq
new file mode 100644
index 00000000..3fff4504
--- /dev/null
+++ b/debian/mdadm.doc-base.faq
@@ -0,0 +1,9 @@
+Document: mdadm-faq
+Title: mdadm Debian FAQ
+Author: martin f. krafft
+Abstract: The document answers frequently asked questions about Debian's mdadm
+Section: System/Administration
+
+Format: text
+Index: /usr/share/doc/mdadm/FAQ.gz
+Files: /usr/share/doc/mdadm/FAQ.gz
diff --git a/debian/mdadm.doc-base.md-txt b/debian/mdadm.doc-base.md-txt
new file mode 100644
index 00000000..3887026b
--- /dev/null
+++ b/debian/mdadm.doc-base.md-txt
@@ -0,0 +1,11 @@
+Document: mdadm-md-txt
+Title: Linux kernel documentation on the md driver (2.6.26)
+Author: Neil Brown
+Abstract: The document comes from the Linux kernel sources' Documentation/
+ directory and contains notes and other information about the md kernel
+ driver (which mdadm uses). It is current for version 2.6.26 of the kernel.
+Section: System/Administration
+
+Format: text
+Index: /usr/share/doc/mdadm/md.txt.gz
+Files: /usr/share/doc/mdadm/md.txt.gz
diff --git a/debian/mdadm.doc-base.raid5-vs-10 b/debian/mdadm.doc-base.raid5-vs-10
new file mode 100644
index 00000000..47416e53
--- /dev/null
+++ b/debian/mdadm.doc-base.raid5-vs-10
@@ -0,0 +1,11 @@
+Document: mdadm-raid5-vs-10
+Title: Comparison of RAID5 and RAID10
+Author: Art S. Kagel
+Abstract: This document compares RAID5 and RAID10 and strongly argues against
+ RAID5. The Debian package maintainer does not agree in full but includes the
+ document to allow people to make up their own mind.
+Section: System/Administration
+
+Format: text
+Index: /usr/share/doc/mdadm/RAID5_versus_RAID10.txt.gz
+Files: /usr/share/doc/mdadm/RAID5_versus_RAID10.txt.gz
diff --git a/debian/mdadm.doc-base.recipes b/debian/mdadm.doc-base.recipes
new file mode 100644
index 00000000..d1069682
--- /dev/null
+++ b/debian/mdadm.doc-base.recipes
@@ -0,0 +1,9 @@
+Document: mdadm-readme-recipes
+Title: mdadm Debian recipes
+Author: David Pashley
+Abstract: The document contains some common recipes for mdadm usage on Debian
+Section: System/Administration
+
+Format: text
+Index: /usr/share/doc/mdadm/README.recipes.gz
+Files: /usr/share/doc/mdadm/README.recipes.gz
diff --git a/debian/mdadm.doc-base.superblock-formats b/debian/mdadm.doc-base.superblock-formats
new file mode 100644
index 00000000..81dc5105
--- /dev/null
+++ b/debian/mdadm.doc-base.superblock-formats
@@ -0,0 +1,10 @@
+Document: mdadm-superblock-formats
+Title: Description of md superblock formats
+Author: GrangerX
+Abstract: This document details the different md superblock formats and their
+ disk layouts
+Section: System/Administration
+
+Format: text
+Index: /usr/share/doc/mdadm/md_superblock_formats.txt.gz
+Files: /usr/share/doc/mdadm/md_superblock_formats.txt.gz
diff --git a/debian/mdadm.docs b/debian/mdadm.docs
index 830549ad..1adc5b77 100644
--- a/debian/mdadm.docs
+++ b/debian/mdadm.docs
@@ -8,3 +8,4 @@ md.txt
rootraiddoc.97.html
RAID5_versus_RAID10.txt
davidpashley.com_blog_2008_07_12_rebuilding-raid.html
+md_superblock_formats.txt
diff --git a/md.txt b/md.txt
index 03a13c46..9eb52fc8 100644
--- a/md.txt
+++ b/md.txt
@@ -1,3 +1,11 @@
+# linux-2.6/Documentation/md.txt
+#
+# From http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/md.txt;hb=v2.6.26
+#
+# This is md.txt for Linux kernel 2.6.26, which is current in Debian lenny.
+# The latest version of this document is at
+# http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/md.txt;hb=HEAD
+
Tools that manage md devices can be found at
http://www.<country>.kernel.org/pub/linux/utils/raid/....
@@ -62,7 +70,7 @@ be reconstructed (due to no parity).
For this reason, md will normally refuse to start such an array. This
requires the sysadmin to take action to explicitly start the array
-desipite possible corruption. This is normally done with
+despite possible corruption. This is normally done with
mdadm --assemble --force ....
This option is not really available if the array has the root
@@ -154,11 +162,12 @@ contains further md-specific information about the device.
All md devices contain:
level
- a text file indicating the 'raid level'. This may be a standard
- numerical level prefixed by "RAID-" - e.g. "RAID-5", or some
- other name such as "linear" or "multipath".
+ a text file indicating the 'raid level'. e.g. raid0, raid1,
+ raid5, linear, multipath, faulty.
If no raid level has been set yet (array is still being
- assembled), this file will be empty.
+ assembled), the value will reflect whatever has been written
+ to it, which may be a name like the above, or may be a number
+ such as '0', '5', etc.
raid_disks
a text file with a simple number indicating the number of devices
@@ -174,9 +183,24 @@ All md devices contain:
raid levels that involve striping (1,4,5,6,10). The address space
of the array is conceptually divided into chunks and consecutive
chunks are striped onto neighbouring devices.
- The size should be atleast PAGE_SIZE (4k) and should be a power
+ The size should be at least PAGE_SIZE (4k) and should be a power
of 2. This can only be set while assembling an array
+ layout
+ The "layout" for the array for the particular level. This is
+ simply a number that is interpretted differently by different
+ levels. It can be written while assembling an array.
+
+ reshape_position
+ This is either "none" or a sector number within the devices of
+ the array where "reshape" is up to. If this is set, the three
+ attributes mentioned above (raid_disks, chunk_size, layout) can
+ potentially have 2 values, an old and a new value. If these
+ values differ, reading the attribute returns
+ new (old)
+ and writing will effect the 'new' value, leaving the 'old'
+ unchanged.
+
component_size
For arrays with data redundancy (i.e. not raid0, linear, faulty,
multipath), all components must be the same size - or at least
@@ -192,13 +216,11 @@ All md devices contain:
1.2 (newer format in varying locations) or "none" indicating that
the kernel isn't managing metadata at all.
- level
- The raid 'level' for this array. The name will often (but not
- always) be the same as the name of the module that implements the
- level. To be auto-loaded the module must have an alias
- md-$LEVEL e.g. md-raid5
- This can be written only while the array is being assembled, not
- after it is started.
+ resync_start
+ The point at which resync should start. If no resync is needed,
+ this will be a very large number. At array creation it will
+ default to 0, though starting the array as 'clean' will
+ set it much larger.
new_dev
This file can be written but not read. The value written should
@@ -207,27 +229,52 @@ All md devices contain:
available. It will then appear at md/dev-XXX (depending on the
name of the device) and further configuration is then possible.
- sync_speed_min
- sync_speed_max
- This are similar to /proc/sys/dev/raid/speed_limit_{min,max}
- however they only apply to the particular array.
- If no value has been written to these, of if the word 'system'
- is written, then the system-wide value is used. If a value,
- in kibibytes-per-second is written, then it is used.
- When the files are read, they show the currently active value
- followed by "(local)" or "(system)" depending on whether it is
- a locally set or system-wide value.
-
- sync_completed
- This shows the number of sectors that have been completed of
- whatever the current sync_action is, followed by the number of
- sectors in total that could need to be processed. The two
- numbers are separated by a '/' thus effectively showing one
- value, a fraction of the process that is complete.
-
- sync_speed
- This shows the current actual speed, in K/sec, of the current
- sync_action. It is averaged over the last 30 seconds.
+ safe_mode_delay
+ When an md array has seen no write requests for a certain period
+ of time, it will be marked as 'clean'. When another write
+ request arrives, the array is marked as 'dirty' before the write
+ commences. This is known as 'safe_mode'.
+ The 'certain period' is controlled by this file which stores the
+ period as a number of seconds. The default is 200msec (0.200).
+ Writing a value of 0 disables safemode.
+
+ array_state
+ This file contains a single word which describes the current
+ state of the array. In many cases, the state can be set by
+ writing the word for the desired state, however some states
+ cannot be explicitly set, and some transitions are not allowed.
+
+ clear
+ No devices, no size, no level
+ Writing is equivalent to STOP_ARRAY ioctl
+ inactive
+ May have some settings, but array is not active
+ all IO results in error
+ When written, doesn't tear down array, but just stops it
+ suspended (not supported yet)
+ All IO requests will block. The array can be reconfigured.
+ Writing this, if accepted, will block until array is quiessent
+ readonly
+ no resync can happen. no superblocks get written.
+ write requests fail
+ read-auto
+ like readonly, but behaves like 'clean' on a write request.
+
+ clean - no pending writes, but otherwise active.
+ When written to inactive array, starts without resync
+ If a write request arrives then
+ if metadata is known, mark 'dirty' and switch to 'active'.
+ if not known, block and switch to write-pending
+ If written to an active array that has pending writes, then fails.
+ active
+ fully active: IO and resync can be happening.
+ When written to inactive array, starts with resync
+
+ write-pending
+ clean, but writes are blocked waiting for 'active' to be written.
+
+ active-idle
+ like active, but no writes have been seen for a while (safe_mode_delay).
As component devices are added to an md array, they appear in the 'md'
@@ -250,10 +297,18 @@ Each directory contains:
faulty - device has been kicked from active use due to
a detected fault
in_sync - device is a fully in-sync member of the array
+ writemostly - device will only be subject to read
+ requests if there are no other options.
+ This applies only to raid1 arrays.
spare - device is working, but not a full member.
This includes spares that are in the process
- of being recoverred to
- This list make grow in future.
+ of being recovered to
+ This list may grow in future.
+ This can be written to.
+ Writing "faulty" simulates a failure on the device.
+ Writing "remove" removes the device from the array.
+ Writing "writemostly" sets the writemostly flag.
+ Writing "-writemostly" clears the writemostly flag.
errors
An approximate count of read errors that have been detected on
@@ -270,7 +325,7 @@ Each directory contains:
This gives the role that the device has in the array. It will
either be 'none' if the device is not active in the array
(i.e. is a spare or has failed) or an integer less than the
- 'raid_disks' number for the array indicating which possition
+ 'raid_disks' number for the array indicating which position
it currently fills. This can only be set while assembling an
array. A device for which this is set is assumed to be working.
@@ -293,7 +348,7 @@ in the array. These are named
rdNN
-where 'NN' is the possition in the array, starting from 0.
+where 'NN' is the position in the array, starting from 0.
So for a 3 drive array there will be rd0, rd1, rd2.
These are symbolic links to the appropriate 'dev-XXX' entry.
Thus, for example,
@@ -343,6 +398,54 @@ also have
than sectors, this my be larger than the number of actual errors
by a factor of the number of sectors in a page.
+ bitmap_set_bits
+ If the array has a write-intent bitmap, then writing to this
+ attribute can set bits in the bitmap, indicating that a resync
+ would need to check the corresponding blocks. Either individual
+ numbers or start-end pairs can be written. Multiple numbers
+ can be separated by a space.
+ Note that the numbers are 'bit' numbers, not 'block' numbers.
+ They should be scaled by the bitmap_chunksize.
+
+ sync_speed_min
+ sync_speed_max
+ This are similar to /proc/sys/dev/raid/speed_limit_{min,max}
+ however they only apply to the particular array.
+ If no value has been written to these, of if the word 'system'
+ is written, then the system-wide value is used. If a value,
+ in kibibytes-per-second is written, then it is used.
+ When the files are read, they show the currently active value
+ followed by "(local)" or "(system)" depending on whether it is
+ a locally set or system-wide value.
+
+ sync_completed
+ This shows the number of sectors that have been completed of
+ whatever the current sync_action is, followed by the number of
+ sectors in total that could need to be processed. The two
+ numbers are separated by a '/' thus effectively showing one
+ value, a fraction of the process that is complete.
+ A 'select' on this attribute will return when resync completes,
+ when it reaches the current sync_max (below) and possibly at
+ other times.
+
+ sync_max
+ This is a number of sectors at which point a resync/recovery
+ process will pause. When a resync is active, the value can
+ only ever be increased, never decreased. The value of 'max'
+ effectively disables the limit.
+
+
+ sync_speed
+ This shows the current actual speed, in K/sec, of the current
+ sync_action. It is averaged over the last 30 seconds.
+
+ suspend_lo
+ suspend_hi
+ The two values, given as numbers of sectors, indicate a range
+ within the array where IO will be blocked. This is currently
+ only supported for raid4/5/6.
+
+
Each active md device may also have attributes specific to the
personality module that manages it.
These are specific to the implementation of the module and could
@@ -355,3 +458,9 @@ These currently include
there are upper and lower limits (32768, 16). Default is 128.
strip_cache_active (currently raid5 only)
number of active entries in the stripe cache
+ preread_bypass_threshold (currently raid5 only)
+ number of times a stripe requiring preread will be bypassed by
+ a stripe that does not require preread. For fairness defaults
+ to 1. Setting this to 0 disables bypass accounting and
+ requires preread stripes to wait until all full-width stripe-
+ writes are complete. Valid values are 0 to stripe_cache_size.
diff --git a/md_superblock_formats.txt b/md_superblock_formats.txt
new file mode 100644
index 00000000..f9c3eb81
--- /dev/null
+++ b/md_superblock_formats.txt
@@ -0,0 +1,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
+