Hi, I have a small question about the depth of scrub in a raidz/2/3 configuration. I''m quite sure scrub does not check spares or unused areas of the disks (it could check if the disks detects any errors there). But what about the parity? Obviously it has to be checked, but I can''t find any indications for it in the literature. The man page only states that the data is being checksummed and only if that fails the redundancy is being used. Please tell me I''m wrong ;) But what I''m really targeting with my question: How much coverage can be reached with a find | xargs wc in contrast to scrub? It misses the snapshots, but anything beyond that? Thanks, Arne
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of sensille > > I''m quite sure scrub does not check spares or unused areas of the disks > (it > could check if the disks detects any errors there). > But what about the parity? Obviously it has to be checked, but I can''t > find > any indications for it in the literature. The man page only states that > the > data is being checksummed and only if that fails the redundancy is > being used. > Please tell me I''m wrong ;)If my understanding is correct, a scrub reads and checksums all the used blocks on all the primary storage devices. Meaning: The scrub is not checking log devices or spares, and I don''t think it checks cache devices. And as you said, it''s not reading empty space. The main reason to use scrub, as opposed to your find command (which has some serious shortcomings) or even a "zfs send > /dev/null" command (which has far fewer shortcomings) is: When you just tell the system to read data, you''re only sure to read one half of redundant data. You might coincidentally just read the good side of the mirror, or whatever, and therefore fail to detect the corrupted data on the other side of the mirror. You''ve got to use the scrub. It is very wise to perform a scrub occasionally, because you can only correct errors as long as you still have redundancy. If a device fails, and degrades redundancy, and then some rarely used block is discovered to be corrupt during the resilver ... too bad for you.
> I have a small question about the depth of scrub in a > raidz/2/3 configuration. > I''m quite sure scrub does not check spares or unused > areas of the disks (it > could check if the disks detects any errors there). > But what about the parity?>From some informal performance testing of RAIDZ2/3 arrays, I am confident that scrub reads the parity blocks and normal reads do not.You can see this for yourself with "iostat -x" or "zpool iostat -v" Start monitoring and watch read I/O. You will see regularly that a RAIDZ3 array will read from all but three drives, which I presume is the unread parity. Do the same monitoring while a scrub is underway and you will see all drives being read from equally. My experience suggests something similar is taking place with mirrors. If you think about it, having a scrub check everything but the parity would be a rather pointless operation. -- This message posted from opensolaris.org
On Fri, June 4, 2010 03:29, sensille wrote:> Hi, > > I have a small question about the depth of scrub in a raidz/2/3 > configuration. > I''m quite sure scrub does not check spares or unused areas of the disks > (it > could check if the disks detects any errors there). > But what about the parity? Obviously it has to be checked, but I can''t > find > any indications for it in the literature. The man page only states that > the > data is being checksummed and only if that fails the redundancy is being > used. > Please tell me I''m wrong ;)I believe you''re wrong. Scrub checks all the blocks used by ZFS, regardless of what''s in them. (It doesn''t check free blocks.)> But what I''m really targeting with my question: How much coverage can be > reached with a find | xargs wc in contrast to scrub? It misses the > snapshots, but anything beyond that?Your find script misses the redundant data; scrub checks it all. It may well miss some of the metadata as well, and probably misses the redundant copies of metadata. -- David Dyer-Bennet, dd-b at dd-b.net; http://dd-b.net/ Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/ Photos: http://dd-b.net/photography/gallery/ Dragaera: http://dragaera.info
On Fri, Jun 4, 2010 at 1:29 AM, sensille <sensille at gmx.net> wrote:> But what I''m really targeting with my question: How much coverage can be > reached with a find | xargs wc in contrast to scrub? It misses the snapshots, > but anything beyond that?Your script will also update the atime on every file, which may not be the desired effect. -B -- Brandon High : bhigh at freaks.com
David Dyer-Bennet wrote:>> But what about the parity? Obviously it has to be checked, but I can''t >> find >> any indications for it in the literature. The man page only states that >> the >> data is being checksummed and only if that fails the redundancy is being >> used. >> Please tell me I''m wrong ;) > > I believe you''re wrong. Scrub checks all the blocks used by ZFS, > regardless of what''s in them. (It doesn''t check free blocks.) >Thanks for all the reassurances :) I don''t know why I got weak, of course it would be pointless if it wouldn''t check all redundant data.