integrity verification on raid-5?
integrity verification on raid-5?
am 17.12.2010 22:08:16 von linux-raid
Is there a way to do integrity verification on a raid-5 array? I'm
working on building a storage system on SSDs under raid-5 and want to be
able to perform periodic integrity checks. Basically just check the
drives to make sure that they match what the parity drive has.
After a bit of googling I saw other people wanting the same thing but
nobody with any result. I dont see why this cant be done, but is there
any tool to do so?
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: integrity verification on raid-5?
am 17.12.2010 22:17:45 von NeilBrown
On Fri, 17 Dec 2010 14:08:16 -0700 "Patrick H."
wrote:
> Is there a way to do integrity verification on a raid-5 array? I'm
> working on building a storage system on SSDs under raid-5 and want to be
> able to perform periodic integrity checks. Basically just check the
> drives to make sure that they match what the parity drive has.
> After a bit of googling I saw other people wanting the same thing but
> nobody with any result. I dont see why this cant be done, but is there
> any tool to do so?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
% man 4 md
search for 'check'.
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: integrity verification on raid-5?
am 17.12.2010 22:24:37 von Robin Hill
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri Dec 17, 2010 at 02:08:16PM -0700, Patrick H. wrote:
> Is there a way to do integrity verification on a raid-5 array? I'm=20
> working on building a storage system on SSDs under raid-5 and want to be=
=20
> able to perform periodic integrity checks. Basically just check the=20
> drives to make sure that they match what the parity drive has.
> After a bit of googling I saw other people wanting the same thing but=20
> nobody with any result. I dont see why this cant be done, but is there=20
> any tool to do so?
There's built-in functionality to do this. To start the check, run:
echo check > /sys/block/mdX/md/sync_action
You can check progress by catting /proc/mdstat, and the number of errors
is reported at the end in /sys/block/mdX/md/mismatch_cnt. To rewrite
the parity data for any mismatches, use "repair" instead of "check" in
the first command.
Currently, there's no easy way to find out what file(s) are affected by
the mismatches though.
Cheers,
Robin
--=20
___ =20
( ' } | Robin Hill |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
--7AUc2qLy4jB3hD7Z
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEARECAAYFAk0L1RQACgkQShxCyD40xBJZWgCfVzZ/esa3YFE7oyS1WYGq aaWG
K/sAoLlD+/wMZf0A9dEXpbc+xyLDSZhf
=AhFt
-----END PGP SIGNATURE-----
--7AUc2qLy4jB3hD7Z--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: integrity verification on raid-5?
am 17.12.2010 22:25:02 von linux-raid
Perfect, thank you very much.
Hopefully google indexes the mailing list so this answer will be out
there now :-)
-Patrick
Sent: Fri Dec 17 2010 14:17:45 GMT-0700 (Mountain Standard Time)
From: Neil Brown
To: Patrick H. linux-raid@vger.kernel.org
Subject: Re: integrity verification on raid-5?
> On Fri, 17 Dec 2010 14:08:16 -0700 "Patrick H."
> wrote:
>
>
>> Is there a way to do integrity verification on a raid-5 array? I'm
>> working on building a storage system on SSDs under raid-5 and want to be
>> able to perform periodic integrity checks. Basically just check the
>> drives to make sure that they match what the parity drive has.
>> After a bit of googling I saw other people wanting the same thing but
>> nobody with any result. I dont see why this cant be done, but is there
>> any tool to do so?
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> % man 4 md
>
> search for 'check'.
>
> NeilBrown
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: integrity verification on raid-5?
am 17.12.2010 23:20:31 von linux-raid
Sent: Fri Dec 17 2010 14:24:37 GMT-0700 (Mountain Standard Time)
From: Robin Hill
To: linux-raid@vger.kernel.org
Subject: Re: integrity verification on raid-5?
> On Fri Dec 17, 2010 at 02:08:16PM -0700, Patrick H. wrote:
>
>
>> Is there a way to do integrity verification on a raid-5 array? I'm
>> working on building a storage system on SSDs under raid-5 and want to be
>> able to perform periodic integrity checks. Basically just check the
>> drives to make sure that they match what the parity drive has.
>> After a bit of googling I saw other people wanting the same thing but
>> nobody with any result. I dont see why this cant be done, but is there
>> any tool to do so?
>>
>
> There's built-in functionality to do this. To start the check, run:
> echo check > /sys/block/mdX/md/sync_action
>
> You can check progress by catting /proc/mdstat, and the number of errors
> is reported at the end in /sys/block/mdX/md/mismatch_cnt. To rewrite
> the parity data for any mismatches, use "repair" instead of "check" in
> the first command.
>
> Currently, there's no easy way to find out what file(s) are affected by
> the mismatches though.
>
>
The docs say that for both raid 5 & 6 it the repair function simply
rewrites the parity drive(s). For raid-5 I can understand this as
there's no way to tell if the data is incorrect, or if the parity is
incorrect since there's only 1 parity. And while I dont know the details
of the algorithms involved in raid-6, couldnt you do something like:
Calculate replacement data for both parity drives
If one of the 2 parity drives doesnt match its replacement data
assume that drive is bad
Else if both parity drives dont match their replacement data
one of the data drives must be bad
calculate replacement data for each data drive and find the one that
doesnt match
If more than 1 data drive doesnt match its replacement data
we have multiple-drive failure (could be any combination of
parity & data drives) and cant determine which ones
Else
the world is ok
Its probably a heck of a lot more computationally expensive, but it can
isolate which drive is the bad one. But again, I'm not knowledgeable on
the the internal details of raid-6 and might just be completely off my
rocker.
-Patrick
> Cheers,
> Robin
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: integrity verification on raid-5?
am 18.12.2010 11:25:57 von Piergiorgio Sartor
Hi,
> The docs say that for both raid 5 & 6 it the repair function simply
> rewrites the parity drive(s). For raid-5 I can understand this as
> there's no way to tell if the data is incorrect, or if the parity is
> incorrect since there's only 1 parity. And while I dont know the
> details of the algorithms involved in raid-6, couldnt you do
> something like:
> Calculate replacement data for both parity drives
> If one of the 2 parity drives doesnt match its replacement data
> assume that drive is bad
> Else if both parity drives dont match their replacement data
> one of the data drives must be bad
> calculate replacement data for each data drive and find the one
> that doesnt match
> If more than 1 data drive doesnt match its replacement data
> we have multiple-drive failure (could be any combination of
> parity & data drives) and cant determine which ones
> Else
> the world is ok
>
> Its probably a heck of a lot more computationally expensive, but it
> can isolate which drive is the bad one. But again, I'm not
> knowledgeable on the the internal details of raid-6 and might just
> be completely off my rocker.
>
Welcome to the club!
It seems this topic pops up more or less
each 6 months...
Unfortunately, it also seems that the
core developers do not have high priority
on this one.
BTW, did anybody else look into this?
Is there any possiblities to perform this
kind of check in user space?
bye,
--
piergiorgio
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: integrity verification on raid-5?
am 18.12.2010 11:30:35 von Roman Mamedov
--Sig_/pMLEs1w7BTWjCNgF7lQbmVR
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
On Fri, 17 Dec 2010 21:24:37 +0000
Robin Hill wrote:
=20
> Currently, there's no easy way to find out what file(s) are affected by
> the mismatches though.
That's why it is also a good idea to keep around file-level checksums in ea=
ch
directory (especially if you store a lot of files which shouldn't ever chan=
ge,
like audio or video collections), using CFV - http://cfv.sourceforge.net/
--=20
With respect,
Roman
--Sig_/pMLEs1w7BTWjCNgF7lQbmVR
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAk0MjUsACgkQTLKSvz+PZwiMXQCffzCgI+sLLYE9pNTFazM5 j4nH
hSsAoIZ9ceDcY1gQRt4RKQcPMpuaJeq1
=KAAI
-----END PGP SIGNATURE-----
--Sig_/pMLEs1w7BTWjCNgF7lQbmVR--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html