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
|
.\" -*- nroff -*-
.\" Copyright Piergiorgio Sartor and others.
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\" See file COPYING in distribution for details.
.TH RAID6CHECK 8 "" v1.0.0
.SH NAME
raid6check \- check MD RAID6 device for errors
.I aka
Linux Software RAID
.SH SYNOPSIS
.BI raid6check " <raid6_device> <start_stripe> <number_of_stripes>"
.RB [ autorepair ]
.BI raid6check " <raid6_device> " repair " <stripe> <failed_slot_1>"
.I "<failed_slot_2>"
.SH DESCRIPTION
RAID6 devices in which one single component drive has errors can use
the double parity in order to find out which component drive.
The "raid6check" tool has two modes: check mode and repair mode.
"raid6check" requires a non-degraded RAID6 MD device as first
parameter. If the given MD device is not a RAID6, "raid6check" will,
of course, not continue.
If the RAID6 MD device is degraded, "raid6check" will report
an error and it will not proceed further.
.SS Check mode
In the check mode, the "raid6check" tool checks, for each stripe, the
double parity consistency, reports mismatches and, if possible, which
component drive has the mismatch.
Since it works at stripe level, it can report different drives with
mismatches at different stripes.
In addition to the MD device, "raid6check" requries a starting stripe
(usually 0) and the number of stripes to be checked.
If this third parameter is also 0, it will check the array up to
the end.
If the fourth parameter is "autorepair", it will overwrite single-slot
errors.
"raid6check" will start printing information about the RAID6, then
for each stripe, it will report the parity rotation status.
In case of parity mismatches, "raid6check" reports, if possible,
which component drive could be responsible.
Otherwise it reports that it is not possible to find the component drive.
No write operations are performed on the array or the components,
unless "autorepair" is specified.
Furthermore, the checked array can be online and in use during
the operation of "raid6check".
.SS Repair mode
In the repair mode, the "raid6check" tool checks the given stripe.
If inconsistencies are found, it attempts to repair the strip assuming
that the two given slots are incorrect.
-1 may be used to specify parity P and -2 parity Q.
.SH EXAMPLES
.B " raid6check /dev/md0 0 0"
.br
This will check /dev/md0 from start to end.
.B " raid6check /dev/md3 0 1 autorepair"
.br
This will check the first stripe of /dev/md3.
Any error will be reported, and if single-slot, repaired.
.B " raid6check /dev/md3 0 repair 1 -1 -2"
.br
This will check the first stripe of /dev/md3.
If any inconsistencies are found, repair is performed assuming
the two parities are incorrect.
.B " raid6check /dev/md1 1000 0"
.br
This will check /dev/md1 from stripe 1000 up to the end.
.B " raid6check /dev/m127 128 256"
.br
This will check 256 stripes of /dev/md127 starting from stripe 128.
.B " raid6check /dev/md0 0 0 | grep -i error > md0_err.log"
.br
This will check /dev/md0 completely and create a log file only
with errors, if any.
.SH FILES
"raid6check" uses directly the component drives as found in /dev.
Furthermore, the sysfs interface is needed in order to find out
the RAID6 parameters.
.SH BUGS
Negative stripe parameters can lead to unexpected results due to
strtoull.
(Negative slot numbers should work for Q [-1] and P [-2] but
currently involve compiler-defined behavior.)
It is not clear what will happen if the RAID6 MD device gets
degraded during the check.
.PP
The latest version of
.I raid6check
should always be available from
.IP
.B https://www.kernel.org/pub/linux/utils/raid/mdadm/
.PP
Related man pages:
.PP
.IR mdadm (8)
.IR mdmon (8),
.IR mdadm.conf (5),
.IR md (4).
|