RAID1
In some configurations it might be desired to create a raid1
configuration that does not use a superblock, and to maintain the state of
-the array elsewhere. While not encouraged for general us, it does
+the array elsewhere. While not encouraged for general use, it does
have special-purpose uses and is supported.
.SS ARRAYS WITH EXTERNAL METADATA
From release 2.6.28, the
.I md
driver supports arrays with externally managed metadata. That is,
-the metadata is not managed by the kernel by rather by a user-space
+the metadata is not managed by the kernel but rather by a user-space
program which is external to the kernel. This allows support for a
variety of metadata formats without cluttering the kernel with lots of
details.
.I md
is able to communicate with the user-space program through various
sysfs attributes so that it can make appropriate changes to the
-metadata \- for example to make a device as faulty. When necessary,
+metadata \- for example to mark a device as faulty. When necessary,
.I md
will wait for the program to acknowledge the event by writing to a
sysfs attribute.
threads to read from all disks.
Individual devices in a RAID1 can be marked as "write-mostly".
-This drives are excluded from the normal read balancing and will only
+These drives are excluded from the normal read balancing and will only
be read from when there is no other option. This can be useful for
devices connected over a slow link.
found that is a mismatch.
.I md
normally works in units much larger than a single sector and when it
-finds a mismatch, it does not determin exactly how many actual sectors were
+finds a mismatch, it does not determine exactly how many actual sectors were
affected but simply adds the number of sectors in the IO unit that was
used. So a value of 128 could simply mean that a single 64KB check
found an error (128 x 512bytes = 64KB).
In 2.6.13, intent bitmaps are only supported with RAID1. Other levels
with redundancy are supported from 2.6.15.
+.SS BAD BLOCK LOG
+
+From Linux 3.5 each device in an
+.I md
+array can store a list of known-bad-blocks. This list is 4K in size
+and usually positioned at the end of the space between the superblock
+and the data.
+
+When a block cannot be read and cannot be repaired by writing data
+recovered from other devices, the address of the block is stored in
+the bad block log. Similarly if an attempt to write a block fails,
+the address will be recorded as a bad block. If attempting to record
+the bad block fails, the whole device will be marked faulty.
+
+Attempting to read from a known bad block will cause a read error.
+Attempting to write to a known bad block will be ignored if any write
+errors have been reported by the device. If there have been no write
+errors then the data will be written to the known bad block and if
+that succeeds, the address will be removed from the list.
+
+This allows an array to fail more gracefully - a few blocks on
+different devices can be faulty without taking the whole array out of
+action.
+
+The log is particularly useful when recovering to a spare. If a few blocks
+cannot be read from the other devices, the bulk of the recovery can
+complete and those few bad blocks will be recorded in the bad block log.
+
.SS WRITE-BEHIND
From Linux 2.6.14,
This is the partner of
.B md/sync_speed_min
and overrides
-.B /proc/sys/dev/raid/spool_limit_max
+.B /proc/sys/dev/raid/speed_limit_max
described below.
.TP
.I n
gives the md device number,
.I l
-gives the level, 0 for RAID0 or -1 for LINEAR,
+gives the level, 0 for RAID0 or \-1 for LINEAR,
.I c
gives the chunk size as a base-2 logarithm offset by twelve, so 0
means 4K, 1 means 8K.
.SH SEE ALSO
.BR mdadm (8),
-.BR mkraid (8).